@masatomakino/gulptask-ejs 0.4.0 → 0.4.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/bin/index.d.ts +3 -2
- package/bin/index.d.ts.map +1 -1
- package/bin/index.js +4 -3
- package/package.json +7 -7
package/bin/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FSWatcher } from "chokidar";
|
|
1
2
|
/**
|
|
2
3
|
* ejs変換タスクを取得する。
|
|
3
4
|
* @param srcDir - 入力ディレクトリ ex) "./src/"
|
|
@@ -6,7 +7,7 @@
|
|
|
6
7
|
* @return gulpタスク
|
|
7
8
|
*/
|
|
8
9
|
export declare function generateTasks(srcDir: string, distDir: string, componentPatterns?: string | string[]): {
|
|
9
|
-
buildEJS:
|
|
10
|
-
watchEJS:
|
|
10
|
+
buildEJS: () => Promise<void>;
|
|
11
|
+
watchEJS: () => FSWatcher;
|
|
11
12
|
};
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
package/bin/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAiB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG/C;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GACpC;IACD,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,EAAE,MAAM,SAAS,CAAC;CAC3B,CA2BA"}
|
package/bin/index.js
CHANGED
|
@@ -20,17 +20,18 @@ export function generateTasks(srcDir, distDir, componentPatterns) {
|
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
const watchEJS = () => {
|
|
23
|
-
chokidar
|
|
23
|
+
return chokidar
|
|
24
24
|
.watch(path.resolve(srcDir, "**/*.ejs"))
|
|
25
25
|
.on("all", async (type, filePath) => {
|
|
26
26
|
console.log(`gulptask-ejs : [${type}] ${path.relative(srcDir, filePath)}`);
|
|
27
|
-
await buildEJS();
|
|
27
|
+
await tasks.buildEJS();
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
|
-
|
|
30
|
+
const tasks = {
|
|
31
31
|
buildEJS,
|
|
32
32
|
watchEJS,
|
|
33
33
|
};
|
|
34
|
+
return tasks;
|
|
34
35
|
}
|
|
35
36
|
/**
|
|
36
37
|
* 1つのejsファイルをrenderingして、ファイルに保存する
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masatomakino/gulptask-ejs",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "ejs compiler task for gulp.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
"gulptask-ejs": "bin/CLI.js"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"chokidar": "^3.
|
|
26
|
+
"chokidar": "^3.6.0",
|
|
27
27
|
"commander": "^11.1.0",
|
|
28
28
|
"ejs": "^3.1.9",
|
|
29
29
|
"glob": "^10.3.10"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/ejs": "^3.1.3",
|
|
33
|
-
"@types/node": "^20.
|
|
34
|
-
"@vitest/coverage-istanbul": "^0.
|
|
35
|
-
"husky": "^
|
|
33
|
+
"@types/node": "^20.11.17",
|
|
34
|
+
"@vitest/coverage-istanbul": "^1.0.4",
|
|
35
|
+
"husky": "^9.0.11",
|
|
36
36
|
"lint-staged": "^15.0.0",
|
|
37
37
|
"prettier": "^3.0.3",
|
|
38
38
|
"typescript": "^5.2.2",
|
|
39
|
-
"vitest": "^0.
|
|
39
|
+
"vitest": "^1.0.4"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "tsc",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"watchEJS": "npm run buildEJS -- -W",
|
|
49
49
|
"preversion": "git checkout main && git pull && npm ci && npx vitest --run",
|
|
50
50
|
"postversion": "git add package.json package-lock.json && git checkout -b version/$(git describe --tags --abbrev=0)",
|
|
51
|
-
"prepare": "husky
|
|
51
|
+
"prepare": "husky"
|
|
52
52
|
},
|
|
53
53
|
"bugs": {
|
|
54
54
|
"url": "https://github.com/MasatoMakino/gulptask-ejs/issues"
|