@masatomakino/gulptask-ejs 0.4.1 → 0.4.2

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.
@@ -1 +1 @@
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"}
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,CAgCA"}
package/bin/index.js CHANGED
@@ -21,8 +21,12 @@ export function generateTasks(srcDir, distDir, componentPatterns) {
21
21
  };
22
22
  const watchEJS = () => {
23
23
  return chokidar
24
- .watch(path.resolve(srcDir, "**/*.ejs"))
24
+ .watch(path.resolve(srcDir), {})
25
25
  .on("all", async (type, filePath) => {
26
+ const ext = path.extname(filePath);
27
+ if (ext !== ".ejs") {
28
+ return;
29
+ }
26
30
  console.log(`gulptask-ejs : [${type}] ${path.relative(srcDir, filePath)}`);
27
31
  await tasks.buildEJS();
28
32
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masatomakino/gulptask-ejs",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "ejs compiler task for gulp.js",
5
5
  "type": "module",
6
6
  "exports": {
@@ -23,20 +23,19 @@
23
23
  "gulptask-ejs": "bin/CLI.js"
24
24
  },
25
25
  "dependencies": {
26
- "chokidar": "^3.6.0",
27
- "commander": "^11.1.0",
26
+ "chokidar": "^4.0.0",
27
+ "commander": "^12.0.0",
28
28
  "ejs": "^3.1.9",
29
- "glob": "^10.3.10"
29
+ "glob": "^11.0.0"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/ejs": "^3.1.3",
33
- "@types/node": "^20.11.17",
34
- "@vitest/coverage-istanbul": "^1.0.4",
33
+ "@types/node": "^22.0.2",
34
+ "@vitest/coverage-istanbul": "^2.0.5",
35
35
  "husky": "^9.0.11",
36
36
  "lint-staged": "^15.0.0",
37
37
  "prettier": "^3.0.3",
38
- "typescript": "^5.2.2",
39
- "vitest": "^1.0.4"
38
+ "typescript": "^5.2.2"
40
39
  },
41
40
  "scripts": {
42
41
  "build": "tsc",
@@ -44,11 +43,20 @@
44
43
  "test": "vitest",
45
44
  "coverage": "vitest --run --coverage",
46
45
  "testRun": "node bin/CLI.js --srcDir ./testEjs --distDir ./dist --componentPatterns '**/_*.ejs'",
47
- "buildEJS": "npx @masatomakino/gulptask-ejs --srcDir ./testEjs --distDir ./dist --componentPatterns '**/_*.ejs'",
48
- "watchEJS": "npm run buildEJS -- -W",
46
+ "testWatch": "node bin/CLI.js --srcDir ./testEjs --distDir ./dist --componentPatterns '**/_*.ejs' --watch",
47
+ "prepare": "husky",
49
48
  "preversion": "git checkout main && git pull && npm ci && npx vitest --run",
50
- "postversion": "git add package.json package-lock.json && git checkout -b version/$(git describe --tags --abbrev=0)",
51
- "prepare": "husky"
49
+ "postversion": "npm run version-add-package-files && npm run version-checkout && npm run version-push && npm run version-pull-request",
50
+ "version-add-package-files": "git add package.json package-lock.json",
51
+ "version-checkout": "git checkout -b version/$(git describe --tags --abbrev=0)",
52
+ "version-push": "git push --set-upstream origin version/$(git describe --tags --abbrev=0)",
53
+ "version-pull-request": "gh pr create --fill --base main --head version/$(git describe --tags --abbrev=0) | grep -o 'https.*github.*' | xargs gh pr view --web",
54
+ "release": "npm run release-check-merged && npm run release-check-tag-exists && npm run release-push-tags && npm run release-create-draft && npm run release-open-draft",
55
+ "release-check-merged": "git fetch origin && git branch --merged origin/main | grep version/$(git describe --tags --abbrev=0) || (echo 'Branch not merged' && exit 1)",
56
+ "release-check-tag-exists": "git fetch --tags && (git ls-remote --tags origin | grep -q $(git describe --tags --abbrev=0) && echo 'Tag already exists' && exit 1 || exit 0)",
57
+ "release-push-tags": "git push origin $(git describe --tags --abbrev=0)",
58
+ "release-create-draft": "gh release create $(git describe --tags --abbrev=0) --generate-notes --verify-tag --draft",
59
+ "release-open-draft": "gh release view $(git describe --tags --abbrev=0) --web"
52
60
  },
53
61
  "bugs": {
54
62
  "url": "https://github.com/MasatoMakino/gulptask-ejs/issues"