├── README.md ├── meta.json └── template ├── .babelrc ├── .gitignore ├── README.md ├── dist └── .gitkeep ├── index.html ├── package.json └── src ├── App.vue └── main.js /README.md: -------------------------------------------------------------------------------- 1 | # browserify-simple 2 | 3 | > A simple Vue 2.0 Browserify + `vueify` setup for quick prototyping. 4 | 5 | > This template is Vue 2.0 compatible. For Vue 1.x use this command: `vue init browserify-simple#1.0 my-project` 6 | 7 | ### Usage 8 | 9 | This is a project template for [vue-cli](https://github.com/vuejs/vue-cli). 10 | 11 | ``` bash 12 | $ npm install -g vue-cli 13 | $ vue init browserify-simple my-project 14 | $ cd my-project 15 | $ npm install 16 | $ npm run dev 17 | ``` 18 | 19 | ### What's Included 20 | 21 | - `npm run dev`: Browserify + `vueify` with proper config for source map & hot-reload. 22 | 23 | - `npm run build`: Production build with HTML/CSS/JS minification. 24 | 25 | For more information see the [docs for vueify](https://github.com/vuejs/vueify). Also checkout [breaking changes in vueify 9.0.0](https://github.com/vuejs/vueify/releases/tag/v9.0.0). 26 | 27 | ### Fork It And Make Your Own 28 | 29 | You can fork this repo to create your own boilerplate, and use it with `vue-cli`: 30 | 31 | ``` bash 32 | vue init username/repo my-project 33 | ``` 34 | -------------------------------------------------------------------------------- /meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "prompts": { 3 | "name": { 4 | "type": "string", 5 | "required": true, 6 | "label": "Project name" 7 | }, 8 | "description": { 9 | "type": "string", 10 | "required": true, 11 | "label": "Project description", 12 | "default": "A Vue.js project" 13 | }, 14 | "author": { 15 | "type": "string", 16 | "label": "Author" 17 | } 18 | }, 19 | "completeMessage": "To get started:\n\n cd {{destDirName}}\n npm install\n npm run dev" 20 | } 21 | -------------------------------------------------------------------------------- /template/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["es2015"] 3 | } 4 | -------------------------------------------------------------------------------- /template/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | dist/build.js 4 | npm-debug.log 5 | yarn-error.log 6 | 7 | # Editor directories and files 8 | .idea 9 | *.suo 10 | *.ntvs* 11 | *.njsproj 12 | *.sln 13 | -------------------------------------------------------------------------------- /template/README.md: -------------------------------------------------------------------------------- 1 | # {{ name }} 2 | 3 | > {{ description }} 4 | 5 | ## Build Setup 6 | 7 | ``` bash 8 | # install dependencies 9 | npm install 10 | 11 | # serve with hot reload at localhost:8080 12 | npm run dev 13 | 14 | # build for production with minification 15 | npm run build 16 | ``` 17 | 18 | For more information see the [docs for vueify](https://github.com/vuejs/vueify). 19 | -------------------------------------------------------------------------------- /template/dist/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vuejs-templates/browserify-simple/00d7458e9c8898915ca04a185828fad6cc5f2be0/template/dist/.gitkeep -------------------------------------------------------------------------------- /template/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{ name }} 6 | 7 | 8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /template/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "{{ name }}", 3 | "description": "{{ description }}", 4 | "author": "{{ author }}", 5 | "private": true, 6 | "scripts": { 7 | "watchify": "watchify -vd -p browserify-hmr -e src/main.js -o dist/build.js", 8 | "serve": "http-server -o -s -c 1 -a localhost", 9 | "dev": "npm-run-all --parallel watchify serve", 10 | "build": "cross-env NODE_ENV=production browserify -g envify src/main.js | uglifyjs -c warnings=false -m > dist/build.js" 11 | }, 12 | "dependencies": { 13 | "vue": "^2.0.1" 14 | }, 15 | "devDependencies": { 16 | "babel-core": "^6.0.0", 17 | "babel-preset-es2015": "^6.0.0", 18 | "babelify": "^7.2.0", 19 | "browserify": "^13.0.1", 20 | "browserify-hmr": "^0.3.1", 21 | "cross-env": "^1.0.6", 22 | "envify": "^3.4.1", 23 | "http-server": "^0.9.0", 24 | "npm-run-all": "^2.1.2", 25 | "uglify-js": "^2.5.0", 26 | "vueify": "^9.1.0", 27 | "watchify": "^3.4.0" 28 | }, 29 | "browserify": { 30 | "transform": [ 31 | "vueify", 32 | "babelify" 33 | ] 34 | }, 35 | "browser": { 36 | "vue": "vue/dist/vue.common.js" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /template/src/App.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 32 | 33 | 66 | -------------------------------------------------------------------------------- /template/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | 4 | new Vue({ 5 | el: '#app', 6 | render: h => h(App) 7 | }) 8 | --------------------------------------------------------------------------------