Merge most of the stuff from jerome-benoit:issue-62-ts-standard
[poolifier.git] / package.json
index 5c4c5acbbbee1ddfed195e7e8ce24ec361606234..07cebf187d8a6bf00352ab297ab39c975846aac8 100644 (file)
@@ -4,13 +4,18 @@
   "description": "Library on top of node js worker threads that implement various worker pools type",
   "main": "lib/index.js",
   "scripts": {
-    "build": "npm install && rimraf lib && tsc",
-    "test": "rimraf lib && tsc && nyc mocha --exit --timeout 20000 tests/*test.js ",
-    "debug-test": "mocha --inspect-brk --exit tests/*test.js ",
-    "demontest": "nodemon --exec \"npm test\"",
+    "build": "npm run build:clean && tsc",
+    "build:clean": "rimraf lib",
+    "test": "npm run build && nyc mocha --exit --timeout 20000 tests/*test.js ",
+    "test:debug": "mocha --inspect-brk --exit tests/*test.js ",
+    "test:nodemon": "nodemon --exec \"npm test\"",
     "coverage": "nyc report --reporter=text-lcov | coveralls",
-    "standard-verbose": "npx standard --verbose",
-    "lint": "prettier-standard --format | standard --fix"
+    "import-sort": "npx import-sort-cli --write 'src/**/*.ts{,x}'",
+    "standard:verbose": "npx standard --verbose",
+    "lint:standard": "prettier-standard --format | standard --fix",
+    "ts-standard:verbose": "npx ts-standard --verbose",
+    "lint:ts-standard": "ts-standard --fix",
+    "lint-and-format": "npm run lint:standard && npm run lint:ts-standard && npm run import-sort"
   },
   "repository": {
     "type": "git",
     "env": [
       "mocha",
       "node"
+    ],
+    "ignore": [
+      "src/",
+      "examples/typescript/"
     ]
   },
+  "ts-standard": {
+    "env": [
+      "mocha",
+      "node"
+    ],
+    "extensions": ".ts"
+  },
   "author": "pioardi",
   "license": "MIT",
   "bugs": {
@@ -46,7 +62,8 @@
     "nyc": "^15.0.0",
     "prettier-standard": "^16.4.1",
     "rimraf": "^3.0.2",
-    "standard": "^16.0.0",
+    "standard": "^16.0.3",
+    "ts-standard": "^10.0.0",
     "typescript": "^4.1.3"
   },
   "engines": {