0.2.2 • Published 4 months ago

sei_code_tools v0.2.2

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

CLI for sei_code_tools

About

命令行工具集合,方便源代码代码迁移改造。

How to install

When you have followed the Getting Started guide of webpack then webpack CLI is already installed!

Supported arguments and commands

Usage

使用方法:几个子命令的用法。

1,生成urql需要的json文件,执行 sei_code_tools urqlSchema -u http://localhost:8673/graphql src/common/urql-schema.json ;

npx webpack-cli [command] [options]

If no command is specified then bundle command is used by default

Help Usage

To display basic commands and arguments -

npx webpack-cli --help

To display all supported commands and arguments -

npx webpack-cli --help=verbose

or

npx webpack-cli --help verbose

Available Commands

  build|bundle|b [entries...] [options]  Run webpack (default command, can be omitted).
  configtest|t [config-path]             Validate a webpack configuration.
  help|h [command] [option]              Display help for commands and options.
  info|i [options]                       Outputs information about your system.
  serve|server|s [entries...] [options]  Run the webpack dev server and watch for source file changes while serving.
  version|v [options]                    Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
  watch|w [entries...] [options]         Run webpack and watch for files changes.

Available Options

Options:
  -c, --config <pathToConfigFile...>     Provide path to one or more webpack configuration files to process, e.g. "./webpack.config.js".
  --config-name <name...>                Name(s) of particular configuration(s) to use if configuration file exports an array of multiple configurations.
  -m, --merge                            Merge two or more configurations using 'webpack-merge'.
  --disable-interpret                    Disable interpret for loading the config file.
  --env <value...>                       Environment variables passed to the configuration when it is a function, e.g. "myvar" or "myvar=myval".
  --node-env <value>                     Sets process.env.NODE_ENV to the specified value for access within the configuration.(Deprecated: Use '--config-node-env' instead)
  --config-node-env <value>              Sets process.env.NODE_ENV to the specified value for access within the configuration.
  --analyze                              It invokes webpack-bundle-analyzer plugin to get bundle information.
  --progress [value]                     Print compilation progress during build.
  -j, --json [pathToJsonFile]            Prints result as JSON or store it in a file.
  --fail-on-warnings                     Stop webpack-cli process with non-zero exit code on warnings from webpack.
  -d, --devtool <value>                  A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
  --no-devtool                           Negative 'devtool' option.
  --entry <value...>                     A module that is loaded upon startup. Only the last one is exported.
  -e, --extends <value...>               Path to the configuration to be extended (only works when using webpack-cli).
  --mode <value>                         Enable production optimizations or development hints.
  --name <value>                         Name of the configuration. Used when loading multiple configurations.
  -o, --output-path <value>              The output directory as **absolute path** (required).
  --stats [value]                        Stats options object or preset name.
  --no-stats                             Negative 'stats' option.
  -t, --target <value...>                Environment to build for. Environment to build for. An array of environments to build for all of them when possible.
  --no-target                            Negative 'target' option.
  -w, --watch                            Enter watch mode, which rebuilds on file change.
  --no-watch                             Negative 'watch' option.
  --watch-options-stdin                  Stop watching when stdin stream has ended.
  --no-watch-options-stdin               Negative 'watch-options-stdin' option.

Global options:
  --color                                Enable colors on console.
  --no-color                             Disable colors on console.
  -v, --version                          Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
  -h, --help [verbose]                   Display help for commands and options.

Checkout OPTIONS.md to see list of all available options.

Exit codes and their meanings

Exit CodeDescription
0Success
1Errors from webpack
2Configuration/options problem or an internal error

CLI Environment Variables

Environment VariableDescription
WEBPACK_CLI_SKIP_IMPORT_LOCALwhen true it will skip using the local instance of webpack-cli.
WEBPACK_CLI_FORCE_LOAD_ESM_CONFIGwhen true it will force load the ESM config.
WEBPACK_PACKAGEUse a custom webpack version in CLI.
WEBPACK_DEV_SERVER_PACKAGEUse a custom webpack-dev-server version in CLI.
WEBPACK_CLI_HELP_WIDTHUse custom width for help output.

Configuration Environment Variables

You can use the following environment variables inside your webpack configuration:

Environment VariableDescription
WEBPACK_SERVEtrue if serve\|s is being used.
WEBPACK_BUILDtrue if build\|bundle\|b is being used.
WEBPACK_WATCHtrue if --watch\|watch\|w is being used.

Checkout webpack.js.org for more detailed documentation of webpack-cli.

0.2.2

4 months ago

0.2.1

4 months ago

0.2.0

4 months ago

0.1.9

4 months ago

0.1.8

4 months ago

0.1.7

4 months ago

0.1.6

4 months ago

0.1.5

4 months ago

0.1.4

4 months ago

0.1.3

4 months ago

0.1.2

4 months ago

0.1.1

4 months ago

0.1.0

4 months ago