feat(browser): add browser build, tests, and sample sha256 library method
This commit is contained in:
35
package.json
35
package.json
@@ -5,19 +5,27 @@
|
||||
"main": "build/main/index.js",
|
||||
"typings": "build/main/index.d.ts",
|
||||
"module": "build/module/index.js",
|
||||
"browser": "build/browser/index.js",
|
||||
"repository": "https://github.com/bitjson/typescript-starter",
|
||||
"author": "Jason Dreyzehner <jason@dreyzehner.com>",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"info": "npm-scripts-info",
|
||||
"build": "trash build && tsc -p tsconfig.json && tsc -p config/tsconfig.module.json",
|
||||
"build": "trash build && yarn build:main && yarn build:module && yarn build:browser-deps && yarn build:browser && yarn build:browser-cjs",
|
||||
"build:main": "tsc -p tsconfig.json",
|
||||
"build:module": "tsc -p config/exports/tsconfig.module.json",
|
||||
"build:browser-deps": "mkdirp build/temp && browserify node_modules/hash.js/lib/hash.js -o build/temp/hash.js",
|
||||
"build:browser": "rollup -c config/exports/rollup.config.js -f es -o build/browser/index.js",
|
||||
"build:browser-cjs": "rollup -c config/exports/rollup.config.js -f cjs -o build/browser/index.cjs.js",
|
||||
"build:tests": "node config/exports/build-tests.js",
|
||||
"lint": "tslint src/**/*.ts",
|
||||
"unit": "yarn build && nyc ava",
|
||||
"unit": "yarn build && yarn build:tests && nyc ava",
|
||||
"check-coverage": "nyc check-coverage --lines 100 --functions 100 --branches 100",
|
||||
"test": "yarn lint && yarn unit && yarn check-coverage",
|
||||
"test": "yarn lint && yarn unit && yarn check-coverage && ava",
|
||||
"watch": "trash build && multiview [yarn watch:build] [yarn watch:unit]",
|
||||
"watch:build": "tsc -p tsconfig.json -w",
|
||||
"watch:unit": "tsc -p tsconfig.json && ava --watch --verbose",
|
||||
"watch:build:tests": "node config/exports/build-tests.js -w",
|
||||
"cov": "yarn unit && yarn html-coverage && opn coverage/index.html",
|
||||
"html-coverage": "nyc report --reporter=html",
|
||||
"send-coverage": "nyc report --reporter=lcov > coverage.lcov && codecov",
|
||||
@@ -46,12 +54,20 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^7.0.5",
|
||||
"ava": "^0.18.1",
|
||||
"ava": "^0.18.2",
|
||||
"browserify": "^14.1.0",
|
||||
"codecov": "^1.0.1",
|
||||
"cpx": "^1.5.0",
|
||||
"hash.js": "^1.0.3",
|
||||
"mkdirp": "^0.5.1",
|
||||
"multiview": "^2.3.1",
|
||||
"npm-scripts-info": "^0.3.6",
|
||||
"nyc": "^10.0.0",
|
||||
"opn-cli": "^3.1.0",
|
||||
"rollup": "^0.41.4",
|
||||
"rollup-plugin-alias": "^1.2.0",
|
||||
"rollup-plugin-commonjs": "^7.0.0",
|
||||
"rollup-plugin-node-resolve": "^2.0.0",
|
||||
"standard-version": "^4.0.0",
|
||||
"trash-cli": "^1.4.0",
|
||||
"tslint": "^4.0.2",
|
||||
@@ -82,15 +98,8 @@
|
||||
],
|
||||
"nyc": {
|
||||
"exclude": [
|
||||
"**/*.spec.js"
|
||||
]
|
||||
},
|
||||
"ava": {
|
||||
"files": [
|
||||
"build/main/**/*.spec.js"
|
||||
],
|
||||
"source": [
|
||||
"build/main/**/*"
|
||||
"**/*.spec.js",
|
||||
"build"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user