commit 02f3387fce0c3227606b5fca287060678c8c520e Author: Evan You Date: Sat Dec 26 21:02:27 2015 -0500 init diff --git a/README.md b/README.md new file mode 100644 index 0000000..022b9c1 --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# vue-browserify-simple-boilerplate + +> A simple Browserify + `vueify` setup for quick prototyping. + +### Usage + +This is a project template for [vue-cli](https://github.com/vuejs/vue-cli). + +``` bash +$ npm install -g vue-cli +$ vue init browserify-simple my-project +$ cd my-project +$ npm install +$ npm run dev +``` + +### What's Included + +- `npm run dev`: Browserify + `vueify` with proper config for source map & hot-reload. + +- `npm run build`: Production build with HTML/CSS/JS minification. + +For more information see the [docs for vueify](https://github.com/vuejs/vueify). + +### Fork It And Make Your Own + +You can fork this repo to create your own boilerplate, and use it with `vue-cli`: + +``` bash +vue init username/repo my-project +``` diff --git a/meta.json b/meta.json new file mode 100644 index 0000000..51372fc --- /dev/null +++ b/meta.json @@ -0,0 +1,22 @@ +{ + "schema": { + "name": { + "type": "string", + "required": true, + "label": "Project name" + }, + "description": { + "type": "string", + "required": true, + "label": "Project description" + }, + "author": { + "type": "string", + "label": "Author" + }, + "private": { + "type": "boolean", + "default": true + } + } +} diff --git a/template/.babelrc b/template/.babelrc new file mode 100644 index 0000000..51a8ae4 --- /dev/null +++ b/template/.babelrc @@ -0,0 +1,4 @@ +{ + "presets": ["es2015", "stage-2"], + "plugins": ["transform-runtime"] +} diff --git a/template/.gitignore b/template/.gitignore new file mode 100644 index 0000000..00fcd5e --- /dev/null +++ b/template/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +node_modules/ +dist/build.js +npm-debug.log diff --git a/template/README.md b/template/README.md new file mode 100644 index 0000000..6bb0518 --- /dev/null +++ b/template/README.md @@ -0,0 +1,16 @@ +# {{ name }} + +> {{ description }} + +## Build Setup + +``` bash +# install dependencies +npm install + +# serve with hot reload at localhost:8080 +npm run dev + +# build for production with minification +npm run build +``` diff --git a/template/dist/.gitkeep b/template/dist/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/template/index.html b/template/index.html new file mode 100644 index 0000000..c46e2ae --- /dev/null +++ b/template/index.html @@ -0,0 +1,11 @@ + + + + + {{ name }} + + + + + + diff --git a/template/package.json b/template/package.json new file mode 100644 index 0000000..cd57cd8 --- /dev/null +++ b/template/package.json @@ -0,0 +1,38 @@ +{ + "name": "{{ name }}", + "description": "{{ description }}", + "author": "{{ author }}", + {{#private}} + "private": true, + {{/private}} + "scripts": { + "dev": "watchify -vd -p browserify-hmr -e src/main.js -o dist/build.js & http-server -c 1 -a localhost", + "build": "cross-env NODE_ENV=production browserify src/main.js | uglifyjs -c warnings=false -m > dist/build.js" + }, + "dependencies": { + "vue": "^1.0.0" + }, + "devDependencies": { + "babel-core": "^6.0.0", + "babel-plugin-transform-runtime": "^6.0.0", + "babel-preset-es2015": "^6.0.0", + "babel-preset-stage-2": "^6.0.0", + "babel-runtime": "^5.8.0", + "cross-env": "^1.0.6", + "babelify": "^7.2.0", + "browserify": "^12.0.1", + "browserify-hmr": "^0.3.1", + "http-server": "^0.8.5", + "uglify-js": "^2.5.0", + "vue-hot-reload-api": "^1.2.2", + "vueify": "^8.0.0", + "vueify-insert-css": "^1.0.0", + "watchify": "^3.4.0" + }, + "browserify": { + "transform": [ + "vueify", + "babelify" + ] + } +} diff --git a/template/src/App.vue b/template/src/App.vue new file mode 100644 index 0000000..c96cd30 --- /dev/null +++ b/template/src/App.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/template/src/main.js b/template/src/main.js new file mode 100644 index 0000000..6c68dc4 --- /dev/null +++ b/template/src/main.js @@ -0,0 +1,7 @@ +import Vue from 'vue' +import App from './App.vue' + +new Vue({ + el: 'body', + components: { App } +})