Browse Source

update build script

fish 5 months ago
parent
commit
1063a00267
3 changed files with 6 additions and 2 deletions
  1. 1 0
      .gitignore
  2. 1 1
      gulpfile.js
  3. 4 1
      package.json

+ 1 - 0
.gitignore

@@ -14,3 +14,4 @@ bin-release/
 /node_modules
 /yarn.lock
 /package-lock.json
+build/*

+ 1 - 1
gulpfile.js

@@ -14,4 +14,4 @@ gulp.task('less', function () {
         .pipe(gulp.dest('build/css'));
 });
 
-gulp.task('default', ['less', 'js']);
+gulp.task('default', gulp.series(['less','js']));

+ 4 - 1
package.json

@@ -4,7 +4,7 @@
   "description": "禁止微信懒加载",
   "main": "index.js",
   "scripts": {
-    "test": "echo \"Error: no test specified\" && exit 1"
+    "build": "gulp default"
   },
   "repository": {
     "type": "git",
@@ -18,5 +18,8 @@
   "dependencies": {
     "gulp-less": "^4.0.1",
     "gulp-uglify": "^3.0.2"
+  },
+  "devDependencies": {
+    "gulp": "^4.0.2"
   }
 }