CLI for developing Vusion Projects.
library
app
npm install -g vusion-cli
vusion init app my-app
npm install
vusion dev
-
vusion help
: Show help of all commands -
vusion -V, --version
: Show the version of current CLI -
vusion init <project-type> <project-name>
: Initalize a vusion project -
vusion dev
: Run develop server-c, --config-path <path>
: Vusion config path-e, --entry-path <path>
: Change default entry path-C, --clean
: Clean the output directory at start-l, --library-path <path>
: Library entry path. To be./index.js
by default if project type islibrary
-d, --docs
: Generate docs of common components in library. Always be true if project type islibrary
-p, --port <port>
: Web Server Port-O, --no-open
: Disable to open browser at the beginning-H, --no-hot
: Disable to hot reload--resolve-priority
: Priority to resolve modules or loaders, "cwd"(default) or "cli"
-
vusion build
: Build a distribution-c, --config-path <path>
: Vusion config path-e, --entry-path <path>
: Change default entry path-C, --clean
: Clean the output directory at start-l, --library-path <path>
: Library entry path. To be./index.js
by default if project type islibrary
-d, --docs
: Generate docs of common components in library. Always be true if project type islibrary
-s, --source-map
: Generate source map in build mode--extract-css
: Extract CSS by ExtractTextPlugin in build mode--uglify-js
: Compress and mangle JS by UglifyJSPlugin in build mode--minify-js
: Minify JS only inbuild
mode. Settrue
or'babel-minify'
to use BabelMinifyPlugin, set'uglify-js'
to use UglifyJSPlugin as same as--uglify
--force-shaking
: Force to enable tree shaking under this path without care of side effects. It's different from default tree shaking of webpack--experimental
: Enable some experimental loaders or plugins--resolve-priority
: Priority to resolve modules or loaders, "cwd"(default) or "cli"
-
vusion test
: Run karma test-c, --config-path <path>
: Vusion config path-p, --port <port>
: Web Server Port-w, --watch
: Karma watch--resolve-priority
: Priority to resolve modules or loaders, "cwd"(default) or "cli"
-
vusion publish <version>
: Publish a new version -
vusion ghpages
: Push output directory to gh-pages-c, --config-path <path>
: Vusion config path-p, --path <path>
: Path to publish. Default is webpack output path
-
vusion dep
: List dependencies of vusion-cli -
vusion transform <vue-path>
: Transform Vue component between singlefile and multifile pattern
Default vusion.config.js
file:
{
type: '', // [Required] Vusion project type. 'library', 'app'
staticPath: '', // Path of static files, which will be copied into destination directory
assetsPath: '', // @deprecated, alias of option `staticPath`
libraryPath: '', // [Required] Library entry path. To be `./src` by default if project type is `library`
baseCSSPath: '', // Path of base CSS. If not set, it will be `library/base/base.css`
globalCSSPath: '', // Path of global CSS. If not set, it will be `library/base/global.css`
testPaths: { // Paths for karma test
src: './src',
unit: './test/unit',
},
clean: true, // Clean the destination directory before `dev` or `build`
docs: false, // Generate docs of common components in library. Always be true if project type is `library`
open: true, // Enable/Disable to open browser at the beginning in `dev` mode
hot: true, // Enable/Disable to hot reload in `dev` mode
sourceMap: false, // Generate sourceMap in `build` mode
extractCSS: false, // Extract CSS via ExtractTextPlugin only in `build` mode
uglifyJS: true, // Compress JS via UglifyJSPlugin only in `build` mode
minifyJS: false, // Minify JS only in `build` mode. Set `true` or 'babel-minify' to use BabelMinifyPlugin, set 'uglify-js' to use UglifyJSPlugin as same as `uglifyJS: true`
forceShaking: false, // Force to enable tree shaking under this path without care of side effects. It's different from default tree shaking of webpack.
experimental: false, // Enable some experimental loaders or plugins, like ModuleConcatenationPlugin
resolvePriority: 'cwd', // Priority to resolve modules or loaders, "cwd"(default) or "cli"
browsers: ['> 1%', 'last 2 versions', 'ie >= 9'], // Browers Compatibility referred in autoprefixer. See browserslist for more details
babelIncludes: [], // Reinclude some files excluded in node_modules
webpack: {}, // Extend webpack configuration
webpackDevServer: {}, // Extend webpackDevServer configuration
postcss: [], // Extend postcss plugins
vue: {}, // Extend vue-loader options
karma: {}, // Extend karma configuration
};