|
25 | 25 | },
|
26 | 26 | "preferGlobal": true,
|
27 | 27 | "main": "lib/jsonlint.js",
|
| 28 | + "typings": "lib/jsonlint.d.ts", |
28 | 29 | "bin": {
|
29 | 30 | "jsonlint": "lib/cli.js"
|
30 | 31 | },
|
|
33 | 34 | },
|
34 | 35 | "scripts": {
|
35 | 36 | "prepare": "npm run lint && npm run build",
|
36 |
| - "lint": "standard --fix -v", |
37 |
| - "build": "node scripts/bundle-jsonlint && uglifyjs -o web/jsonlint.min.js --source-map \"filename='jsonlint.js',url='jsonlint.min.js.map',includeSources=true\" lib/jsonlint.js && uglifyjs -o web/validator.min.js --source-map \"filename='validator.js',url='validator.min.js.map',includeSources=true\" lib/validator.js && uglifyjs -o web/formatter.min.js --source-map \"filename='formatter.js',url='formatter.min.js.map',includeSources=true\" lib/formatter.js && uglifyjs -o web/sorter.min.js --source-map \"filename='sorter.js',url='sorter.min.js.map',includeSources=true\" lib/sorter.js && node scripts/bundle-schema-drafts && uglifyjs -o web/schema-drafts.min.js --source-map \"filename='schema-drafts.js',url='schema-drafts.min.js.map',includeSources=true\" lib/schema-drafts.js && uglifyjs -o web/ajv.min.js --source-map \"filename='ajv.js',url='ajv.min.js.map',includeSources=true\" node_modules/ajv/dist/ajv.bundle.js", |
38 |
| - "test": "nyc --silent node test/parse1 && nyc --silent --no-clean node test/parse1 --native-parser && nyc --silent --no-clean node test/parse2 && nyc --silent --no-clean node test/parse3 && nyc --silent --no-clean node test/parse4 && nyc --silent --no-clean node test/parse5 && nyc --silent --no-clean node test/portable && nyc --silent --no-clean node lib/cli package.json test/recursive && nyc --silent --no-clean node lib/cli -sq test/passes/hasOwnProperty.json && nyc --silent --no-clean node lib/cli -s -e json-schema-draft-04 -V test/passes/3.schema.json test/passes/3.json && nyc --silent --no-clean node lib/cli -C test/passes/comments.txt && nyc --silent --no-clean node lib/cli -S test/passes/strings.txt && nyc --silent --no-clean node lib/cli -M json5 test/passes/json5.text && nyc --silent --no-clean node lib/cli -v && nyc --silent --no-clean node lib/cli -h && nyc --silent --no-clean node lib/cli -pc test/fails/10.json || nyc report", |
39 |
| - "test:old": "node test/parse1 && node test/parse1 --native-parser && node test/parse2 && node test/parse3 && node test/parse4 && node test/parse5 && node test/portable && node lib/cli package.json test/recursive && node lib/cli -sq test/passes/hasOwnProperty.json && node lib/cli -s -e json-schema-draft-04 -V test/passes/3.schema.json test/passes/3.json && node lib/cli -C test/passes/comments.txt && node lib/cli -S test/passes/strings.txt && node lib/cli -M json5 test/passes/json5.text && node lib/cli -v && node lib/cli -h", |
40 |
| - "coverage": "cat coverage/lcov.info | npx coveralls", |
| 37 | + "lint": "npm run lint:js && npm run lint:ts", |
| 38 | + "lint:js": "standard --fix -v", |
| 39 | + "lint:ts": "tslint --fix -t stylish lib/*.ts test/*.ts", |
| 40 | + "build": "npm run compile && npm run compile:tests", |
| 41 | + "compile": "node scripts/bundle-jsonlint && uglifyjs -o web/jsonlint.min.js --source-map \"filename='jsonlint.js',url='jsonlint.min.js.map',includeSources=true\" lib/jsonlint.js && uglifyjs -o web/validator.min.js --source-map \"filename='validator.js',url='validator.min.js.map',includeSources=true\" lib/validator.js && uglifyjs -o web/formatter.min.js --source-map \"filename='formatter.js',url='formatter.min.js.map',includeSources=true\" lib/formatter.js && uglifyjs -o web/sorter.min.js --source-map \"filename='sorter.js',url='sorter.min.js.map',includeSources=true\" lib/sorter.js && node scripts/bundle-schema-drafts && uglifyjs -o web/schema-drafts.min.js --source-map \"filename='schema-drafts.js',url='schema-drafts.min.js.map',includeSources=true\" lib/schema-drafts.js && uglifyjs -o web/ajv.min.js --source-map \"filename='ajv.js',url='ajv.min.js.map',includeSources=true\" node_modules/ajv/dist/ajv.bundle.js", |
| 42 | + "compile:tests": "tsc --lib es6 test/typings.test.ts", |
| 43 | + "test": "nyc --silent node test/typings.test.js && nyc --silent --no-clean node test/parse1 && nyc --silent --no-clean node test/parse1 --native-parser && nyc --silent --no-clean node test/parse2 && nyc --silent --no-clean node test/parse3 && nyc --silent --no-clean node test/parse4 && nyc --silent --no-clean node test/parse5 && nyc --silent --no-clean node test/portable && nyc --silent --no-clean node lib/cli package.json test/recursive && nyc --silent --no-clean node lib/cli -sq test/passes/hasOwnProperty.json && nyc --silent --no-clean node lib/cli -s -e json-schema-draft-04 -V test/passes/3.schema.json test/passes/3.json && nyc --silent --no-clean node lib/cli -C test/passes/comments.txt && nyc --silent --no-clean node lib/cli -S test/passes/strings.txt && nyc --silent --no-clean node lib/cli -M json5 test/passes/json5.text && nyc --silent --no-clean node lib/cli -v && nyc --silent --no-clean node lib/cli -h && nyc --silent --no-clean node lib/cli -pc test/fails/10.json || nyc report", |
41 | 44 | "start": "http-server -c 5",
|
42 | 45 | "web": "npm run web:sync && npm run web:deploy",
|
43 | 46 | "web:clone": "test ! -d ../jsonlint-pages && git clone --single-branch --branch gh-pages `git remote get-url origin` ../jsonlint-pages",
|
|
67 | 70 | "commander": "4.0.1"
|
68 | 71 | },
|
69 | 72 | "devDependencies": {
|
| 73 | + "@types/node": "12.12.21", |
70 | 74 | "http-server": "0.12.0",
|
71 | 75 | "js-yaml": "3.13.1",
|
72 | 76 | "nyc": "14.1.1",
|
73 | 77 | "standard": "14.3.1",
|
74 | 78 | "test": "0.6.0",
|
| 79 | + "tslint": "5.20.1", |
| 80 | + "tslint-config-standard": "9.0.0", |
| 81 | + "typescript": "3.7.4", |
75 | 82 | "uglify-js": "3.7.2"
|
76 | 83 | }
|
77 | 84 | }
|
0 commit comments