Create build+test scripts

This commit is contained in:
Faisal Salman
2023-04-14 23:43:09 +07:00
parent 35c2b91534
commit 5a26ac146e
5 changed files with 81 additions and 35 deletions

View File

@@ -163,9 +163,8 @@
"src"
],
"scripts": {
"build": "uglifyjs src/ua-parser.js -o dist/ua-parser.min.js --comments '/^ UA/' && uglifyjs src/ua-parser.js -o dist/ua-parser.pack.js --comments '/^ UA/' --compress --mangle && node script/build-module.js",
"test": "jshint src && mocha -R nyan test/mocha*js && npx playwright test && npx lockfile-lint -p package-lock.json",
"test-ci": "jshint src && mocha -R spec test/mocha*js && npx playwright test && npx lockfile-lint -p package-lock.json"
"build": "./script/build-dist.sh && ./script/build-module.js",
"test": "npm run build && ./script/test-all.sh"
},
"devDependencies": {
"@babel/parser": "7.15.8",
@@ -187,6 +186,7 @@
},
"directories": {
"dist": "dist",
"script": "script",
"src": "src",
"test": "test"
},