Browse Source

add removal of dist folder before build

mightyplow 7 years ago
parent
commit
3295bc2a26
2 changed files with 16 additions and 3 deletions
  1. 9 0
      package-lock.json
  2. 7 3
      package.json

+ 9 - 0
package-lock.json

@@ -3346,6 +3346,15 @@
         "uuid": "3.1.0"
       }
     },
+    "rimraf": {
+      "version": "2.6.1",
+      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz",
+      "integrity": "sha1-wjOOxkPfeht/5cVPqG9XQopV8z0=",
+      "dev": true,
+      "requires": {
+        "glob": "7.1.2"
+      }
+    },
     "safe-buffer": {
       "version": "5.1.1",
       "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",

+ 7 - 3
package.json

@@ -2,15 +2,17 @@
   "name": "@mightyplow/jslib",
   "version": "0.8.0",
   "description": "js, helpers library",
+  "main": "dist/index.js",
   "devDependencies": {
     "babel-cli": "^6.26.0",
     "babel-preset-es2015": "^6.22.0",
-    "nodeunit": "^0.10.2"
+    "nodeunit": "^0.10.2",
+    "rimraf": "^2.6.1"
   },
   "scripts": {
     "nodeunit": "nodeunit",
     "test": "nodeunit tests",
-    "build": "babel lib -d dist",
+    "build": "rimraf dist && babel lib -d dist",
     "prebublish": "npm run test && npm run build"
   },
   "files": [
@@ -30,6 +32,8 @@
   },
   "license": "ISC",
   "babel": {
-    "presets": ["es2015"]
+    "presets": [
+      "es2015"
+    ]
   }
 }