Drupal 8 Site using Vue
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
909 B

  1. /*eslint strict: ["error", "global"]*/
  2. 'use strict';
  3. // If some JS components aren't es6 we want to simply move them
  4. // into the dist folder. This allows us to clean the dist/js
  5. // folder on build.
  6. //=======================================================
  7. // Include gulp
  8. //=======================================================
  9. var gulp = require('gulp');
  10. //=======================================================
  11. // Include Our Plugins
  12. //=======================================================
  13. var rename = require('gulp-rename');
  14. // Export our tasks.
  15. module.exports = {
  16. // Moves JavaScript.
  17. js: function() {
  18. return gulp.src([
  19. './src/{global,layout,components}/**/*.js',
  20. '!./src/{global,layout,components}/**/*.es6.js'
  21. ], { base: './' })
  22. .pipe(rename(function (path) {
  23. path.dirname = '';
  24. return path;
  25. }))
  26. .pipe(gulp.dest('./dist/js'));
  27. }
  28. };