diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..edf4605 Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md index 1eacf50..0c53afc 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,11 @@ Vue Formulate is a [Vue](https://vuejs.org/) plugin that exposes an elegant mechanism for building and validating forms with a centralized data store. +### Show and tell + +You'll find an easy to use example, in [the example directory](https://github.com/wearebraid/vue-formulate/tree/master/example) +as well as a live demo available at: [demo.vueformulate.com](https://demo.vueformulate.com). + ### Get Started #### Download @@ -18,15 +23,19 @@ First download the `vue-formulate` package from npm: npm install vue-formulate ``` -You will require Babel so... +If you want to use ES6 features in your project +(and this readme assumes you do), then you'll also +need Babel: ```sh babel-preset-env babel-preset-stage-2 ``` +Many Vue/Vuex projects require Babel’s `stage-2` preset. +Best practice is to include a `.babelrc` in the project +root: -... and ensure a `.babelrc` is in the project root and includes ... ```sh { "presets": [ @@ -47,12 +56,6 @@ import formulate from 'vue-formulate' Vue.use(formulate) ``` - -#### Examples - -You'll find an easy to use example, with getting started instructions, in [the example directory](https://github.com/wearebraid/vue-formulate/tree/master/example) - - #### Vuex `vue-formulate` needs to be linked to your vuex store. Vuex can be configured as a single root store, or as namespaced modules and `vue-formualte` diff --git a/example/package.json b/example/package.json index d68c12f..62c48c4 100644 --- a/example/package.json +++ b/example/package.json @@ -2,7 +2,8 @@ "version": "1.0.0", "author": "Justin Schroeder ", "scripts": { - "dev": "cross-env NODE_ENV=development webpack-dev-server --hot" + "dev": "cross-env NODE_ENV=development webpack-dev-server --hot", + "build": "cross-env NODE_ENV=production webpack -p" }, "dependencies": { "vue": "^2.3.3", diff --git a/example/webpack.config.js b/example/webpack.config.js index beb773d..0a23354 100644 --- a/example/webpack.config.js +++ b/example/webpack.config.js @@ -16,7 +16,6 @@ module.exports = { options: { loaders: { } - // other vue-loader options go here } }, { @@ -44,13 +43,10 @@ module.exports = { }, performance: { hints: false - }, - devtool: '#eval-source-map' + } } if (process.env.NODE_ENV === 'production') { - module.exports.devtool = '#source-map' - // http://vue-loader.vuejs.org/en/workflow/production.html module.exports.plugins = (module.exports.plugins || []).concat([ new webpack.DefinePlugin({ 'process.env': {