Skip to content

Commit

Permalink
Copy input JSON files with gulp
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianhuna committed Sep 19, 2016
1 parent 1f6de35 commit 896eac0
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 6 deletions.
15 changes: 9 additions & 6 deletions frontend/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const rev = require('gulp-rev');
const revReplace = require('gulp-rev-replace');

var paths = {
pages: ['src/*.html', 'src/*.ico'],
static: ['src/*.html', 'src/*.ico'],
css: ['src/css/*.css']
};

Expand All @@ -38,9 +38,12 @@ var watchedBrowserify = watchify(browserify({
packageCache: {}
}).plugin(tsify));

gulp.task('copy-html', function () {
return gulp.src(paths.pages)
gulp.task('copy-static', function () {
gulp.src(paths.static)
.pipe(gulp.dest('dist'));

return gulp.src('input_data/*.json')
.pipe(gulp.dest('dist/data'));
});

gulp.task('styles', function () {
Expand Down Expand Up @@ -73,12 +76,12 @@ gulp.task('vendor-js', function () {
});

gulp.task('clean', function (done) {
return del(['./dist/**/*', '!./dist/data/', '!./dist/data{,/**}'], { force: true }, done);
return del(['./dist/**/*'], { force: true }, done);
});

gulp.task('watch', function() {
gulp.watch('src/**/*.scss', ['styles']);
gulp.watch('src/**/*.html', ['copy-html']);
gulp.watch('src/**/*.html', ['copy-static']);
});

gulp.task("revision", ['build'], function(){
Expand Down Expand Up @@ -128,7 +131,7 @@ function dist() {
gulp.task('default', ['clean'], bundle);
gulp.task('build:dist', ['clean'], dist);

gulp.task('build', ['watch', 'copy-html', 'styles', 'copy-fonts', 'vendor-css', 'vendor-js']);
gulp.task('build', ['watch', 'copy-static', 'styles', 'copy-fonts', 'vendor-css', 'vendor-js']);

watchedBrowserify.on('update', bundle);
watchedBrowserify.on('log', gutil.log);
1 change: 1 addition & 0 deletions frontend/input_data/PHPExcel.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/input_data/cakephp.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/input_data/design-patterns.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/input_data/faker.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/input_data/laravel.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/input_data/math-php.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/input_data/phabricator.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/input_data/slim.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/input_data/symfony.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions frontend/input_data/yii2.json

Large diffs are not rendered by default.

0 comments on commit 896eac0

Please sign in to comment.