forked from ot-builder/monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use more self-explainary trick flags Cleanup imports Cleanup unused test methods
- Loading branch information
0 parents
commit bd1f254
Showing
554 changed files
with
32,152 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
trim_trailing_whitespace = true | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
[*.{js,jsx,ts,tsx}] | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
insert_final_newline = false | ||
trim_trailing_whitespace = false | ||
|
||
# The indent size used in the `package.json` file cannot be changed | ||
# https://github.com/npm/npm/pull/3180#issuecomment-16336516 | ||
[{*.yml,*.yaml,package.json}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
node_modules | ||
tmp | ||
*.log | ||
.idea | ||
packages/*/lib | ||
.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# .prettierrc | ||
printWidth: 100 | ||
useTabs: false | ||
tabWidth: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,168 @@ | ||
{ | ||
"cSpell.words": [ | ||
"Aglfn", | ||
"Bimap", | ||
"Bopomofo", | ||
"Buginese", | ||
"Buhid", | ||
"CVARGVAR", | ||
"Carian", | ||
"Chiki", | ||
"Cntr", | ||
"Coord", | ||
"Deseret", | ||
"Dflt", | ||
"Dont", | ||
"Eliminable", | ||
"Falses", | ||
"Flippable", | ||
"Freetype", | ||
"Fullwidth", | ||
"Gdef", | ||
"Gpos", | ||
"Gsub", | ||
"Gurmukhi", | ||
"Gvar", | ||
"HASC", | ||
"HDSC", | ||
"HHVV", | ||
"HLGP", | ||
"HVVH", | ||
"Halfwidth", | ||
"Hanunoo", | ||
"Hhea", | ||
"Hmtx", | ||
"Hvar", | ||
"Installable", | ||
"Interp", | ||
"Jamo", | ||
"Jing", | ||
"Johab", | ||
"Kanbun", | ||
"Kangxi", | ||
"Kayah", | ||
"Kharoshthi", | ||
"Lepcha", | ||
"Letterform", | ||
"Letterlike", | ||
"Limbu", | ||
"Loca", | ||
"Loggable", | ||
"Malloc", | ||
"Monoid", | ||
"Mvar", | ||
"Nagri", | ||
"Osmanya", | ||
"Panose", | ||
"Phags", | ||
"Phagspa", | ||
"Phaistos", | ||
"Ppem", | ||
"Rejang", | ||
"Saurashtra", | ||
"Semigroup", | ||
"Sfnt", | ||
"Sidebearing", | ||
"Sinhala", | ||
"Skia", | ||
"Struct", | ||
"Subr", | ||
"Subrs", | ||
"Subsetting", | ||
"Subtable", | ||
"Subtables", | ||
"Syloti", | ||
"Tagbanwa", | ||
"Thaana", | ||
"Tifinagh", | ||
"Vhea", | ||
"Vorg", | ||
"Vvar", | ||
"XUID", | ||
"Xuan", | ||
"Yijing", | ||
"canonicalize", | ||
"cmap", | ||
"comap", | ||
"coronaot", | ||
"cpht", | ||
"cvar", | ||
"dlng", | ||
"eigen", | ||
"fontkit", | ||
"fpgm", | ||
"fvar", | ||
"fvid", | ||
"gids", | ||
"glyf", | ||
"gord", | ||
"hasher", | ||
"hcla", | ||
"hcld", | ||
"hcof", | ||
"hcrn", | ||
"hcrs", | ||
"lsid", | ||
"maxp", | ||
"notdef", | ||
"nullptr", | ||
"opsz", | ||
"otvar", | ||
"pmod", | ||
"relo", | ||
"repo", | ||
"romn", | ||
"sbxo", | ||
"sbxs", | ||
"sbyo", | ||
"sbys", | ||
"slng", | ||
"spxo", | ||
"spxs", | ||
"spyo", | ||
"spys", | ||
"stid", | ||
"stro", | ||
"strs", | ||
"structs", | ||
"unds", | ||
"vasc", | ||
"vcof", | ||
"vcrn", | ||
"vcrs", | ||
"vdsc", | ||
"vlgp", | ||
"vmtx", | ||
"vrtr", | ||
"vwid", | ||
"wdth", | ||
"wght", | ||
"xhgt" | ||
], | ||
"codemetrics.nodeconfiguration.ReturnStatement": 0, | ||
"codemetrics.nodeconfiguration.CaseClause": 0, | ||
"codemetrics.nodeconfiguration.DefaultClause": 0, | ||
"codemetrics.nodeconfiguration.ContinueStatement": 0, | ||
"codemetrics.nodeconfiguration.BreakStatement": 0, | ||
"codemetrics.basics.CodeLensHiddenUnder": 20, | ||
"codemetrics.basics.ComplexityLevelNormal": 10, | ||
"codemetrics.basics.ComplexityLevelHigh": 20, | ||
"codemetrics.basics.ComplexityLevelExtreme": 30, | ||
"codemetrics.basics.ComplexityColorLow": "#00baff", | ||
"codemetrics.basics.ComplexityColorNormal": "#9500ff", | ||
"codemetrics.basics.ComplexityColorHigh": "#ff0066", | ||
"files.exclude": { | ||
"**/.git": true, | ||
"**/.svn": true, | ||
"**/.hg": true, | ||
"**/CVS": true, | ||
"**/.DS_Store": true, | ||
"node_modules": true, | ||
"packages/*/node_modules": true, | ||
"packages/*/lib": true, | ||
"**/.cache": true | ||
}, | ||
"typescript.tsdk": "./node_modules/typescript/lib", | ||
"prettier.tslintIntegration": true, | ||
"typescript.preferences.importModuleSpecifier": "non-relative" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
// 有关 tasks.json 格式的文档,请参见 | ||
// https://go.microsoft.com/fwlink/?LinkId=733558 | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "TypeScript watch", | ||
"type": "npm", | ||
"script": "watch", | ||
"problemMatcher": [], | ||
"auto": true, | ||
"presentation": { | ||
"echo": true, | ||
"reveal": "silent", | ||
"focus": false, | ||
"panel": "shared", | ||
"showReuseMessage": true, | ||
"clear": false | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# `ot-builder` | ||
|
||
DOCUMENTS TBD | ||
|
||
---------- | ||
|
||
|
||
# Typescript Composite Project with Lerna | ||
|
||
[TypeScript Composite Project(Project References)](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#project-references) + [Lerna](https://github.com/lerna/lerna) | ||
|
||
|
||
## Usage | ||
|
||
### Initialization | ||
|
||
``` | ||
git clone https://github.com/hanpama/typescript-composite-lerna | ||
cd typescript-composite-lerna | ||
npm run boostrap | ||
npm run watch | ||
``` | ||
|
||
#### `npm run bootstrap` | ||
|
||
* installs the project dependencies (in `/package.json`) | ||
* links each packages | ||
* and builds the project with `npm run build` (`tsc --build packages/tsconfig.project.json`) | ||
|
||
#### `npm run watch` | ||
|
||
* run tsc project build mode with `--watch` flag (`tsc --build --watch packages/tsconfig.project.json`) | ||
|
||
You can watch the entire project with a single tsc running. | ||
|
||
### Updating `tsconfig.package.json` | ||
|
||
``` | ||
npm run update:tsconfig.json | ||
``` | ||
|
||
Each package has its `tsconfig.package.json` file for individual build. | ||
To integrate those building process into project, we need `references` field listing its build dependencies. | ||
|
||
```json | ||
// GENERATED by scripts/update-package-tsconfig.ts | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"outDir": "./lib", | ||
"rootDir": "./src", | ||
"composite": true | ||
}, | ||
"references": [ | ||
{ | ||
"path": "../foo/tsconfig.package.json" | ||
}, | ||
{ | ||
"path": "../bar/tsconfig.package.json" | ||
} | ||
], | ||
"include": [ | ||
"src" | ||
], | ||
"exclude": [ | ||
"tests", | ||
"lib" | ||
] | ||
} | ||
``` | ||
|
||
`update:tsconfig.json` is a script which resolves and updates those dependencies. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const os = require("os"); | ||
|
||
module.exports = { | ||
testEnvironment: "node", | ||
testMatch: ["**/packages/*/lib/**/*.test.js"], | ||
roots: ["packages/"], | ||
maxConcurrency: os.cpus().length // use how many processors you have | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"lerna": "3.4.0", | ||
"packages": [ | ||
"packages/*" | ||
], | ||
"version": "0.1.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "ot-builder-monorepo", | ||
"private": true, | ||
"license": "MIT", | ||
"scripts": { | ||
"boot": "npm i && npm run update:package.json && lerna bootstrap --hoist --ignore-scripts && npm run update:tsconfig.json", | ||
"clean": "rimraf .cache && lerna run clean && lerna clean --yes", | ||
"build": "tsc --build packages/tsconfig.json", | ||
"rebuild": "npm run clean && npm run boot && npm run build", | ||
"watch": "tsc --build --watch packages/tsconfig.json", | ||
"update:tsconfig.json": "ts-node scripts/update-package-tsconfig.ts", | ||
"update:package.json": "ts-node scripts/update-package-json.ts", | ||
"create-package": "ts-node scripts/create-package.ts", | ||
"test": "jest" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^12.6.1", | ||
"lerna": "^3.15.0", | ||
"typescript": "^3.5.3", | ||
"ts-node": "^8.3.0", | ||
"rimraf": "^2.6.3", | ||
"jest": "^24.8.0", | ||
"vrsource-tslint-rules": "^6.0.0", | ||
"tslint-lerna-rules": "^1.0.4", | ||
"prettier": "^1.15.2", | ||
"prettier-tslint": "^0.4.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "@ot-builder/bin-util", | ||
"description": "", | ||
"license": "MIT", | ||
"dependencies": { | ||
"tslib": "^1.9.3", | ||
"@ot-builder/prelude": "0.1.0", | ||
"@ot-builder/errors": "0.1.0" | ||
}, | ||
"devDependencies": { | ||
"jest": "^24.8.0", | ||
"@types/jest": "^24.0.15", | ||
"@types/node": "^12.6.1" | ||
}, | ||
"jest": { | ||
"testMatch": [ | ||
"**/*.test.js" | ||
], | ||
"rootDir": "lib/" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"scripts": { | ||
"build": "tsc -b ./tsconfig.package.json", | ||
"clean": "rimraf lib .cache", | ||
"test": "jest --passWithNoTests" | ||
}, | ||
"main": "./lib/index.js", | ||
"version": "0.1.0", | ||
"types": "./lib/index.d.ts", | ||
"files": [ | ||
"lib/**/*.js", | ||
"lib/**/*.json", | ||
"lib/**/*.d.ts" | ||
] | ||
} |
Oops, something went wrong.