diff --git a/packages/create-webpack-app/README.md b/packages/create-webpack-app/README.md index a23c5eee3f9..6654d257426 100644 --- a/packages/create-webpack-app/README.md +++ b/packages/create-webpack-app/README.md @@ -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 @@ -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** @@ -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** @@ -44,5 +56,15 @@ npx create-webpack-app [generation-path] ```bash npx create-webpack-app --template - ``` + +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 diff --git a/test/create-webpack-app/init/init.test.js b/test/create-webpack-app/init/init.test.js index 6709cec8340..9f232a19eb9 100644 --- a/test/create-webpack-app/init/init.test.js +++ b/test/create-webpack-app/init/init.test.js @@ -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"; diff --git a/test/create-webpack-app/loader/loader.test.js b/test/create-webpack-app/loader/loader.test.js index 7b1e198721b..c6d144ee1f3 100644 --- a/test/create-webpack-app/loader/loader.test.js +++ b/test/create-webpack-app/loader/loader.test.js @@ -3,6 +3,8 @@ const { existsSync } = require("fs"); const { join, resolve } = require("path"); +jest.setTimeout(480000); + const { uniqueDirectoryForTest, normalizeStdout, diff --git a/test/create-webpack-app/plugin/plugin.test.js b/test/create-webpack-app/plugin/plugin.test.js index 87c435eb820..564a40320b9 100644 --- a/test/create-webpack-app/plugin/plugin.test.js +++ b/test/create-webpack-app/plugin/plugin.test.js @@ -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;