welldone-software / gulp-durandal

Gulp plugin for building durandaljs projects
MIT License
13 stars 19 forks source link

Shell not loading #23

Open bittrex-bill opened 8 years ago

bittrex-bill commented 8 years ago

Hi,

I use the following directory structure with my application.

App / Shell / Viewmodels / Shell.js / Shell / View / Shell.html / main.js

My main.js simply calls
app.setRoot('shell/viewmodels/shell', 'entrance');

My gulpfile is very basic: gulp.task('durandal', function () { durandal({ baseDir: 'app', //same as default, so not really required. main: 'main.js', //same as default, so not really required. output: 'main-built.js', // custom build file almond: true, minify: false, verbose: true, durandalDynamicModules: true }) .pipe(gulp.dest('scripts')); });

After running gulp durandal, my main-built.js file throws an error when trying to resolve shell/viewmodels/shell

I see it has been included in the main-built.js file:

define('Shell/ViewModels/shell',['plugins/router', 'durandal/app', ], function (router, app) { ... }

Any thoughts on why I'm hitting the exception "undefined missing shell/viewmodels/shell" in main? it is occurring at this line: throw new Error(name + ' missing ' + depName);

Any help is appreciated. Bill