@modern-js/mwa-generator 2.0.0 → 2.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/dist/js/node/main.js
CHANGED
|
@@ -278042,10 +278042,13 @@ var _lodash = __webpack_require__(91462);
|
|
|
278042
278042
|
|
|
278043
278043
|
var _utils = __webpack_require__(84032);
|
|
278044
278044
|
|
|
278045
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
278046
|
+
|
|
278045
278047
|
class I18n {
|
|
278046
278048
|
constructor() {
|
|
278047
|
-
this
|
|
278048
|
-
|
|
278049
|
+
_defineProperty(this, "language", 'en');
|
|
278050
|
+
|
|
278051
|
+
_defineProperty(this, "languageMap", {});
|
|
278049
278052
|
}
|
|
278050
278053
|
|
|
278051
278054
|
format(msg, vars) {
|
|
@@ -283154,16 +283157,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
283154
283157
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
283155
283158
|
exports.readTsConfigByFile = exports.readTsConfig = void 0;
|
|
283156
283159
|
const path_1 = __importDefault(__webpack_require__(71017));
|
|
283160
|
+
const compiled_1 = __webpack_require__(62046);
|
|
283157
283161
|
const readTsConfig = (root) => {
|
|
283158
|
-
|
|
283159
|
-
const typescript = __webpack_require__(40237);
|
|
283160
|
-
return typescript.readConfigFile(path_1.default.resolve(root, './tsconfig.json'), typescript.sys.readFile).config;
|
|
283162
|
+
return (0, exports.readTsConfigByFile)(path_1.default.resolve(root, './tsconfig.json'));
|
|
283161
283163
|
};
|
|
283162
283164
|
exports.readTsConfig = readTsConfig;
|
|
283163
283165
|
const readTsConfigByFile = (filename) => {
|
|
283164
|
-
|
|
283165
|
-
|
|
283166
|
-
return typescript.readConfigFile(path_1.default.resolve(filename), typescript.sys.readFile).config;
|
|
283166
|
+
const content = compiled_1.fs.readFileSync(path_1.default.resolve(filename), 'utf-8');
|
|
283167
|
+
return compiled_1.json5.parse(content);
|
|
283167
283168
|
};
|
|
283168
283169
|
exports.readTsConfigByFile = readTsConfigByFile;
|
|
283169
283170
|
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.0.
|
|
14
|
+
"version": "2.0.1",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"main": "./dist/js/node/main.js",
|
|
17
17
|
"files": [
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"@modern-js/codesmith-api-app": "^1.0.10",
|
|
26
26
|
"@modern-js/codesmith-api-json": "^1.0.7",
|
|
27
27
|
"@modern-js/codesmith-tools": "^1.1.2",
|
|
28
|
-
"@modern-js/entry-generator": "1.4.
|
|
28
|
+
"@modern-js/entry-generator": "1.4.3",
|
|
29
29
|
"@modern-js/electron-generator": "1.3.2",
|
|
30
30
|
"@modern-js/dependence-generator": "1.3.2",
|
|
31
|
-
"@modern-js/generator-common": "1.4.
|
|
32
|
-
"@modern-js/generator-utils": "1.2.
|
|
33
|
-
"@modern-js/plugin-i18n": "1.2.
|
|
34
|
-
"@types/jest": "^
|
|
31
|
+
"@modern-js/generator-common": "1.4.11",
|
|
32
|
+
"@modern-js/generator-utils": "1.2.5",
|
|
33
|
+
"@modern-js/plugin-i18n": "1.2.6",
|
|
34
|
+
"@types/jest": "^27",
|
|
35
35
|
"@types/node": "^14",
|
|
36
36
|
"typescript": "^4",
|
|
37
37
|
"@scripts/build": "0.0.0",
|
|
@@ -50,11 +50,45 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"types": "./src/index.ts",
|
|
53
|
+
"wireit": {
|
|
54
|
+
"build": {
|
|
55
|
+
"command": "modern build",
|
|
56
|
+
"files": [
|
|
57
|
+
"src/**/*",
|
|
58
|
+
"tsconfig.json",
|
|
59
|
+
"package.json"
|
|
60
|
+
],
|
|
61
|
+
"output": [
|
|
62
|
+
"dist/**/*",
|
|
63
|
+
"!dist/node/main.js"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"build:csmith": {
|
|
67
|
+
"command": "csmith-tools build",
|
|
68
|
+
"files": [
|
|
69
|
+
"src/**/*",
|
|
70
|
+
"tsconfig.json",
|
|
71
|
+
"package.json"
|
|
72
|
+
],
|
|
73
|
+
"output": [
|
|
74
|
+
"dist/node/main.js"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"test": {
|
|
78
|
+
"command": "jest --passWithNoTests",
|
|
79
|
+
"files": [
|
|
80
|
+
"src/**/*",
|
|
81
|
+
"tsconfig.json",
|
|
82
|
+
"package.json"
|
|
83
|
+
],
|
|
84
|
+
"output": []
|
|
85
|
+
}
|
|
86
|
+
},
|
|
53
87
|
"scripts": {
|
|
54
88
|
"new": "modern new",
|
|
55
|
-
"build": "
|
|
56
|
-
"build:csmith": "
|
|
57
|
-
"test": "
|
|
89
|
+
"build": "wireit",
|
|
90
|
+
"build:csmith": "wireit",
|
|
91
|
+
"test": "wireit"
|
|
58
92
|
},
|
|
59
93
|
"readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
|
|
60
94
|
}
|