0

I am trying to move on from WelandJS. (Yes, I know, it was discontinued years ago) but it was working.

Anyway, for the life of me I cannot get GULP and DurandalJS to play nicely.

Heres my code

 var gulp = require('gulp');
 var durandal = require('gulp-durandal');

 gulp.task('durandal', function(){
durandal({
    baseDir: 'app',
    main: 'main.js',
    output: 'main-built.js',
    almond: true,
    minify: true,
    rjsConfigAdapter : function(rjsConfig){
    rjsConfig.deps = ['text'];
    return rjsConfig;
    }
})

.pipe(gulp.dest('app'));

 });

 gulp.task('default', ['durandal']);

I have tried with Almond. Without.. with and without the rjsConfigAdapter.

All I want to do is minify and bundle my files. Nothing else. Don't know why this has to be like pulling teeth. But, Seems no matter what I do, it will NOT minify. After hours of work I have it bundling. You would think a simple flag called "minify" being true would in-face produce a minified .JS file. Hummmmm??

Is there a better solution than using GULP? (Project is DurandalJS (HUGE MISTAKE) inside VS 2017, ect ect ect)

if Gulp is truly the way to do, has anyone actually gotten this to work? With a real production app?

JCircio
  • 525
  • 2
  • 7
  • 18
  • Have you considered Aurelia? It's a modern Durandal. With the CLI you get all the bundling and typescript compilation out of the box too. – 4imble Nov 24 '17 at 09:49
  • I have been researching Aurelia for a while now. My project is upwards of 85+ pages, so its rather complex. I am worried an upgrade would take some time. Beyond that, we are still using the razor engine in MVC to generate the pages with model validation, form submission,ect. and I have yet to find a complete Aurelia example. – JCircio Nov 27 '17 at 13:48
  • I feel your pain. We went with Durandal back then and now we are stuck. Upgrading to Aurelia would be a mistake IMHO because it will likely end up just like Durandal so I would rather go for something more mainstream. – GETah Jun 02 '23 at 18:09

0 Answers0