Reputation: 543
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?
Upvotes: 0
Views: 87