Skip to content

Commit

Permalink
docs: improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Dec 18, 2024
1 parent b1c8af5 commit 98728ee
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
28 changes: 25 additions & 3 deletions packages/create-webpack-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## About

- `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.
- It also supports several front-end frameworks and libraries like React, Angular, Vue, Svelte, etc.
- It also supports several front-end frameworks and libraries like React, Vue, Svelte and pure project.
- Webpack Loader and Plugin scaffolding is also supported.

## Supported arguments and commands
Expand All @@ -20,6 +20,12 @@
npx create-webpack-app [command] [options]
```

### Commands

- `init` (also used by default when nothing specified) - project generator
- `loader` - loader generator
- `plugin` - plugin generator

### CLI options

**To generate default template**
Expand All @@ -31,7 +37,13 @@ npx create-webpack-app
**To generate with default answers**

```bash
npx create-webpack-app -f, --force
npx create-webpack-app -f
```

or

```bash
npx create-webpack-app --force
```

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

```bash
npx create-webpack-app --template <template-name>

```

Available templates:

- `default` (used by default when nothing specified) - generate a basic template for JS(TS)/CSS/HTML without any frameworks
- [`react`](https://react.dev/)
- [`vue`](https://vuejs.org/)
- [`svelte`](https://svelte.dev/)

Available templates for `loader` and `plugin` generators:

- `default` (used by default when nothing specified) - generate bootstrap code
3 changes: 2 additions & 1 deletion test/create-webpack-app/init/init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ const path = require("path");
const { mkdirSync, existsSync, readFileSync } = require("fs");
const { join, resolve } = require("path");
const { createPathDependentUtils, uniqueDirectoryForTest, isWindows } = require("../test.utils.js");
const { run, runPromptWithAnswers } = createPathDependentUtils("create-webpack-app");

jest.setTimeout(480000);

const { run, runPromptWithAnswers } = createPathDependentUtils("create-webpack-app");

const ENTER = "\x0D";
const DOWN = "\x1B\x5B\x42";

Expand Down
2 changes: 2 additions & 0 deletions test/create-webpack-app/loader/loader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
const { existsSync } = require("fs");
const { join, resolve } = require("path");

jest.setTimeout(480000);

const {
uniqueDirectoryForTest,
normalizeStdout,
Expand Down
3 changes: 3 additions & 0 deletions test/create-webpack-app/plugin/plugin.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ const { existsSync, mkdirSync } = require("fs");
const { join, resolve } = require("path");
const { uniqueDirectoryForTest, normalizeStdout, normalizeStderr } = require("../test.utils");
const { createPathDependentUtils } = require("../test.utils");

jest.setTimeout(480000);

const webpackCliUtils = createPathDependentUtils("webpack-cli");
const createWebpackAppUtils = createPathDependentUtils("create-webpack-app");
const { runPromptWithAnswers } = createWebpackAppUtils;
Expand Down

0 comments on commit 98728ee

Please sign in to comment.