create-webpack-starter 0.2.0 → 0.2.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/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ ## [0.2.1] - 2026-02-06
4
+
5
+ ### Added
6
+ - Documentation section to README
7
+ - Initial `docs/` directory with usage and templates overview
8
+
9
+ ### Changed
10
+ - Included `docs`, `README.md`, `LICENSE`, and `CHANGELOG.md` in npm package
11
+
12
+
13
+ ## [0.2.0] - 2026-02-06
14
+
15
+ ### Added
16
+ - Initial public release of `create-webpack-starter`
17
+ - Interactive CLI for creating webpack projects
18
+ - Support for Pug templates
19
+ - SCSS / Less styles
20
+ - JavaScript and TypeScript variants
21
+ - Automatic dependency installation
22
+
23
+ ### Notes
24
+ - Designed to work with `@razerspine/webpack-core`
25
+ - Requires Node.js >= 18
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Create a modern webpack project using ready-to-use templates.
4
4
 
5
+ ---
6
+
5
7
  ## Usage
6
8
 
7
9
  ```bash
@@ -16,6 +18,8 @@ npx create-webpack-starter my-app \
16
18
  --no-install
17
19
  ```
18
20
 
21
+ ---
22
+
19
23
  ## Options
20
24
 
21
25
  | Option | Description |
@@ -24,22 +28,47 @@ npx create-webpack-starter my-app \
24
28
  | `--no-install` | Skip dependency installation |
25
29
  | `--dry-run` | Show what would be done |
26
30
 
31
+ ---
32
+
27
33
  ## Available templates
28
34
  * pug-less-js
29
35
  * pug-less-ts
30
36
  * pug-scss-js
31
37
  * pug-scss-ts
32
38
 
39
+ ---
40
+
41
+ ## Documentation
42
+
43
+ Detailed documentation is available in the `/docs` directory:
44
+
45
+ - [Getting Started](./docs/getting-started.md)
46
+ - [Templates](./docs/templates.md)
47
+ - [webpack-core](./docs/webpack-core.md)
48
+ - [FAQ](./docs/faq.md)
49
+
50
+ The documentation explains:
51
+ - how the CLI works internally
52
+ - how templates are structured
53
+ - design principles behind `@razerspine/webpack-core`
54
+ - common customization patterns
55
+
56
+ ---
57
+
33
58
  ## Requirement
34
59
  * Node.js >= 18
35
60
  * npm/ pnpm/ yarn
36
61
 
62
+ ---
63
+
37
64
  ## How it works
38
65
  1. CLI copies the selected template
39
66
  2. Template files are written to the target directory
40
67
  3. Dependencies are installed (unless disabled)
41
68
  4. Project is ready to use
42
69
 
70
+ ---
71
+
43
72
  ## What you get
44
73
  - Preconfigured webpack setup
45
74
  - Pug templates
@@ -47,5 +76,7 @@ npx create-webpack-starter my-app \
47
76
  - JavaScript or TypeScript
48
77
  - Production-ready build
49
78
 
79
+ ---
80
+
50
81
  ## 📄 License
51
82
  This project is licensed under the ISC License.
