diff --git a/core/paths.js b/core/paths.js index 323fbb5..df1c52a 100644 --- a/core/paths.js +++ b/core/paths.js @@ -41,6 +41,7 @@ module.exports = { js: { entryFile: path.join(contentPath, 'js/index.js'), allFiles: path.join(contentPath, 'js/**/*.js'), + separated: path.join(contentPath, 'js/*.js') }, icons: { sourceDirectory: path.join(contentPath, 'icons'), diff --git a/core/tasks/copy.js b/core/tasks/copy.js index a3f5ff5..c2dd029 100644 --- a/core/tasks/copy.js +++ b/core/tasks/copy.js @@ -15,6 +15,10 @@ module.exports = { return gulp.src(paths.content.assets.resources) .pipe(gulp.dest(paths.compiled.assets.resources)); }, + scripts() { + return gulp.src(paths.content.js.separated) + .pipe(gulp.dest(paths.compiled.js)); + }, favicon() { return gulp.src(paths.content.assets.favicon) .pipe(gulp.dest(paths.compiled.path)); diff --git a/gulpfile.js b/gulpfile.js index 0f4743b..4278ebf 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -20,6 +20,7 @@ gulp.task('copy:images', copy.images); gulp.task('copy:fonts', copy.fonts); gulp.task('copy:favicon', copy.favicon); gulp.task('copy:resources', copy.resources); +gulp.task('copy:scripts', copy.scripts); gulp.task('copy:compiledToDist', copy.compiledToDist); gulp.task('bundle', bundle); gulp.task('icon-font', iconFont); @@ -34,7 +35,7 @@ gulp.task('templates:compile', config.styleguide ? ); gulp.task('watch', watch); -gulp.task('copy', gulp.parallel('copy:images', 'copy:fonts', 'copy:resources', 'copy:favicon')); +gulp.task('copy', gulp.parallel('copy:images', 'copy:fonts', 'copy:resources', 'copy:scripts', 'copy:favicon')); gulp.task('compile-all', gulp.parallel('templates:clean','icon-font', 'bundle', 'sass', 'copy')); gulp.task('build', gulp.series('compile-all', 'templates:compile', 'copy:compiledToDist'), function (done) { diff --git a/package.json b/package.json index 3ec476d..429681f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bedrock", - "version": "1.30.0", + "version": "1.31.0", "description": "Static site generator to easily make HTML prototypes", "main": "gulpfile.js", "scripts": {