emnj-tool 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/h5/h5.js +4 -1
- package/package.json +1 -1
- package/src/h5/h5.ts +5 -1
- package/.prettierrc +0 -20
- package/.vscode/launch.json +0 -21
- package/.vscode/settings.json +0 -5
package/dist/h5/h5.js
CHANGED
@@ -20,7 +20,10 @@ export default class InitH5 {
|
|
20
20
|
* unzip h5 template to current workspace path
|
21
21
|
*/
|
22
22
|
unzipH5Template(targetDirPath) {
|
23
|
-
|
23
|
+
// process.cwd() 获取当前执行node命令时候的文件夹(工作区)目录名
|
24
|
+
// 获取当前执行文件的目录,即CLI工具的目录
|
25
|
+
const rootDir = __dirname;
|
26
|
+
const templatePath = path.join(rootDir, "./templates/ts-h5.zip");
|
24
27
|
fse
|
25
28
|
.createReadStream(templatePath)
|
26
29
|
.pipe(unzipper.Extract({ path: targetDirPath }))
|
package/package.json
CHANGED
package/src/h5/h5.ts
CHANGED
@@ -23,7 +23,11 @@ export default class InitH5 {
|
|
23
23
|
* unzip h5 template to current workspace path
|
24
24
|
*/
|
25
25
|
unzipH5Template(targetDirPath: string) {
|
26
|
-
|
26
|
+
// process.cwd() 获取当前执行node命令时候的文件夹(工作区)目录名
|
27
|
+
// 获取当前执行文件的目录,即CLI工具的目录
|
28
|
+
const rootDir = __dirname;
|
29
|
+
const templatePath = path.join(rootDir, "./templates/ts-h5.zip");
|
30
|
+
|
27
31
|
fse
|
28
32
|
.createReadStream(templatePath)
|
29
33
|
.pipe(unzipper.Extract({ path: targetDirPath }))
|
package/.prettierrc
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"printWidth": 80,
|
3
|
-
"tabWidth": 2,
|
4
|
-
"useTabs": false,
|
5
|
-
"semi": true,
|
6
|
-
"singleQuote": false,
|
7
|
-
"quoteProps": "as-needed",
|
8
|
-
"jsxSingleQuote": false,
|
9
|
-
"trailingComma": "es5",
|
10
|
-
"bracketSpacing": true,
|
11
|
-
"jsxBracketSameLine": false,
|
12
|
-
"arrowParens": "always",
|
13
|
-
"rangeStart": 0,
|
14
|
-
"requirePragma": false,
|
15
|
-
"insertPragma": false,
|
16
|
-
"proseWrap": "preserve",
|
17
|
-
"htmlWhitespaceSensitivity": "css",
|
18
|
-
"vueIndentScriptAndStyle": false,
|
19
|
-
"endOfLine": "auto"
|
20
|
-
}
|
package/.vscode/launch.json
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
{
|
2
|
-
// Use IntelliSense to learn about possible attributes.
|
3
|
-
// Hover to view descriptions of existing attributes.
|
4
|
-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
5
|
-
"version": "0.2.0",
|
6
|
-
"configurations": [
|
7
|
-
{
|
8
|
-
"type": "node",
|
9
|
-
"request": "launch",
|
10
|
-
"name": "Launch Program",
|
11
|
-
"skipFiles": [
|
12
|
-
"<node_internals>/**"
|
13
|
-
],
|
14
|
-
"program": "${workspaceFolder}/src/index.ts",
|
15
|
-
"preLaunchTask": "tsc: build - tsconfig.json",
|
16
|
-
"outFiles": [
|
17
|
-
"${workspaceFolder}/dist/**/*.js"
|
18
|
-
]
|
19
|
-
}
|
20
|
-
]
|
21
|
-
}
|