Closed coding4funrocks closed 4 years ago
I can take care of this too. 👍
Sure @coding4funrocks it is time to do some housekeeping anyhow 😃 . The problem is that the build script is using the cp
command which is not running cross platform.
we can use copyfiles package instead
npm install copyfiles --save-dev
after that we should change the scripts to look like this:
{
"clean": "rimraf starterts/ && rimraf starterjs/ && rimraf dist/",
"clean:dist": "rimraf dist/",
"prepare": "npm run clean && npm run ts:build:dist && npm run copyfiles:dist && npm run browser:build",
"copyfiles:dist": "copyfiles src/cli/commands/html/sc/* dist/src/cli/commands/html/sc/ --flat",
"test": "npm run ts:build && mocha --colors --timeout=0",
"test-dev": "npm run ts:build && cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 mocha --reporter=list --timeout=0",
"mocha-run": "mocha --colors --timeout=0",
"test-jenkins": "npm run ts:build && cross-env JUNIT_REPORT_PATH=./report.xml mocha --colors --reporter mocha-jenkins-reporter --timeout=0",
"ts:build": "tsc",
"ts:build:dist": "tsc -p ./ --outDir dist/",
"ts:watch": "tsc -w",
"browser:build": "rollup -c",
"lint": "tslint ./src/**.ts && tslint ./test/**/*.ts",
"test:watch": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 mocha --watch test/ --growl --reporter=spec --timeout=0",
"start-dev": "cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 cross-env concurrently --raw \"npm run ts:watch\" \"npm run test:watch\" ",
"dev": "npm run ts:build && cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 concurrently --raw \"npm run ts:watch\" \"npm run test:watch\" ",
"start-agent-dev": "npm run ts:build && cross-env NODE_TLS_REJECT_UNAUTHORIZED=0 cross-env DEBUG=http,mindconnect-agent,mindconnect-fileencoder node ./src/demoagent/test-agent.js ",
"doc": "compodoc -p tsconfig.json --output docs --name \"@mindconnect/mindconnect-nodejs\" --theme material && npm run copyfiles:doc",
"copyfiles:doc": "copyfiles images/* docs/",
"createkey": "openssl genrsa -out private.key 3072",
"license": "license-checker --csv --onlyAllow \"Apache-2.0; Apache*; BSD; BSD-2-Clause; BSD-3-Clause; ISC; MIT; Unlicense; WTFPL; CC-BY-3.0; CC0-1.0\" --production",
"license:summary": "license-checker --summary --onlyAllow \"Apache-2.0; Apache*; BSD; BSD-2-Clause; BSD-3-Clause; ISC; MIT; Unlicense; WTFPL; CC-BY-3.0; CC0-1.0\" --production"
}
I also deleted some left-over docker build scripts from 2017 :)
Describe the bug npm install returns error in poweshell
To Reproduce