Skip to content

Commit

Permalink
add concat
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-codes committed Nov 18, 2017
1 parent a38a6af commit 5e9f69e
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 21 deletions.
4 changes: 4 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const autoprefixer = require('gulp-autoprefixer')
const uglify = require('gulp-uglify')
const rename = require('gulp-rename')
const cleancss = require('gulp-clean-css')
const concat = require('gulp-concat')

gulp.task('default', ['js', 'scss', 'minify-js', 'minify-css'])
gulp.task('watch', function(){
Expand All @@ -26,8 +27,11 @@ gulp.task('minify-js', function(){
})

gulp.task('js', function(){
console.log('Babeling...')
gulp.src('src/*.js')
.pipe(concat('scripts.js'))
.pipe(babel({ presets: ['env'] }))
.on('error', (error) => { console.log('JavaScript Error: ', error.loc); this.emit('end') })
.pipe(gulp.dest('dist'))
});

Expand Down
93 changes: 72 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@
"gulp-sass": "^3.1.0",
"gulp-uglify": "^3.0.0",
"gulp-watch": "^4.3.11"
},
"dependencies": {
"gulp-concat": "^2.6.1"
}
}

0 comments on commit 5e9f69e

Please sign in to comment.