From c76a6007dd7d33cdc13142cc52108b01188b3473 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Thu, 28 Dec 2017 20:24:20 -0800 Subject: [PATCH 1/2] 'shenanigans-manager' --- .gitignore | 19 +++++++++++-------- .npmignore | 3 ++- .vscode/settings.json | 2 +- README.md | 29 ++++++++++++++++++++++++++++- package-lock.json | 5 ----- package.json | 20 ++++++++++++-------- 6 files changed, 54 insertions(+), 24 deletions(-) delete mode 100644 package-lock.json diff --git a/.gitignore b/.gitignore index 0d04759..f4f8c9e 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/.npmignore b/.npmignore index 6f121f6..63c7b73 100644 --- a/.npmignore +++ b/.npmignore @@ -1,3 +1,4 @@ node_modules/ -test/**/* +test/ +*.test.* npm-debug.log diff --git a/.vscode/settings.json b/.vscode/settings.json index ff6d1a5..89a6809 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -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" } diff --git a/README.md b/README.md index 7b705f0..3ca25eb 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,34 @@ A flexible container for map attributes and viewport. ## Development -See [Documentation/Development](https://github.com/FullScreenShenanigans/Documentation). +``` +git clone https://github.com/FullScreenShenanigans/MapScreenr +cd MapScreenr +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). diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index bead76a..0000000 --- a/package-lock.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "mapscreenr", - "version": "0.7.1", - "lockfileVersion": 1 -} diff --git a/package.json b/package.json index 210c89a..6301d83 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,12 @@ "email": "joshuakgoldberg@outlook.com", "name": "Josh Goldberg" }, + "browser": "./src/index.js", "bugs": { "url": "https://github.com/FullScreenShenanigans/MapScreenr/issues" }, - "dependencies": {}, + "dependencies": { + }, "description": "A flexible container for map attributes and viewport.", "devDependencies": { "@types/chai": "^4.0.4", @@ -21,10 +23,11 @@ "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", + "tsutils": "^2.14.0", "typedoc": "^0.9.0", "typescript": "^2.6.2", "webpack": "^3.10.0" @@ -37,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", @@ -56,11 +60,11 @@ "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": "MapScreenr" }, "types": "./src/index.d.ts", "version": "0.7.1" -} +} \ No newline at end of file From 1dcfe034b7d587a15b29e1daf9b2b5ba72118c69 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Thu, 28 Dec 2017 20:31:31 -0800 Subject: [PATCH 2/2] 'Bump-patch-version' --- package.json | 137 +++++++++++++++++++++++++-------------------------- 1 file changed, 68 insertions(+), 69 deletions(-) diff --git a/package.json b/package.json index 6301d83..5f23f90 100644 --- a/package.json +++ b/package.json @@ -1,70 +1,69 @@ { - "author": { - "email": "joshuakgoldberg@outlook.com", - "name": "Josh Goldberg" - }, - "browser": "./src/index.js", - "bugs": { - "url": "https://github.com/FullScreenShenanigans/MapScreenr/issues" - }, - "dependencies": { - }, - "description": "A flexible container for map attributes and viewport.", - "devDependencies": { - "@types/chai": "^4.0.4", - "@types/lolex": "^1.5.32", - "@types/mocha": "^2.2.44", - "@types/sinon": "^4.0.0", - "@types/sinon-chai": "^2.7.29", - "chai": "^4.1.2", - "glob": "^7.1.2", - "lolex": "^2.3.0", - "mocha": "^4.0.1", - "mocha-headless-chrome": "^1.7.1", - "requirejs": "^2.3.5", - "run-for-every-file": "^1.1.0", - "shenanigans-manager": "^0.2.5", - "sinon": "^4.1.2", - "sinon-chai": "^2.14.0", - "tslint": "5.8.0", - "tsutils": "^2.14.0", - "typedoc": "^0.9.0", - "typescript": "^2.6.2", - "webpack": "^3.10.0" - }, - "license": "MIT", - "name": "mapscreenr", - "repository": { - "type": "git", - "url": "ssh://git@github.com:FullScreenShenanigans/MapScreenr.git" - }, - "scripts": { - "dist": "npm run dist:webpack", - "dist:webpack": "webpack", - "docs": "npm run docs:typedoc", - "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 && 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 -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", - "test:setup:copy": "npm run test:setup:copy:default", - "test:setup:copy:default": "run-for-every-file --dot --src \"node_modules/shenanigans-manager/setup/test/\" --file \"**/*\" --run \"mustache package.json {{src-file}} ./test/{{file}}\" --dest \".\" --only-files", - "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": "tsc -p . -w" - }, - "shenanigans": { - "name": "MapScreenr" - }, - "types": "./src/index.d.ts", - "version": "0.7.1" -} \ No newline at end of file + "author": { + "email": "joshuakgoldberg@outlook.com", + "name": "Josh Goldberg" + }, + "browser": "./src/index.js", + "bugs": { + "url": "https://github.com/FullScreenShenanigans/MapScreenr/issues" + }, + "dependencies": {}, + "description": "A flexible container for map attributes and viewport.", + "devDependencies": { + "@types/chai": "^4.0.4", + "@types/lolex": "^1.5.32", + "@types/mocha": "^2.2.44", + "@types/sinon": "^4.0.0", + "@types/sinon-chai": "^2.7.29", + "chai": "^4.1.2", + "glob": "^7.1.2", + "lolex": "^2.3.0", + "mocha": "^4.0.1", + "mocha-headless-chrome": "^1.7.1", + "requirejs": "^2.3.5", + "run-for-every-file": "^1.1.0", + "shenanigans-manager": "^0.2.5", + "sinon": "^4.1.2", + "sinon-chai": "^2.14.0", + "tslint": "5.8.0", + "tsutils": "^2.14.0", + "typedoc": "^0.9.0", + "typescript": "^2.6.2", + "webpack": "^3.10.0" + }, + "license": "MIT", + "name": "mapscreenr", + "repository": { + "type": "git", + "url": "ssh://git@github.com:FullScreenShenanigans/MapScreenr.git" + }, + "scripts": { + "dist": "npm run dist:webpack", + "dist:webpack": "webpack", + "docs": "npm run docs:typedoc", + "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 && 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 -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", + "test:setup:copy": "npm run test:setup:copy:default", + "test:setup:copy:default": "run-for-every-file --dot --src \"node_modules/shenanigans-manager/setup/test/\" --file \"**/*\" --run \"mustache package.json {{src-file}} ./test/{{file}}\" --dest \".\" --only-files", + "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": "tsc -p . -w" + }, + "shenanigans": { + "name": "MapScreenr" + }, + "types": "./src/index.d.ts", + "version": "0.7.2" +}