Skip to content
This repository has been archived by the owner on Nov 10, 2019. It is now read-only.

added deepExclude, generateSourceMaps options. #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

added deepExclude, generateSourceMaps options. #13

wants to merge 1 commit into from

Conversation

spykedood
Copy link

Had to add deep exclude option (true by default). This is useful in a situation where the user may wish to ignore a folder of modules but keep any external dependencies those modules may have, such as jQuery or Knockout.

e.g.

gulp.task('durandal', function(){
    return durandal({
            baseDir: 'App',
            main: 'main.js',
            //output: 'main.js', //same as default, so not really required.
            deepExclude: false,
            generateSourceMaps: false,
            almond: false,
            minify: false,
            verbose: false,
            pluginMap: {
                '.html': 'text',
                '.json': 'text',
                '.txt': 'text'
            },
            moduleFilter: function(moduleName){
                var accept = true;

                if (moduleName.indexOf('apps/') == 0) accept = false;
                if (moduleName.indexOf('text!apps/') == 0) accept =  false;
                if (moduleName.indexOf('css!apps/') == 0) accept =  false;

                var action = accept ? "Accepted" :"Skipping";
                console.log(action + ": " + moduleName);
                return accept;
            }
        })
        .pipe(gulp.dest('path/to/build'));
});

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant