Skip to content

Commit 98728ee

Browse files
docs: improvement
1 parent b1c8af5 commit 98728ee

File tree

4 files changed

+32
-4
lines changed

4 files changed

+32
-4
lines changed

packages/create-webpack-app/README.md

+25-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
## About
1010

1111
- `create-webpack-app` is a cli tool that enables developers to scaffold a new webpack project quickly. It provides developers with a flexible set of commands to increase speed when setting up a custom webpack project. webpack CLI addresses these needs by providing tools to improve the setup of custom webpack configuration.
12-
- It also supports several front-end frameworks and libraries like React, Angular, Vue, Svelte, etc.
12+
- It also supports several front-end frameworks and libraries like React, Vue, Svelte and pure project.
1313
- Webpack Loader and Plugin scaffolding is also supported.
1414

1515
## Supported arguments and commands
@@ -20,6 +20,12 @@
2020
npx create-webpack-app [command] [options]
2121
```
2222

23+
### Commands
24+
25+
- `init` (also used by default when nothing specified) - project generator
26+
- `loader` - loader generator
27+
- `plugin` - plugin generator
28+
2329
### CLI options
2430

2531
**To generate default template**
@@ -31,7 +37,13 @@ npx create-webpack-app
3137
**To generate with default answers**
3238

3339
```bash
34-
npx create-webpack-app -f, --force
40+
npx create-webpack-app -f
41+
```
42+
43+
or
44+
45+
```bash
46+
npx create-webpack-app --force
3547
```
3648

3749
**To generate in a specified path**
@@ -44,5 +56,15 @@ npx create-webpack-app [generation-path]
4456

4557
```bash
4658
npx create-webpack-app --template <template-name>
47-
4859
```
60+
61+
Available templates:
62+
63+
- `default` (used by default when nothing specified) - generate a basic template for JS(TS)/CSS/HTML without any frameworks
64+
- [`react`](https://react.dev/)
65+
- [`vue`](https://vuejs.org/)
66+
- [`svelte`](https://svelte.dev/)
67+
68+
Available templates for `loader` and `plugin` generators:
69+
70+
- `default` (used by default when nothing specified) - generate bootstrap code

test/create-webpack-app/init/init.test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ const path = require("path");
33
const { mkdirSync, existsSync, readFileSync } = require("fs");
44
const { join, resolve } = require("path");
55
const { createPathDependentUtils, uniqueDirectoryForTest, isWindows } = require("../test.utils.js");
6-
const { run, runPromptWithAnswers } = createPathDependentUtils("create-webpack-app");
76

87
jest.setTimeout(480000);
98

9+
const { run, runPromptWithAnswers } = createPathDependentUtils("create-webpack-app");
10+
1011
const ENTER = "\x0D";
1112
const DOWN = "\x1B\x5B\x42";
1213

test/create-webpack-app/loader/loader.test.js

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
const { existsSync } = require("fs");
44
const { join, resolve } = require("path");
55

6+
jest.setTimeout(480000);
7+
68
const {
79
uniqueDirectoryForTest,
810
normalizeStdout,

test/create-webpack-app/plugin/plugin.test.js

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ const { existsSync, mkdirSync } = require("fs");
22
const { join, resolve } = require("path");
33
const { uniqueDirectoryForTest, normalizeStdout, normalizeStderr } = require("../test.utils");
44
const { createPathDependentUtils } = require("../test.utils");
5+
6+
jest.setTimeout(480000);
7+
58
const webpackCliUtils = createPathDependentUtils("webpack-cli");
69
const createWebpackAppUtils = createPathDependentUtils("create-webpack-app");
710
const { runPromptWithAnswers } = createWebpackAppUtils;

0 commit comments

Comments
 (0)