@coolon/i18n-resource-generator 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +15 -0
- package/CHANGELOG.md +6 -0
- package/LICENSE +21 -0
- package/README.md +3 -0
- package/build/main/index.d.ts +1 -0
- package/build/main/index.js +7 -0
- package/build/main/lib/arg.class.d.ts +11 -0
- package/build/main/lib/arg.class.js +27 -0
- package/build/main/lib/arguments.class.d.ts +20 -0
- package/build/main/lib/arguments.class.js +55 -0
- package/build/main/lib/ast/abstractContainerElement.d.ts +9 -0
- package/build/main/lib/ast/abstractContainerElement.js +31 -0
- package/build/main/lib/ast/abstractElement.d.ts +16 -0
- package/build/main/lib/ast/abstractElement.js +39 -0
- package/build/main/lib/ast/classDef.class.d.ts +9 -0
- package/build/main/lib/ast/classDef.class.js +25 -0
- package/build/main/lib/ast/containerElement.class.d.ts +17 -0
- package/build/main/lib/ast/containerElement.class.js +3 -0
- package/build/main/lib/ast/element.class.d.ts +12 -0
- package/build/main/lib/ast/element.class.js +3 -0
- package/build/main/lib/ast/functionDef.class.d.ts +10 -0
- package/build/main/lib/ast/functionDef.class.js +16 -0
- package/build/main/lib/ast/interfaceDef.class.d.ts +9 -0
- package/build/main/lib/ast/interfaceDef.class.js +26 -0
- package/build/main/lib/ast/moduleDef.class.d.ts +8 -0
- package/build/main/lib/ast/moduleDef.class.js +42 -0
- package/build/main/lib/ast/namespaceDef.class.d.ts +18 -0
- package/build/main/lib/ast/namespaceDef.class.js +63 -0
- package/build/main/lib/ast/objectDef.class.d.ts +24 -0
- package/build/main/lib/ast/objectDef.class.js +69 -0
- package/build/main/lib/ast/tempContainer.class.d.ts +4 -0
- package/build/main/lib/ast/tempContainer.class.js +12 -0
- package/build/main/lib/ast/typeDef.class.d.ts +7 -0
- package/build/main/lib/ast/typeDef.class.js +14 -0
- package/build/main/lib/bin/cli.d.ts +2 -0
- package/build/main/lib/bin/cli.js +54 -0
- package/build/main/lib/constructor.class.d.ts +3 -0
- package/build/main/lib/constructor.class.js +3 -0
- package/build/main/lib/customTypeArrayNode.class.d.ts +10 -0
- package/build/main/lib/customTypeArrayNode.class.js +25 -0
- package/build/main/lib/customTypeNode.class.d.ts +23 -0
- package/build/main/lib/customTypeNode.class.js +71 -0
- package/build/main/lib/enumNode.class.d.ts +10 -0
- package/build/main/lib/enumNode.class.js +108 -0
- package/build/main/lib/i18nGenerator.d.ts +18 -0
- package/build/main/lib/i18nGenerator.js +135 -0
- package/build/main/lib/i18nNode.class.d.ts +43 -0
- package/build/main/lib/i18nNode.class.js +145 -0
- package/build/main/lib/index.d.ts +31 -0
- package/build/main/lib/index.js +34 -0
- package/build/main/lib/languageNode.class.d.ts +7 -0
- package/build/main/lib/languageNode.class.js +16 -0
- package/build/main/lib/namespaceNode.class.d.ts +6 -0
- package/build/main/lib/namespaceNode.class.js +16 -0
- package/build/main/lib/rootNode.class.d.ts +15 -0
- package/build/main/lib/rootNode.class.js +46 -0
- package/build/main/lib/stringUtil.d.ts +1 -0
- package/build/main/lib/stringUtil.js +7 -0
- package/build/main/lib/textArrayNode.class.d.ts +9 -0
- package/build/main/lib/textArrayNode.class.js +48 -0
- package/build/main/lib/textNode.class.d.ts +17 -0
- package/build/main/lib/textNode.class.js +117 -0
- package/build/main/lib/valueNode.class.d.ts +12 -0
- package/build/main/lib/valueNode.class.js +47 -0
- package/build/main/lib/writer.class.d.ts +10 -0
- package/build/main/lib/writer.class.js +29 -0
- package/build/module/index.d.ts +1 -0
- package/build/module/index.js +2 -0
- package/build/module/lib/arg.class.d.ts +11 -0
- package/build/module/lib/arg.class.js +24 -0
- package/build/module/lib/arguments.class.d.ts +20 -0
- package/build/module/lib/arguments.class.js +52 -0
- package/build/module/lib/ast/abstractContainerElement.d.ts +9 -0
- package/build/module/lib/ast/abstractContainerElement.js +21 -0
- package/build/module/lib/ast/abstractElement.d.ts +16 -0
- package/build/module/lib/ast/abstractElement.js +36 -0
- package/build/module/lib/ast/classDef.class.d.ts +9 -0
- package/build/module/lib/ast/classDef.class.js +22 -0
- package/build/module/lib/ast/containerElement.class.d.ts +17 -0
- package/build/module/lib/ast/containerElement.class.js +1 -0
- package/build/module/lib/ast/element.class.d.ts +12 -0
- package/build/module/lib/ast/element.class.js +1 -0
- package/build/module/lib/ast/functionDef.class.d.ts +10 -0
- package/build/module/lib/ast/functionDef.class.js +13 -0
- package/build/module/lib/ast/interfaceDef.class.d.ts +9 -0
- package/build/module/lib/ast/interfaceDef.class.js +23 -0
- package/build/module/lib/ast/moduleDef.class.d.ts +8 -0
- package/build/module/lib/ast/moduleDef.class.js +39 -0
- package/build/module/lib/ast/namespaceDef.class.d.ts +18 -0
- package/build/module/lib/ast/namespaceDef.class.js +60 -0
- package/build/module/lib/ast/objectDef.class.d.ts +24 -0
- package/build/module/lib/ast/objectDef.class.js +59 -0
- package/build/module/lib/ast/tempContainer.class.d.ts +4 -0
- package/build/module/lib/ast/tempContainer.class.js +9 -0
- package/build/module/lib/ast/typeDef.class.d.ts +7 -0
- package/build/module/lib/ast/typeDef.class.js +11 -0
- package/build/module/lib/bin/cli.d.ts +2 -0
- package/build/module/lib/bin/cli.js +42 -0
- package/build/module/lib/constructor.class.d.ts +3 -0
- package/build/module/lib/constructor.class.js +1 -0
- package/build/module/lib/customTypeArrayNode.class.d.ts +10 -0
- package/build/module/lib/customTypeArrayNode.class.js +22 -0
- package/build/module/lib/customTypeNode.class.d.ts +23 -0
- package/build/module/lib/customTypeNode.class.js +68 -0
- package/build/module/lib/enumNode.class.d.ts +10 -0
- package/build/module/lib/enumNode.class.js +105 -0
- package/build/module/lib/i18nGenerator.d.ts +18 -0
- package/build/module/lib/i18nGenerator.js +124 -0
- package/build/module/lib/i18nNode.class.d.ts +43 -0
- package/build/module/lib/i18nNode.class.js +132 -0
- package/build/module/lib/index.d.ts +31 -0
- package/build/module/lib/index.js +29 -0
- package/build/module/lib/languageNode.class.d.ts +7 -0
- package/build/module/lib/languageNode.class.js +13 -0
- package/build/module/lib/namespaceNode.class.d.ts +6 -0
- package/build/module/lib/namespaceNode.class.js +13 -0
- package/build/module/lib/rootNode.class.d.ts +15 -0
- package/build/module/lib/rootNode.class.js +43 -0
- package/build/module/lib/stringUtil.d.ts +1 -0
- package/build/module/lib/stringUtil.js +4 -0
- package/build/module/lib/textArrayNode.class.d.ts +9 -0
- package/build/module/lib/textArrayNode.class.js +38 -0
- package/build/module/lib/textNode.class.d.ts +17 -0
- package/build/module/lib/textNode.class.js +104 -0
- package/build/module/lib/valueNode.class.d.ts +12 -0
- package/build/module/lib/valueNode.class.js +37 -0
- package/build/module/lib/writer.class.d.ts +10 -0
- package/build/module/lib/writer.class.js +26 -0
- package/package.json +122 -0
package/package.json
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@coolon/i18n-resource-generator",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Generates typescript classes from yml resource bundles using the icu message format",
|
|
5
|
+
"main": "build/main/index.js",
|
|
6
|
+
"typings": "build/main/index.d.ts",
|
|
7
|
+
"module": "build/module/index.js",
|
|
8
|
+
"repository": "https://github.com/YOUR_GITHUB_USER_NAME/i18n-resource-generator",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"keywords": [],
|
|
11
|
+
"bin": {
|
|
12
|
+
"i18n-resource-generator": "./build/main/lib/bin/cli.js"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"describe": "npm-scripts-info",
|
|
16
|
+
"barrels": "run-s barrels:*",
|
|
17
|
+
"barrels:lib": "barrelsby --delete --directory ./src/lib",
|
|
18
|
+
"build": "run-s clean && run-p build:*",
|
|
19
|
+
"build:main": "tsc -p tsconfig.json",
|
|
20
|
+
"build:module": "tsc -p tsconfig.module.json",
|
|
21
|
+
"fix": "run-s fix:*",
|
|
22
|
+
"fix:prettier": "prettier \"src/**/*.ts\" --write",
|
|
23
|
+
"fix:tslint": "tslint --fix --project .",
|
|
24
|
+
"test": "run-s build test:unit",
|
|
25
|
+
"test:lint": "tslint --project . && prettier \"src/**/*.ts\" --list-different",
|
|
26
|
+
"test:unit": "nyc mocha --opts=\"./src/test/mocha.opts\"",
|
|
27
|
+
"watch": "run-s clean build:main && run-p \"build:main -- -w\" \"test:unit -- --watch\"",
|
|
28
|
+
"cov": "run-s build test:unit cov:html && opn coverage/index.html",
|
|
29
|
+
"cov:html": "nyc report --reporter=html",
|
|
30
|
+
"cov:send": "nyc report --reporter=lcov > coverage.lcov && codecov",
|
|
31
|
+
"cov:check": "nyc report && nyc check-coverage --lines 100 --functions 100 --branches 100",
|
|
32
|
+
"doc": "run-s doc:html && opn build/docs/index.html",
|
|
33
|
+
"doc:html": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --out build/docs",
|
|
34
|
+
"doc:json": "typedoc src/ --exclude **/*.spec.ts --target ES6 --mode file --json build/docs/typedoc.json",
|
|
35
|
+
"doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs",
|
|
36
|
+
"version": "standard-version",
|
|
37
|
+
"reset": "git clean -dfx && git reset --hard && npm i",
|
|
38
|
+
"clean": "trash build",
|
|
39
|
+
"all": "run-s reset test cov:check doc:html",
|
|
40
|
+
"prepare-release": "run-s all version doc:publish",
|
|
41
|
+
"debug": "i18n-resource-generator 'test/fixtures/*.yml' out.ts"
|
|
42
|
+
},
|
|
43
|
+
"scripts-info": {
|
|
44
|
+
"info": "Display information about the package scripts",
|
|
45
|
+
"build": "Clean and rebuild the project",
|
|
46
|
+
"fix": "Try to automatically fix any linting problems",
|
|
47
|
+
"test": "Lint and unit test the project",
|
|
48
|
+
"watch": "Watch and rebuild the project on save, then rerun relevant tests",
|
|
49
|
+
"cov": "Rebuild, run tests, then create and open the coverage report",
|
|
50
|
+
"doc": "Generate HTML API documentation and open it in a browser",
|
|
51
|
+
"doc:json": "Generate API documentation in typedoc JSON format",
|
|
52
|
+
"version": "Bump package.json version, update CHANGELOG.md, tag release",
|
|
53
|
+
"reset": "Delete all untracked files and reset the repo to the last commit",
|
|
54
|
+
"prepare-release": "One-step: clean, build, test, publish docs, and prep a release"
|
|
55
|
+
},
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=8.9"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"barrelsby": "^2.1.1",
|
|
61
|
+
"format-message-parse": "^5.1.0",
|
|
62
|
+
"glob": "^7.1.3",
|
|
63
|
+
"intl-messageformat-parser": "^1.2.0",
|
|
64
|
+
"js-yaml": "^3.7.0",
|
|
65
|
+
"lodash": "^4.17.2",
|
|
66
|
+
"string": "^3.3.3",
|
|
67
|
+
"through2": "^2.0.3",
|
|
68
|
+
"vinyl": "^2.0.1"
|
|
69
|
+
},
|
|
70
|
+
"devDependencies": {
|
|
71
|
+
"@types/chai": "^4.1.7",
|
|
72
|
+
"@types/js-yaml": "^3.5.29",
|
|
73
|
+
"@types/lodash": "^4.14.44",
|
|
74
|
+
"@types/mocha": "^5.2.6",
|
|
75
|
+
"@types/node": "^6.0.52",
|
|
76
|
+
"@types/string": "0.0.28",
|
|
77
|
+
"@types/through2": "^2.0.32",
|
|
78
|
+
"@types/vinyl": "^2.0.0",
|
|
79
|
+
"ava": "1.0.0-beta.7",
|
|
80
|
+
"chai": "^4.2.0",
|
|
81
|
+
"codecov": "^3.1.0",
|
|
82
|
+
"commander": "^2.20.0",
|
|
83
|
+
"cz-conventional-changelog": "^2.1.0",
|
|
84
|
+
"gh-pages": "^2.0.1",
|
|
85
|
+
"mocha": "^6.1.4",
|
|
86
|
+
"npm-run-all": "^4.1.5",
|
|
87
|
+
"nyc": "^13.1.0",
|
|
88
|
+
"object-inspect": "^1.2.1",
|
|
89
|
+
"opn-cli": "^4.0.0",
|
|
90
|
+
"prettier": "^1.15.2",
|
|
91
|
+
"standard-version": "^4.4.0",
|
|
92
|
+
"trash-cli": "^1.4.0",
|
|
93
|
+
"ts-node": "^8.1.0",
|
|
94
|
+
"tslint": "^5.11.0",
|
|
95
|
+
"tslint-config-prettier": "^1.17.0",
|
|
96
|
+
"tslint-immutable": "^5.0.0",
|
|
97
|
+
"typedoc": "^0.13.0",
|
|
98
|
+
"typescript": "^3.1.6"
|
|
99
|
+
},
|
|
100
|
+
"ava": {
|
|
101
|
+
"failFast": true,
|
|
102
|
+
"files": [
|
|
103
|
+
"build/main/**/*.spec.js"
|
|
104
|
+
],
|
|
105
|
+
"sources": [
|
|
106
|
+
"build/main/**/*.js"
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"config": {
|
|
110
|
+
"commitizen": {
|
|
111
|
+
"path": "cz-conventional-changelog"
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"prettier": {
|
|
115
|
+
"singleQuote": true
|
|
116
|
+
},
|
|
117
|
+
"nyc": {
|
|
118
|
+
"exclude": [
|
|
119
|
+
"**/*.spec.js"
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
}
|