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

scripts-copy: make defaults visible? #36

Open
daixtrose opened this issue Jun 22, 2016 · 0 comments
Open

scripts-copy: make defaults visible? #36

daixtrose opened this issue Jun 22, 2016 · 0 comments

Comments

@daixtrose
Copy link

In the gulp task for scripts-copy defaulSrc is invisible for the user. This makes it impossible to concatenate own sources to the function by calling

copyScripts({
  src: copyScripts.defaultSrc.concat([
      ... // my files here
  ])
});

I propose to change the code to allow it, if this does not stand against gulp rules, something along these lines:

var gulp = require('gulp');

module.exports = function(options) {
  var defaultSrc = [
    'node_modules/es6-shim/es6-shim.min.js',
    'node_modules/es6-shim/es6-shim.map',
    'node_modules/zone.js/dist/zone.js',
    'node_modules/reflect-metadata/Reflect.js',
    'node_modules/reflect-metadata/Reflect.js.map'
   ];

options.src = options.src || defaultSrc;
options.dest = options.dest || 'www/build/js';

return gulp.src(options.src)
    .pipe(gulp.dest(options.dest));
}

What do you think?

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

No branches or pull requests

1 participant