add some basic scripts to package.json

This commit is contained in:
Jakub Sokołowski 2018-08-11 19:54:59 -04:00
parent 74db3a4c5e
commit cd3f7a83ed
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 8 additions and 2 deletions

View File

@ -22,7 +22,7 @@ var imagemin = require('gulp-imagemin')
gulp.task('js', () => { gulp.task('js', () => {
return gulp.src('src/js/**/*.js', {read: false}) return gulp.src('src/js/**/*.js', {read: false})
.pipe(sourcemaps.init({loadMaps: true})) .pipe(sourcemaps.init({loadMaps: true}))
.pipe(tap((f) => { .pipe(tap(f => {
f.contents = browserify(f.path, {debug: true}).bundle() f.contents = browserify(f.path, {debug: true}).bundle()
})) }))
.pipe(streamify(babel({presets: ['es2015', 'es2017']}))) .pipe(streamify(babel({presets: ['es2015', 'es2017']})))
@ -55,7 +55,7 @@ gulp.task('css', () => {
}) })
gulp.task('images', () => { gulp.task('images', () => {
gulp.src('src/img/**/*') return gulp.src('src/img/**/*')
.pipe(imagemin()) .pipe(imagemin())
.pipe(gulp.dest('dist/img')) .pipe(gulp.dest('dist/img'))
}) })

View File

@ -2,6 +2,12 @@
"name": "cn.status.im", "name": "cn.status.im",
"version": "1.0.0", "version": "1.0.0",
"description": "Status main chinese page", "description": "Status main chinese page",
"scripts": {
"gulp": "gulp",
"clean": "gulp clean",
"build": "gulp build",
"develop": "gulp develop"
},
"devDependencies": { "devDependencies": {
"babel": "^6.23.0", "babel": "^6.23.0",
"babel-preset-es2015": "^6.24.1", "babel-preset-es2015": "^6.24.1",