package/docs/faq.md ADDED
@@ -0,0 +1,44 @@
1
+ # FAQ
2
+
3
+ ---
4
+
5
+ ## Is this a replacement for Vite / CRA?
6
+
7
+ No.
8
+
9
+ This tool is designed for:
10
+ - static sites
11
+ - CMS integrations
12
+ - full control over markup
13
+ - Pug-based workflows
14
+
15
+ ---
16
+
17
+ ## Can I modify webpack config after creation?
18
+
19
+ Yes.
20
+ The generated project is fully editable.
21
+ No hidden abstractions.
22
+
23
+ ---
24
+
25
+ ## Why Pug?
26
+
27
+ Pug is still widely used in:
28
+ - CMS theming
29
+ - static site generation
30
+ - component-based HTML workflows
31
+
32
+ ---
33
+
34
+ ## Can I add React / Vue later?
35
+
36
+ Yes, but it’s not the primary goal.
37
+ This starter focuses on template-driven projects.
38
+
39
+ ---
40
+
41
+ ## Where to report issues?
42
+
43
+ GitHub:
44
+ https://github.com/Razerspine/webpack-starter-monorepo
@@ -0,0 +1,72 @@
1
+ # Getting Started
2
+
3
+ `create-webpack-starter` is a CLI tool to quickly scaffold a modern
4
+ webpack-based project using Pug templates and popular style/script stacks.
5
+
6
+ ---
7
+
8
+ ## Requirements
9
+
10
+ - Node.js >= 18
11
+ - npm (or pnpm / yarn)
12
+
13
+ ---
14
+
15
+ ## Create a project
16
+
17
+ ```bash
18
+ npx create-webpack-starter my-app
19
+ cd my-app
20
+ npm run dev
21
+ ```
22
+ #### This will:
23
+
24
+ * Ask you to choose a template
25
+ * Copy the template files
26
+ * Merge dependencies
27
+ * Install packages
28
+ * Prepare a ready-to-run project
29
+
30
+ ---
31
+
32
+ ## Available scripts
33
+
34
+ ```bash
35
+ npm run dev # start webpack-dev-server
36
+ npm run build # production build
37
+ npm run preview # serve dist folder locally
38
+ ```
39
+
40
+ ---
41
+
42
+ ## Project structure (example)
43
+ ```md
44
+ my-app/
45
+ ├── src
46
+ │ ├── assets
47
+ │ │ ├── fonts
48
+ │ │ ├── i18n
49
+ │ │ ├── icons
50
+ │ │ ├── images
51
+ │ │ │ ├── favicons
52
+ │ │ ├── scripts
53
+ │ │ │ ├── modules
54
+ │ │ │ └── utils
55
+ │ │ └── styles
56
+ │ └── views
57
+ │ ├── layout
58
+ │ ├── mixins
59
+ │ └── pages
60
+ │ ├── 404
61
+ │ └── home
62
+ ├── package.json
63
+ └── webpack.config.js
64
+ ```
65
+
66
+ ---
67
+
68
+ ## Next steps
69
+
70
+ * Customize webpack.config.js
71
+ * Adjust aliases and paths
72
+ * Start building pages in src/views/pages
@@ -0,0 +1,43 @@
1
+ # Templates
2
+
3
+ `create-webpack-starter` ships with ready-to-use templates based on real
4
+ production setups.
5
+
6
+ ---
7
+
8
+ ## Available templates
9
+
10
+ | Template | Pug | Styles | Scripts |
11
+ |-----------------|-----|--------|---------|
12
+ | pug-less-js | ✅ | Less | JS |
13
+ | pug-less-ts | ✅ | Less | TS |
14
+ | pug-scss-js | ✅ | SCSS | JS |
15
+ | pug-scss-ts | ✅ | SCSS | TS |
16
+
17
+ ---
18
+
19
+ ## How templates work
20
+
21
+ Each template provides:
22
+ - A complete `webpack.config.js`
23
+ - Folder structure
24
+ - Preconfigured loaders
25
+ - Aliases for assets and views
26
+ - Integration with `@razerspine/webpack-core`
27
+
28
+ Templates are **copied**, not referenced — you fully own the result.
29
+
30
+ ---
31
+
32
+ ## Aliases in templates
33
+
34
+ Common aliases available in Pug, JS, and styles:
35
+
36
+ ```text
37
+ @views
38
+ @styles
39
+ @scripts
40
+ @images
41
+ @fonts
42
+ @icons
43
+ ```
@@ -0,0 +1,65 @@
1
+ # webpack-core
2
+
3
+ `@razerspine/webpack-core` is the foundation used by all templates.
4
+
5
+ It provides a **stable, minimal, and production-safe webpack configuration**
6
+ focused on template-driven builds.
7
+
8
+ ---
9
+
10
+ ## Design principles
11
+
12
+ - Webpack is responsible for module resolution
13
+ - `pug-plugin` is responsible only for templates
14
+ - No implicit JS entry (`./src`) fallback
15
+ - No aggressive optimizations by default
16
+ - Aliases are resolved by webpack, not by plugins
17
+
18
+ ---
19
+
20
+ ## Responsibilities
21
+
22
+ ### webpack-core
23
+ - loaders (scripts, styles, assets)
24
+ - resolve.alias
25
+ - environment handling
26
+ - dev / prod separation
27
+
28
+ ### Templates
29
+ - project structure
30
+ - aliases
31
+ - UI kit integration
32
+ - concrete paths
33
+
34
+ ---
35
+
36
+ ## Why no splitChunks by default?
37
+
38
+ During real-world testing, aggressive chunk splitting caused:
39
+ - broken Pug asset resolution
40
+ - unexpected entry lookups
41
+ - unstable production builds
42
+
43
+ You can still enable it manually if needed.
44
+
45
+ ---
46
+
47
+ ## Usage example
48
+
49
+ ```js
50
+ const { createBaseConfig } = require('@razerspine/webpack-core');
51
+
52
+ createBaseConfig({
53
+ mode: 'development',
54
+ scripts: 'js',
55
+ styles: 'scss',
56
+ templates: {
57
+ entry: 'src/views/pages'
58
+ },
59
+ resolve: {
60
+ alias: {
61
+ '@images': path.resolve('src/assets/images')
62
+ }
63
+ }
64
+ });
65
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-webpack-starter",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Create a webpack starter with Pug, SCSS, TS and more",
5
5
  "bin": {
6
6
  "create-webpack-starter": "bin/index.js"
@@ -8,7 +8,10 @@
8
8
  "files": [
9
9
  "bin",
10
10
  "dist",
11
- "README.md"
11
+ "docs",
12
+ "README.md",
13
+ "LICENSE",
14
+ "CHANGELOG.md"
12
15
  ],
13
16
  "scripts": {
14
17
  "build": "tsc",