| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A full-featured Webpack setup with hot-reload, lint-on-save, unit testing & css extraction.
This is a project template for vue-cli.
$ npm install -g vue-cli
$ vue init webpack my-project
$ cd my-project
$ npm install
$ npm run dev.
├── package.json # build scripts and dependencies
├── .babelrc # babel configuration
├── .eslintrc.js # eslint configuration
├── build
│ ├── dev-server.js # development server script
│ ├── karma.conf.js # unit testing config
│ ├── webpack.base.conf.js # shared base webpack config
│ ├── webpack.dev.conf.js # development webpack config
│ └── webpack.prod.conf.js # production webpack config
├── src
│ ├── index.html # main html file
│ ├── main.js # app entry file
│ ├── App.vue # main app component
│ ├── components # ui components
│ │ └── ...
│ └── assets # static assets
│ └── ...
└── test
└── unit # unit tests
├── index.js # unit test entry file
└── ...npm run dev: first-in-class development experience.
npm run build: Production ready build.
npm test: Unit tests run in PhantomJS with Karma + karma-jasmine + karma-webpack.
For detailed explanation on how things work, consult the docs for vue-loader.
You will likely need to do some tuning to suit your own needs:
Install additional libraries that you need, e.g. vue-router, vue-resource, vuex, etc...
Use your preferred .eslintrc config.
Add your preferred CSS pre-processor, for example:
npm install less-loader --save-devWorking with an existing backend server:
For unit testing:
You can run the tests in multiple real browsers by installing more karma launchers and adjusting the browsers field in build/karma.conf.js.
You can also swap out Jasmine for other testing frameworks, e.g. use Mocha with karma-mocha.
You can fork this repo to create your own boilerplate, and use it with vue-cli:
vue init username/repo my-project| Back | FazBrowse Home | New Git URL |