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

scripts-copy: make defaults visible? #36

@daixtrose

Description

@daixtrose

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions