create-webpack-starter 0.2.5 → 0.2.6

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/CHANGELOG.md CHANGED
@@ -1,6 +1,21 @@
1
1
  # Changelog
2
2
 
3
- ## [0.2.4] - 2026-02-07
3
+ ## [0.2.6] - 2026-02-08
4
+
5
+ ### Fixed
6
+ - Ignored `node_modules/` and `dist/` directories when copying templates
7
+ - Prevented leaking local development artifacts into generated projects
8
+
9
+ ### Improved
10
+ - Better developer experience for local template development
11
+ - More predictable project output regardless of template workspace state
12
+
13
+ ### Notes
14
+ - No changes to CLI API or user-facing commands
15
+ - Templates remain fully standalone after generation
16
+
17
+
18
+ ## [0.2.4 - 0.2.5] - 2026-02-07
4
19
 
5
20
  ### Added
6
21
  - End-to-end (E2E) test suite for CLI behavior
package/dist/copier.js CHANGED
@@ -5,10 +5,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.copyTemplate = copyTemplate;
7
7
  const fs_extra_1 = __importDefault(require("fs-extra"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const IGNORED_DIRS = [
10
+ 'node_modules',
11
+ 'dist',
12
+ ];
8
13
  /**
9
14
  * Copy template directory into target directory.
10
15
  * Assumes targetDir does NOT exist.
16
+ * Ignores development-only directories.
11
17
  */
12
18
  async function copyTemplate(templatePath, targetDir) {
13
- await fs_extra_1.default.copy(templatePath, targetDir);
19
+ await fs_extra_1.default.copy(templatePath, targetDir, {
20
+ filter: (src) => {
21
+ const relative = path_1.default.relative(templatePath, src);
22
+ // allow root itself
23
+ if (!relative)
24
+ return true;
25
+ return !IGNORED_DIRS.some((dir) => relative === dir || relative.startsWith(`${dir}${path_1.default.sep}`));
26
+ }
27
+ });
14
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-webpack-starter",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Create a webpack starter with Pug, SCSS, TS and more",
5
5
  "bin": {
6
6
  "create-webpack-starter": "bin/index.js"