Vue CLI plugin for Chameleon bundles
This is a project template created from vue-cli 3.0. We strongly recommend to use it with Vue CLI stable version, i.e. 3.0.0 and above, due to build inconsistencies in lower versions.
$ npm install -g @vue/cli # Install vue/cli if you haven't already
$ vue create my-project # Create a new project
$ cd my-project # Navigate into your new project folder
$ vue add @nsoft/chameleon-bundle ${authToken} # Add & invoke this plugin to apply bundle template
$ npm run serve # Run app and open it in your browser
Options
Project name
- name of your repository, written topackage.json
inname
field, defaults to chameleon-bundleProject description
- description of your repository, written topackage.json
indescription
field, defaults to Chameleon Bundle ProjectAuthor
- author of your repository, written topackage.json
inauthor
field, defaults to empty fieldLicense
- license for your repository, written topackage.json
inlicense
field, defaults to MITBundle Name
- name of your bundle, it's used for library global name as__CHAMELEON_${bundleName}__
and in bundle manifest, defaults to sampleBundle Namepace
- namespace for your bundle, it's written in bundlemanifest.json
, defaults to z
Bundle Manifest
Each bundle must have its own manifest.json
file which describes it. This file gets bundled together with other bundle files in bundle.zip
which is used for new bundle registration and existing bundle update.
Bundling process adds each script defined inside manifest scripts
, as well as css files defined in manifest styles
. Both of these props are optional, but bundle must have at least one of them.
If a bundle has some help files, they should be grouped in one directory inside src
and that directory will get bundled to bundle.zip
. helpPath
can also point to some remote URL.
npm run serve
: Serve with hot reload at localhost on available portnpm test
: Unit tests run in JSDOM with Jest, with support for mocking and ES2015+.npm run build
: Production UMD components library build with minification.npm run build-meta
: Production UMD meta library build with minification.npm run build-bundle
: Production bundle build with minification.npm run zip-build
: Zip bundle files defined in manifest.json, ready for deploymentnpm run deploy-bundle "${authToken}"
: Deployment of bundle.zip