'shenanigans-manager'

This commit is contained in:
Josh Goldberg
2017-12-28 20:24:21 -08:00
parent 137cfc76e9
commit 5320f0cfa2
6 changed files with 49 additions and 22 deletions
+11 -8
View File
@@ -1,15 +1,18 @@
dist/**
docs/generated/**
lib/**
test/*.ts
test/index.html
test/utils/MochaLoader.ts
dist/
docs/generated/
test/
node_modules/
*.css
*.d.ts
*.js*
!./*.js
!*.json
!gulpfile.js
*.html
node_modules/
Maps.test.ts
npm-debug.log
debug.log
# Local development typically uses npm install --link
# Package lock files aren't updated by linked installs
package-lock.json
yarn.lock
+2 -1
View File
@@ -1,3 +1,4 @@
node_modules/
test/**/*
test/
*.test.*
npm-debug.log
+1 -1
View File
@@ -3,5 +3,5 @@
"editor.trimAutoWhitespace": true,
"tslint.alwaysShowRuleFailuresAsWarnings": true,
"tslint.autoFixOnSave": true,
"typescript.tsdk": "node_modules\\typescript\\lib"
"typescript.tsdk": "node_modules/typescript/lib"
}
+28 -1
View File
@@ -9,7 +9,34 @@ A path-based cache for quick lookups in nested data structures.
<!-- {{Development}} -->
## Development
See [Documentation/Development](https://github.com/FullScreenShenanigans/Documentation).
```
git clone https://github.com/FullScreenShenanigans/StringFilr
cd StringFilr
npm run setup
npm run verify
```
* `npm run setup` creates a few auto-generated setup files locally.
* `npm run verify` builds, lints, and runs tests.
### Building
```shell
npm run watch
```
Source files are written under `src/` in TypeScript and compile in-place to JavaScript files.
`npm run watch` will directly run the TypeScript compiler on source files in watch mode.
Use it in the background while developing to keep the compiled files up-to-date.
### Running Tests
```shell
npm run test
```
Test files are alongside source files under `src/` and named `*.test.ts?`.
Whenever you add, remove, or rename a `*.test.ts?` file under `src/`, re-run `npm run test:setup` to regenerate the list of static test files in `test/index.html`.
You can open that file in a browser to debug through the tests.
`npm run test` will run that setup and execute tests using [Puppeteer](https://github.com/GoogleChrome/puppeteer).
<!-- {{/Development}} -->
-5
View File
@@ -1,5 +0,0 @@
{
"name": "stringfilr",
"version": "0.7.1",
"lockfileVersion": 1
}
+7 -6
View File
@@ -23,7 +23,7 @@
"mocha-headless-chrome": "^1.7.1",
"requirejs": "^2.3.5",
"run-for-every-file": "^1.1.0",
"shenanigans-manager": "^0.2.0",
"shenanigans-manager": "^0.2.5",
"sinon": "^4.1.2",
"sinon-chai": "^2.14.0",
"tslint": "5.8.0",
@@ -40,17 +40,18 @@
},
"scripts": {
"dist": "npm run dist:webpack",
"dist:webpack": "webpack --config webpack.config.js",
"dist:webpack": "webpack",
"docs": "npm run docs:typedoc",
"docs:typedoc": "typedoc src/ --out docs/generated",
"docs:typedoc": "typedoc src/ --exclude **/*.d.ts --ignoreCompilerErrors --out docs/generated",
"init": "npm install && npm run setup && npm run verify",
"setup": "npm run setup:copy && npm run setup:package",
"setup": "npm run setup:copy && npm run setup:package && npm run setup:readme",
"setup:copy": "npm run setup:copy:default",
"setup:copy:default": "run-for-every-file --dot --src \"node_modules/shenanigans-manager/setup/default/\" --file \"**/*\" --run \"mustache package.json {{src-file}} {{file}}\" --dest \".\" --only-files",
"setup:package": "shenanigans-manager hydrate-package-json",
"setup:readme": "shenanigans-manager hydrate-readme",
"src": "npm run src:tsc && npm run src:tslint",
"src:tsc": "tsc -p .",
"src:tslint": "tslint -c tslint.json --exclude ./node_modules/**/*.ts* -p tsconfig.json -t stylish",
"src:tslint": "tslint -c tslint.json -e ./node_modules/**/*.ts* -p tsconfig.json -t stylish",
"test": "npm run test:setup && npm run test:run",
"test:run": "mocha-headless-chrome --file test/index.html",
"test:setup": "npm run test:setup:copy && npm run test:setup:html && npm run test:setup:tsc",
@@ -59,7 +60,7 @@
"test:setup:html": "shenanigans-manager generate-test-html",
"test:setup:tsc": "tsc -p test",
"verify": "npm run src && npm run test && npm run dist && npm run docs",
"watch": "run-p \"tsc -p . -w\" \"echo sup\""
"watch": "tsc -p . -w"
},
"shenanigans": {
"name": "StringFilr"