@modern-js/entry-generator 1.4.2 → 1.4.3
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 +9 -8
- package/package.json +43 -9
- package/templates/main.css +2 -2
- package/templates/main.handlebars +2 -2
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) {
|
|
@@ -283198,16 +283201,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
283198
283201
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
283199
283202
|
exports.readTsConfigByFile = exports.readTsConfig = void 0;
|
|
283200
283203
|
const path_1 = __importDefault(__webpack_require__(71017));
|
|
283204
|
+
const compiled_1 = __webpack_require__(62046);
|
|
283201
283205
|
const readTsConfig = (root) => {
|
|
283202
|
-
|
|
283203
|
-
const typescript = __webpack_require__(40237);
|
|
283204
|
-
return typescript.readConfigFile(path_1.default.resolve(root, './tsconfig.json'), typescript.sys.readFile).config;
|
|
283206
|
+
return (0, exports.readTsConfigByFile)(path_1.default.resolve(root, './tsconfig.json'));
|
|
283205
283207
|
};
|
|
283206
283208
|
exports.readTsConfig = readTsConfig;
|
|
283207
283209
|
const readTsConfigByFile = (filename) => {
|
|
283208
|
-
|
|
283209
|
-
|
|
283210
|
-
return typescript.readConfigFile(path_1.default.resolve(filename), typescript.sys.readFile).config;
|
|
283210
|
+
const content = compiled_1.fs.readFileSync(path_1.default.resolve(filename), 'utf-8');
|
|
283211
|
+
return compiled_1.json5.parse(content);
|
|
283211
283212
|
};
|
|
283212
283213
|
exports.readTsConfigByFile = readTsConfigByFile;
|
|
283213
283214
|
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "1.4.
|
|
14
|
+
"version": "1.4.3",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"main": "./dist/js/node/main.js",
|
|
17
17
|
"files": [
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"@modern-js/codesmith-api-json": "^1.0.7",
|
|
26
26
|
"@modern-js/codesmith-api-handlebars": "^1.0.0",
|
|
27
27
|
"@modern-js/codesmith-tools": "^1.1.2",
|
|
28
|
-
"@modern-js/generator-common": "1.4.
|
|
29
|
-
"@modern-js/generator-utils": "1.2.
|
|
30
|
-
"@modern-js/plugin-i18n": "1.2.
|
|
31
|
-
"@modern-js/utils": "1.7.
|
|
32
|
-
"@types/jest": "^
|
|
28
|
+
"@modern-js/generator-common": "1.4.11",
|
|
29
|
+
"@modern-js/generator-utils": "1.2.5",
|
|
30
|
+
"@modern-js/plugin-i18n": "1.2.6",
|
|
31
|
+
"@modern-js/utils": "1.7.3",
|
|
32
|
+
"@types/jest": "^27",
|
|
33
33
|
"@types/node": "^14",
|
|
34
34
|
"typescript": "^4",
|
|
35
35
|
"@scripts/build": "0.0.0",
|
|
@@ -48,11 +48,45 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"types": "./src/index.ts",
|
|
51
|
+
"wireit": {
|
|
52
|
+
"build": {
|
|
53
|
+
"command": "modern build",
|
|
54
|
+
"files": [
|
|
55
|
+
"src/**/*",
|
|
56
|
+
"tsconfig.json",
|
|
57
|
+
"package.json"
|
|
58
|
+
],
|
|
59
|
+
"output": [
|
|
60
|
+
"dist/**/*",
|
|
61
|
+
"!dist/node/main.js"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"build:csmith": {
|
|
65
|
+
"command": "csmith-tools build",
|
|
66
|
+
"files": [
|
|
67
|
+
"src/**/*",
|
|
68
|
+
"tsconfig.json",
|
|
69
|
+
"package.json"
|
|
70
|
+
],
|
|
71
|
+
"output": [
|
|
72
|
+
"dist/node/main.js"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"test": {
|
|
76
|
+
"command": "jest --passWithNoTests",
|
|
77
|
+
"files": [
|
|
78
|
+
"src/**/*",
|
|
79
|
+
"tsconfig.json",
|
|
80
|
+
"package.json"
|
|
81
|
+
],
|
|
82
|
+
"output": []
|
|
83
|
+
}
|
|
84
|
+
},
|
|
51
85
|
"scripts": {
|
|
52
86
|
"new": "modern new",
|
|
53
|
-
"build": "
|
|
54
|
-
"build:csmith": "
|
|
55
|
-
"test": "
|
|
87
|
+
"build": "wireit",
|
|
88
|
+
"build:csmith": "wireit",
|
|
89
|
+
"test": "wireit"
|
|
56
90
|
},
|
|
57
91
|
"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"
|
|
58
92
|
}
|
package/templates/main.css
CHANGED
|
@@ -12,7 +12,7 @@ body {
|
|
|
12
12
|
box-sizing: border-box;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.container {
|
|
15
|
+
.container-box {
|
|
16
16
|
min-height: 100vh;
|
|
17
17
|
max-width: 100%;
|
|
18
18
|
display: flex;
|
|
@@ -81,7 +81,7 @@ main {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
.grid {
|
|
84
|
+
.container-box .grid {
|
|
85
85
|
display: flex;
|
|
86
86
|
align-items: center;
|
|
87
87
|
justify-content: center;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{{space}}<div className="container">
|
|
1
|
+
{{space}}<div className="container-box">
|
|
2
2
|
{{space}} <main>
|
|
3
3
|
{{space}} <div className="logo">
|
|
4
4
|
{{space}} <img
|
|
@@ -37,4 +37,4 @@
|
|
|
37
37
|
{{space}} Powered by Modern.js
|
|
38
38
|
{{space}} </a>
|
|
39
39
|
{{space}} </footer>
|
|
40
|
-
{{space}}</div>
|
|
40
|
+
{{space}}</div>
|