diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8873c0d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/node_modules
+/docs/.vuepress/dist
diff --git a/README.md b/README.md
index 91f097f..81d8b48 100755
--- a/README.md
+++ b/README.md
@@ -1,77 +1,35 @@
# seed 🌱
-[![version](https://img.shields.io/badge/version-2.1.1-green.svg?style=flat-square)](https://github.com/pierrechls/seed) [![Build status](https://img.shields.io/badge/build-passing-green.svg?style=flat-square)](https://img.shields.io/badge/build-passing-green.svg?style=flat-square) [![front-end-framework](https://img.shields.io/badge/framework-vue.js-lightgrey.svg?style=flat-square)](http://vuejs.org/) [![router](https://img.shields.io/badge/router-vue--router-lightgrey.svg?style=flat-square)](http://router.vuejs.org/en/index.html) [![store](https://img.shields.io/badge/state--management-vuex-lightgrey.svg?style=flat-square)](http://vuex.vuejs.org/) [![internationalization](https://img.shields.io/badge/internationalization-vue--i18n-lightgrey.svg?style=flat-square)](https://github.com/kazupon/vue-i18n) [![js-standard-style](https://img.shields.io/badge/code_style-standard-lightgrey.svg?style=flat-square)](http://standardjs.com/)
+[![version](https://img.shields.io/badge/version-3.0.0-green.svg?style=flat-square)](https://github.com/pierrechls/seed) [![front-end-framework](https://img.shields.io/badge/framework-vue.js-lightgrey.svg?style=flat-square)](http://vuejs.org/) [![router](https://img.shields.io/badge/router-vue--router-lightgrey.svg?style=flat-square)](http://router.vuejs.org/en/index.html) [![store](https://img.shields.io/badge/state--management-vuex-lightgrey.svg?style=flat-square)](http://vuex.vuejs.org/) [![internationalization](https://img.shields.io/badge/internationalization-vue--i18n-lightgrey.svg?style=flat-square)](https://github.com/kazupon/vue-i18n) [![js-standard-style](https://img.shields.io/badge/code_style-standard-lightgrey.svg?style=flat-square)](http://standardjs.com/)
-> A vue-cli template who plants the first seed of your project in order to become a sturdy and flowering tree
+> A vue-cli 3 template who plants the first seed of your project in order to become a sturdy and flowering tree
-## How to use it
-
-Please read the [documentation](https://pierrechls.github.io/seed/) 📚
-
-#### Install vue-cli as global
-
-``` bash
-$ npm install -g vue-cli
-```
-
-#### Init your project
-
-``` bash
-$ vue init pierrechls/seed my-project # init template
-$ cd my-project # go to your project folder
-$ npm install # install dependencies (or `yarn`)
-$ npm run dev # serve with hot reload
-```
-
-## What's included
+## :grey_exclamation: Prior installation
+- [Node.js](https://nodejs.org/en/download/)
+- [Yarn](https://yarnpkg.com/lang/en/docs/install/)
+- [Vue CLI](https://cli.vuejs.org/guide/installation.html)
-#### Development environment
-
-``` bash
-$ npm start # first-in-class development experience (or `npm run dev`)
-```
+## :package: What's included ?
- - [Webpack](http://webpack.github.io/) and [vue-loader](http://vuejs.github.io/vue-loader/) for single file Vue components.
- - state preserving hot-reload
- - state preserving compilation error overlay
- - lint-on-save with ESLint
- - source maps
- - autorun `npm run electron` in Electron enabled apps
+- Babel
+- TypeScript
+- Router (VueRouter)
+- Store (Vuex)
+- CSS Pre-processors (Sass/SCSS with dart-sass)
+- Linter and formatter (TSLint)
+- Unit Testing (Mocha + Chai)
+- E2E Testing (Cypress)
-#### Production environment
+## :video_game: How to use it ?
-``` bash
-$ npm run build # production ready build
-```
-
- - JavaScript minified with [UglifyJS](https://github.com/mishoo/UglifyJS2)
- - HTML minified with [html-minifier](https://github.com/kangax/html-minifier)
- - CSS across all components extracted into a single file and minified with [cssnano](https://github.com/ben-eb/cssnano)
- - all static assets compiled with version hashes for efficient long-term caching
-
-
-#### Electron support
-
-``` bash
-$ npm run electron # developpers friendly features when working in a dev environment
-```
-
- - auto opens the devtools
-
-#### Package
+Please read the [documentation](https://pierrechls.github.io/seed/) 📚
``` bash
-$ npm run package # package your app
+$ vue init pierrechls/seed my-project
```
- - package your app for distribution with [electron-packager](https://github.com/electron-userland/electron-packager)
- - portable version of your app (NodeJS and WebKit embedded)
- - package for Windows/OS X/Linux
- - remove all `devDependencies` from the packaged binary, reducing final size a lot
-
-
-## Fork It And Make Your Own
+## :twisted_rightwards_arrows: Fork it and make your own
You can fork this repo to create your own template, and use it with `vue-cli`:
@@ -79,6 +37,6 @@ You can fork this repo to create your own template, and use it with `vue-cli`:
$ vue init username/repo my-project
```
-## Credits
+## :tada: Credits
-This is inspired from [nd](https://github.com/soixantecircuits/nd) template. This is originally a fork of the [webpack](https://github.com/vuejs-templates/webpack) template. Most credit goes to them! 👏
+This is inspired from a [Vue CLI](https://cli.vuejs.org/) custom template. Most credit goes to them! 👏
diff --git a/deploy-doc.sh b/deploy-doc.sh
index c70314c..d5cb5fe 100644
--- a/deploy-doc.sh
+++ b/deploy-doc.sh
@@ -1,8 +1,17 @@
-cd documentation
-rm -rf _book
-gitbook build
-cd _book
+#!/usr/bin/env sh
+
+# abort on errors
+set -e
+
+# build
+npm run docs:build
+
+# navigate into the build output directory
+cd docs/.vuepress/dist
+
git init
git add -A
-git commit -m ":sparkles: Update documentation"
+git commit -m ":notebook_with_decorative_cover: Update documentation"
git push -f git@github.com:pierrechls/seed.git master:gh-pages
+
+cd -
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
new file mode 100644
index 0000000..bbeb2fc
--- /dev/null
+++ b/docs/.vuepress/config.js
@@ -0,0 +1,25 @@
+module.exports = {
+ title: 'Seed 🌱',
+ base: '/seed/',
+ description: 'A vue-cli 3 template who plants the first seed of your project in order to become a sturdy and flowering tree',
+ themeConfig: {
+ repo: 'pierrechls/seed',
+ docsDir: 'docs',
+ docsBranch: 'docs',
+ editLinks: true,
+ sidebarDepth: 3,
+ nav: [
+ { text: 'Home', link: '/' },
+ { text: 'Guide', link: '/guide/' },
+ ],
+ sidebar: {
+ '/guide/': [
+ '/guide/',
+ '/guide/why',
+ '/guide/structure',
+ '/guide/installation',
+ '/guide/how-to-use'
+ ],
+ }
+ },
+}
\ No newline at end of file
diff --git a/docs/README.md b/docs/README.md
new file mode 100644
index 0000000..c73a079
--- /dev/null
+++ b/docs/README.md
@@ -0,0 +1,7 @@
+---
+home: true
+actionText: Get Started →
+actionLink: /guide/
+footer: MIT Licensed | Copyright © 2019-present Pierre Charles
+---
+
diff --git a/docs/guide/README.md b/docs/guide/README.md
new file mode 100644
index 0000000..90b8e56
--- /dev/null
+++ b/docs/guide/README.md
@@ -0,0 +1,21 @@
+---
+sidebarDepth: 0
+---
+
+# Introduction
+
+This vue-cli 3 template is targeted towards single page applications with [state management](http://vuex.vuejs.org/en/intro.html). In order to fully enjoy working with this template, please read these documentations :
+
+- [Babel](https://babeljs.io/)
+- [TypeScript](https://www.typescriptlang.org/)
+- [vue](http://vuejs.org/guide/)
+- [vue-cli](https://cli.vuejs.org/)
+- [vue-router](router.vuejs.org/en/index.html)
+- [vuex](http://vuex.vuejs.org/en/index.html)
+- [vue-i18n](https://github.com/kazupon/vue-i18n)
+- [standard style](https://github.com/feross/standard)
+- [sass](https://sass-lang.com/dart-sass)
+- [TSLint](https://palantir.github.io/tslint/)
+- [Mocha](https://mochajs.org/)
+- [Cypress](https://www.cypress.io/)
+- [successfull git branching model](http://nvie.com/posts/a-successful-git-branching-model/)
diff --git a/docs/guide/how-to-use.md b/docs/guide/how-to-use.md
new file mode 100644
index 0000000..2e491a6
--- /dev/null
+++ b/docs/guide/how-to-use.md
@@ -0,0 +1,37 @@
+# How to use it ?
+
+## Development
+
+```bash
+$ yarn run serve # compiles and hot-reloads for development
+```
+
+## Production
+
+```bash
+$ yarn run build # compiles and minifies for production
+```
+
+## Testing
+
+Run your tests
+
+```bash
+$ yarn run test # run your tests
+$ yarn run test:e2e # run your end-to-end tests
+$ yarn run test:unit # run your unit tests
+```
+
+## Lint
+
+```bash
+$ yarn run lint # lints and fixes files
+```
+
+## Documentation
+
+```bash
+$ yarn run docs:dev # run server for editing your vuepress documentation
+$ yarn run docs:build # build your vuepress documentation
+$ yarn run docs:deploy # deploys vuepress documentation
+```
\ No newline at end of file
diff --git a/docs/guide/installation.md b/docs/guide/installation.md
new file mode 100644
index 0000000..187b3d6
--- /dev/null
+++ b/docs/guide/installation.md
@@ -0,0 +1,35 @@
+# Installation
+
+::: tip Node Version Requirement
+Vue CLI requires [Node.js](https://nodejs.org/) version 8.9 or above (8.11.0+ recommended). You can manage multiple versions of Node on the same machine with [nvm](https://github.com/creationix/nvm) or [nvm-windows](https://github.com/coreybutler/nvm-windows).
+:::
+
+## Vue-cli
+
+First, you need to install vue-cli package :
+
+``` bash
+npm install -g @vue/cli
+# OR
+yarn global add @vue/cli
+```
+
+You can check you have the right version (3.x) with this command:
+
+```bash
+vue --version
+```
+
+## Environmment settings
+
+Create _.env_ file by running :
+
+```bash
+$ cp .env.dist .env
+```
+
+## Install dependencies
+
+```bash
+$ yarn install
+```
\ No newline at end of file
diff --git a/docs/guide/structure.md b/docs/guide/structure.md
new file mode 100644
index 0000000..51c4104
--- /dev/null
+++ b/docs/guide/structure.md
@@ -0,0 +1,61 @@
+# Project structure
+
+Please read [Vue.js style guide](https://vuejs.org/v2/style-guide/).
+
+## Tree
+
+```
+.
+├── locales/ # translations JSON files
+│ └── ...
+├── public/ # public folder
+│ ├── favicon.ico
+│ └── index.html
+├── settings/ # application settings
+│ └── default.json
+├── src/
+│ ├── assets/ # assets (images, styles, ...)
+│ │ └── ...
+│ ├── components/ # ui components
+│ │ └── ...
+│ ├── data/ # app datas
+│ │ └── ...
+│ ├── lib/
+│ │ ├── locales/ # i18n from locales JSON files
+│ │ │ └── index.js
+│ │ ├── router/ # router with routes
+│ │ │ ├── index.js
+│ │ │ └── routes.js
+│ │ └── store / # store (with state, mutations and actions)
+│ │ └── index.js
+│ ├── transitions/ # vue transitions
+│ │ └── ...
+│ ├── utils/ # somes utils js files
+│ │ └── ...
+│ ├── views/ # views components
+│ │ └── ...
+│ ├── main.js # app entry file
+│ ├── App.vue # main app component
+├── tests/ # unit and e2e tests
+│ └── ...
+├── .env.dist # environnements settings
+└── package.json # build scripts and dependencies
+```
+
+## Environments settings
+
+Setting your environnements variables using [dotenv](https://github.com/motdotla/dotenv).
+
+If you have to set protected data (like API token), or custom keys depending environnements, using these settings.
+
+For getting variables from Vue components, prefix your variables by `VUE_APP_` (_example `VUE_APP_SEED_KEY`_).
+
+## Application settings
+
+A `settings` folder on root project for easily updating your project configuration.
+
+It's simple configuration, example, default languague, default theme, etc.
+
+## Locales
+
+A `locales` folder on root project, regrouping all translations in differents languages in JSON format.
diff --git a/docs/guide/why.md b/docs/guide/why.md
new file mode 100644
index 0000000..c2f0206
--- /dev/null
+++ b/docs/guide/why.md
@@ -0,0 +1,11 @@
+---
+sidebarDepth: 0
+---
+
+# Why ?
+
+Vue-cli plugin allows to create a project with different features (Babel, TypeScript, linter, formatter, unit and E2E testing, etc) but with a default structure.
+
+Seed proposes a project stucture adapted for developpers and others.
+
+
diff --git a/documentation/.gitignore b/documentation/.gitignore
deleted file mode 100644
index 09ea21b..0000000
--- a/documentation/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-_book/
diff --git a/documentation/README.md b/documentation/README.md
deleted file mode 100644
index 1c6efad..0000000
--- a/documentation/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# seed 🌱
-
-> A vue-cli template who plants the first seed of your project in order to become a sturdy and flowering tree
-
-## Introduction
-
-This vue-cli template is targeted towards single page applications with [state management](http://vuex.vuejs.org/en/intro.html) and support for [Electron](http://electron.atom.io/). In order to fully enjoy working with this template, please read these documentations :
-
-- [ES2015 syntax](https://babeljs.io/docs/learn-es2015/)
-- [vue](http://vuejs.org/guide/)
-- [vue-router](router.vuejs.org/en/index.html)
-- [vuex](http://vuex.vuejs.org/en/index.html)
-- [vue-i18n](https://github.com/kazupon/vue-i18n)
-- [electron](http://electron.atom.io/)
-- [standard style](https://github.com/feross/standard)
-- [sass](http://sass-lang.com/)
-- [successfull git branching model](http://nvie.com/posts/a-successful-git-branching-model/)
-
-## How to use
-
-
-#### Install vue-cli as global
-
-```
-$ npm install -g vue-cli
-```
-
-#### Init your project
-
-``` bash
-$ vue init pierrechls/seed my-project # init template
-$ cd my-project # go to your project folder
-$ npm install # install dependencies
-$ npm run dev # serve with hot reload
-```
-
-## Credits
-
-This is inspired from [nd template](https://github.com/soixantecircuits/nd). This is originally a fork of the [webpack](https://github.com/vuejs-templates/webpack) template. Most credit goes to them! 👏
diff --git a/documentation/book.json b/documentation/book.json
deleted file mode 100644
index e55b436..0000000
--- a/documentation/book.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "gitbook": "2.5.2",
- "structure": {
- "summary": "summary.md"
- }
-}
diff --git a/documentation/build-config.md b/documentation/build-config.md
deleted file mode 100755
index d3b2020..0000000
--- a/documentation/build-config.md
+++ /dev/null
@@ -1,63 +0,0 @@
-# Configure your build
-
-_**Warning:** As a general rule, you should not mess with the `build/` and `config/` files. They are already set up for either Electron or the browser and you will most likely just f**k things up._
-
-If you need to build your app into a place outside its current directory, you can edit `config/index.js`.
-
-Let's take a look at the default `config/index.js`:
-
-``` js
-var path = require('path')
-
-module.exports = {
- build: {
- index: path.resolve(__dirname, 'dist/index.html'),
- assetsRoot: path.resolve(__dirname, 'dist'),
- assetsSubDirectory: 'static',
- assetsPublicPath: '/',
- productionSourceMap: true
- },
- dev: {
- port: 8080,
- proxyTable: {}
- }
-}
-```
-
-Inside the `build` section, we have the following options:
-
-### `build.index`
-
-> Must be an absolute path on your local file system.
-
-This is where the `index.html` (with injected asset URLs) will be generated.
-
-### `build.assetsRoot`
-
-> Must be an absolute path on your local file system.
-
-This should point to the root directory that contains all the static assets for your app.
-
-### `build.assetsSubDirectory`
-
-Nest webpack-generated assets under this directory in `build.assetsRoot`, so that they are not mixed with other files you may have in `build.assetsRoot`. For example, if `build.assetsRoot` is `/path/to/dist`, and `build.assetsSubDirectory` is `static`, then all Webpack assets will be generated in `path/to/dist/static`.
-
-This directory will be cleaned before each build, so it should only contain assets generated by the build.
-
-Files inside `static/` will be copied into this directory as-is during build. This means if you change this prefix, all your absolute URLs referencing files in `static/` will also need to be changed. See [Handling Static Assets](static.md) for more details.
-
-### `build.assetsPublicPath`
-
-This should be the URL path where your `build.assetsRoot` will be served. If you are working on a browser targetted app, this will probably be `'/'` (you might need a prefix depending on your back-end),
-
-### `build.productionSourceMap`
-
-Whether to generate source maps for production build.
-
-### `dev.port`
-
-Specify the port for the dev server to listen to.
-
-### `dev.proxyTable`
-
-Define proxy rules for the dev server. See [API Proxying During Development](proxy.md) for more details.
diff --git a/documentation/commands.md b/documentation/commands.md
deleted file mode 100755
index 28b137a..0000000
--- a/documentation/commands.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# Build commands
-
-All build commands are executed via [NPM Scripts](https://docs.npmjs.com/misc/scripts).
-
-### `npm start [-- -t "{target}"]`
-
-> Starts a Node.js local development server. See [API Proxying During Development](proxy.md) for more details. In Electron enabled apps, will also launch Electron at this address. The `npm run dev` works the same (`start` is an alias).
-
-- Webpack + `vue-loader` for single file Vue components.
-- State preserving hot-reload
-- State preserving compilation error overlay
-- Lint-on-save with ESLint
-- `-t` (or `--target=`) modifier is optionnal and override the default [webpack target](https://webpack.github.io/docs/configuration.html#target). This can allow you to develop in a browser with the Electron option enabled, or the opposite.
-- Source maps.
-- Autorun the `npm run electron` command.
-
-### `npm run electron [-- -s "{path to settings}"]`
-
-> Starts Electron and open a window at your local dev server.
-
-- Adds some developper friendly features when working in a dev environment:
- - Auto opens the devtools.
-- `-s` is optionnal and loads the settings given over the default settings.
-
-### `npm run build [-- -t "{target}"]`
-
-> Build assets for production. In Electron enabled apps, will also package the app. See [Configure you build](build-config.md) and [Electron support](electron.md) for more details.
-
-- Running only `npm run build` will build for the current platform. However, you can also run:
- - `npm run build:darwin`
- - `npm run build:linux`
- - `npm run build:win32`
- - `npm run build:all` *All platforms, all architectures*
- - `npm run build:no-package` *Standalone build*
-- JavaScript minified with [UglifyJS](https://github.com/mishoo/UglifyJS2).
-- HTML minified with [html-minifier](https://github.com/kangax/html-minifier).
-- CSS across all components extracted into a single file and minified with [cssnano](https://github.com/ben-eb/cssnano).
-- All static assets compiled with version hashes for efficient long-term caching, and a production `index.html` is auto-generated with proper URLs to these generated assets.
-- If you pick [Electron support](electron.md), build will be setup to work over `file://` and have access to [electron built-in modules](https://github.com/webpack/webpack/blob/3d5dc1a7bf8c7e44acb89d3f0c4b357df6a0ac0a/lib/WebpackOptionsApply.js#L122).
-- `-t` (or `--target=`) modifier is optionnal and override the default [webpack target](https://webpack.github.io/docs/configuration.html#target)
-- Also see [deployment notes](build-config.md).
-
-### `npm run package`
-
-> Package your app for distribution with [electron-packager](https://github.com/electron-userland/electron-packager). You'll need to have a bundle into the `dist/` folder.
-
-- Running only `npm run package` will package for the current platform. However, you can also run:
- - `npm run package:darwin`
- - `npm run package:linux`
- - `npm run package:win32`
- - `npm run package:all` *All platforms, all architectures*
-- Portable version of your app (NodeJS and WebKit embedded).
-- Package for Windows/OS X/Linux.
-- Remove all `devDependencies` from the packaged binary, reducing final size a lot.
-- Does not include development-only files and folders, saving even more space and protecting your app sources.
-- See [Electron support](electron.md)
diff --git a/documentation/electron.md b/documentation/electron.md
deleted file mode 100755
index c2782eb..0000000
--- a/documentation/electron.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# Electron support
-
-seed template allows you to generate a project with everything you need to develop and build an [Electron](http://electron.atom.io/) app. If you whish to learn more about Electron, please check out their [documentation](http://electron.atom.io/docs/).
-
-*
-**Note**: If you want to be able to use your app into a browser, please read about the `--target` flag in the [commands](commands.md) section.*
-
-### Main file
-
-Electron needs an entry point to know how to run your app. This is the file stated in the `main` property of your `package.json`. By default, it will be `electron/main.js`.
-
-### Development and debug
-
-When using in development, you start Electron with:
-
-```bash
-$ npm start
-```
-
-which internally runs:
-
-```bash
-$ npm run electron
-```
-
-If you have checked the `package.json`, you've seen that what it does is simply launch:
-
-```bash
-$ export NODE_ENV="dev"; ./node_modules/.bin/electron .
-```
-
-The main process now has a `process.env['NODE_ENV']` property equals to `'dev'` that we can use to start Electron on your local dev server, open the devtools , load the dev bundle that uses source maps, hot reload, linting, etc...
-
-### Using the `file://` protocol
-
-This is the main breaking point between electron and browser bundles (“bundle" as in "webpack, the flexible module bundler"). When you package and distribute your app, you create a package containing Electron binary and your bundled source code. It means that:
-
-- you need to provide the renderer process a way to access your app files,
-- you need to provide webpack a way to bundle you module and your assets, and make sure the path is still valid.
-
-With that in mind, you have two solutions: making your sources accessible through `http://` or `file://`. seed comes with the **`file://`** option for portability and simplicity. It simply takes some adjustements to the `webpack` config, by referencing the bundled files with their absolute path for example.
-
-Since seed comes with [`vue-router`](http://router.vuejs.org/en/index.html), you also have to keep in mind that you **cannot** enable the `history` [option](http://router.vuejs.org/en/options.html). That is because your app URLs would look like `file:///path/to/your/app/index.html/my-route/`, which makes no sense in UNIX filesystem architecture.
-
-### Building and packaging your app
-
-*See [`commands`](commands.md).*
-
-seed provides you a way to quickly and easily package your app into a Windows, OS X or Linux portable binary with:
-
-```bash
-$ npm run build
-```
-
-Running this command will build your app into the `dist/` folder and package it for you. Without any further parameter will package your app for your current platform. Nevertheless, you can package for any platform from any OS by adding `:darwin`, `:linux`, `:win32` or `:all` to this command (see the [commands](commands.md) section).
-
-If you just want to build without packaging, simple type `npm run build:no-package`.
-
-If you only want to package with the current `dist/` folder, simple type `npm run package`.
-
-Architecture is `x64`, but if your project is targetted at `ia32` architecture, or even both, you can modify the `build/package-electron.js` file (see [here](https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#arch) for API details).
-
-No `devDependencies` will be copied into the packaged binary, but all standard `dependencies` will, except `electron-prebuilt`, `electron-packager` and all `node_modules/.bin` executables. `releases` and `.git` folders will also be ignored, as well as development-only files and folders (`build/`, `src`, ...)
-
diff --git a/documentation/env.md b/documentation/env.md
deleted file mode 100755
index 8992dc7..0000000
--- a/documentation/env.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# Environment variables
-
-Sometimes it is practical to have different config values according to the environment that the application is running in.
-
-As an example:
-
-```js
-// config/prod.env.js
-module.exports = {
- NODE_ENV: '"production"',
- DEBUG_MODE: false,
- API_KEY: '"..."' // this is shared between all environments
-}
-
-// config/dev.env.js
-module.exports = merge(prodEnv, {
- NODE_ENV: '"development"',
- DEBUG_MODE: true // this overrides the DEBUG_MODE value of prod.env
-})
-```
-
-> **Note:** string variables need to be wrapped into single and double quotes `'"..."'`
-
-So, the environment variables are:
-- Production
- - NODE_ENV = 'production',
- - DEBUG_MODE = false,
- - API_KEY = '...'
-- Development
- - NODE_ENV = 'development',
- - DEBUG_MODE = true,
- - API_KEY = '...'
-
-As we can see, the `dev.env` inherits the `prod.env`.
-
-### Usage
-
-It is simple to use the environment variables to your code. For example:
-
-```js
-Vue.config.debug = process.env.DEBUG_MODE
-```
\ No newline at end of file
diff --git a/documentation/prerender.md b/documentation/prerender.md
deleted file mode 100755
index 7684bfd..0000000
--- a/documentation/prerender.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# Prerendering for SEO
-
-If you want to prerender routes that will not significantly change once pushed to production, use this Webpack plugin: [prerender-spa-plugin](https://www.npmjs.com/package/prerender-spa-plugin), which has been tested for use with Vue. For pages that _do_ frequently change, [Prerender.io](https://prerender.io/) and [Netlify](https://www.netlify.com/pricing) both offer plans for regularly re-prerendering your content for search engines.
diff --git a/documentation/proxy.md b/documentation/proxy.md
deleted file mode 100755
index 5143133..0000000
--- a/documentation/proxy.md
+++ /dev/null
@@ -1,26 +0,0 @@
-# API proxying during development
-
-When integrating this boilerplate with an existing backend, a common need is to access the backend API when using the dev server. To achieve that, we can run the dev server and the API backend side-by-side (or remotely), and let the dev server proxy all API requests to the actual backend.
-
-To configure the proxy rules, edit `dev.proxyTable` option in `config.js`. The dev server is using [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) for proxying, so you should refer to its docs for detailed usage. But here's a simple example:
-
-``` js
-// config.js
-module.exports = {
- // ...
- dev: {
- proxyTable: {
- // proxy all requests starting with /api to jsonplaceholder
- '/api': {
- target: 'http://jsonplaceholder.typicode.com',
- changeOrigin: true,
- pathRewrite: {
- '^/api': ''
- }
- }
- }
- }
-}
-```
-
-The above example will proxy the request `/api/posts/1` to `http://jsonplaceholder.typicode.com/posts/1`.
diff --git a/documentation/static.md b/documentation/static.md
deleted file mode 100755
index 7929cd2..0000000
--- a/documentation/static.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# Handing static assets
-
-> You will notice in the project structure we have two directories for static assets: `src/assets` and `static/`. What is the difference between them?
-
-### Webpacked Assets
-
-To answer this question, we first need to understand how Webpack deals with static assets. In `*.vue` components, all your templates and CSS are parsed by `vue-html-loader` and `css-loader` to look for asset URLs. For example, in `` and `background: url(./logo.png)`, `"./logo.png"` is a relative asset path and will be **resolved by Webpack as a module dependency**.
-
-Because `logo.png` is not JavaScript, when treated as a module dependency, we need to use `url-loader` and `file-loader` to process it. This boilerplate has already configured these loaders for you, so you basically get features such as filename fingerprinting and conditional bas64 inlining for free, while being able to use relative/module paths without worrying about deployment.
-
-Since these assets may be inlined/copied/renamed during build, they are essentially part of your source code. This is why it is recommended to place Webpack-processed static assets inside `/src`, along side other source files. In fact, you don't even have to put them all in `/src/assets`: you can organize them based on the module/component using them. For example, you can put each component in its own directory, with its static assets right next to it.
-
-### Asset Resolving Rules
-
-- **Relative URLs**, e.g. `./assets/logo.png` will be interpreted as a module dependency. They will be replaced with a auto-generated URL based on your Webpack output configuration.
-
-- **Non-prefixed URLs**, e.g. `assets/logo.png` will be treated the same as the relative URLs and translated into `./assets/logo.png`.
-
-- **URLs prefixed with `~`** are treated as a module request, similar to `require('some-module/image.png')`. You need to use this prefix if you want to leverage Webpack's module resolving configurations. For example if you have a resolve alias for `assets`, you need to use `` to ensure that alias is respected.
-
-- **Root-relative URLs**, e.g. `/assets/logo.png` are not processed at all.
-
-### Getting Asset Paths in JavaScript
-
-In order for Webpack to return the correct asset paths, you need to use `require('./relative/path/to/file.jpg')`, which will get processed by `file-loader` and returns the resolved URL. For example:
-
-``` js
-computed: {
- background () {
- return require('./bgs/' + this.id + '.jpg')
- }
-}
-```
-
-**Note the above example will include every image under `./bgs/` in the final build.** This is because Webpack cannot guess which of them will be used at runtime, so it includes them all.
-
-### "Real" Static Assets
-
-In comparison, files in `static/` are not processed by Webpack at all: they are directly copied to their final destination as-is, with the same filename. You must reference these files using absolute paths, which is determined by joining `build.assetsPublicPath` and `build.assetsSubDirectory` in `config.js`.
-
-As an example, with the following default values:
-
-``` js
-// config.js
-module.exports = {
- // ...
- build: {
- assetsPublicPath: '/',
- assetsSubDirectory: 'static'
- }
-}
-```
-
-Any file placed in `static/` should be referenced using the absolute URL `/static/[filename]`. If you change `assetSubDirectory` to `assets`, then these URLs will need to be changed to `/assets/[filename]`.
-
-We will learn more about the config file in the section about [Configure you build](build-config.md).
diff --git a/documentation/structure.md b/documentation/structure.md
deleted file mode 100755
index e71ddba..0000000
--- a/documentation/structure.md
+++ /dev/null
@@ -1,90 +0,0 @@
-# Project structure
-
-> A project structure tree to allow you to find quickly the folder you need
-
-
-
-``` bash
-.
-├── build/ # webpack config files
-│ └── ...
-├── config/
-│ ├── index.js # main project config
-│ └── ...
-├── electron/
-│ └── main.js # electron entry point
-├── locales/
-│ ├── language # translations files
-│ │ └── index.js
-│ └── index.js # init translations files wit vue-i18n
-├── settings/
-│ └── default.json # default settings
-├── releases/ # destination folder for your electron packaged apps
-│ └── ...
-├── src/
-│ ├── assets/ # module assets (processed by webpack)
-│ │ └── ...
-│ ├── components/ # ui components
-│ │ └── ...
-│ ├── data/ # app datas
-│ │ └── ...
-│ ├── lib/ # some files to different librairies
-│ │ └── ...
-│ ├── router/ # router (with routes)
-│ │ ├── index.js
-│ │ └── routes.js
-│ ├── store # store (with state, mutations and actions)
-│ │ └── index.js
-│ ├── transitions/ # vue transitions
-│ │ └── ...
-│ ├── utils/ # somes utils js files
-│ │ └── ...
-│ ├── views/ # views components
-│ │ └── ...
-│ ├── main.js # app entry file
-│ ├── App.vue # main app component
-├── static/ # pure static assets (directly copied)
-├── .babelrc # babel config
-├── .editorconfig.js # editor config
-├── .eslintrc.js # eslint config
-├── index.html # index.html template
-└── package.json # build scripts and dependencies
-```
-
-### `build/`
-
-This directory holds the actual configurations for both the development server and the production webpack build. Normally you don't need to touch these files unless you want to customize Webpack loaders, in which case you should probably look at `build/webpack.base.conf.js`.
-
-### `config/index.js`
-
-This is the main configuration file that exposes some of the most common configuration options for the build setup. See [API Proxying During Development](proxy.md) and [Configure you build](build-config.md) for more details.
-
-### `electron/`
-
-This directory holds all the electron related stuffs. The `main.js` file is the entry point for Electron, as specified in the `main` property of your `package.json`. See [Electron support](electron.md) for more details.
-
-### `settings/`
-
-This is where the settings of your app should be. The default.json file contains all the default settings and will always be loaded first as the base of your settings.
-
-### `releases/`
-
-This is where your packaged app will resides. Naming convention for packaged folders is `{project-name}-{platform}-{arch}` See [Electron support](electron.md) for more details.
-
-### `src/`
-
-This is where most of your application code will live in. How to structure everything inside this directory is largely up to you; if you are using Vuex, you can consult the [recommendations for Vuex applications](http://vuex.vuejs.org/en/structure.html).
-
-### `static/`
-
-This directory is an escape hatch for static assets that you do not want to process with Webpack. They will be directly copied into the same directory where webpack-built assets are generated.
-
-See [Handling Static Assets](static.md) for more details.
-
-### `index.html`
-
-This is the **template** `index.html` for our single page application. During development and builds, Webpack will generate assets, and the URLs for those generated assets will automatically injected into this template to render the final HTML.
-
-### `package.json`
-
-The NPM package meta file that contains all the build dependencies and [build commands](commands.md).
diff --git a/documentation/styles.md b/documentation/styles.md
deleted file mode 100755
index f92f92a..0000000
--- a/documentation/styles.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# Styles
-
-> seed template uses SASS as pre-processors
-
-### Using SASS in App
-
-To ensure consistent extraction and processing, it is recommended to import global, standalone style files from your root `App.vue` component, for example:
-
-``` html
-
-
-```
-
-### Using SASS inside Components
-
-Inside your `*.vue` components, use the `lang` attribute on `
-```
-
-### A note on SASS syntax
-
-- `lang="scss"` corresponds to the CSS-superset syntax (with curly braces and semicolones).
-- `lang="sass"` corresponds to the indentation-based syntax.
-
diff --git a/documentation/summary.md b/documentation/summary.md
deleted file mode 100755
index 2b6193d..0000000
--- a/documentation/summary.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# Summary
-
-- [Project structure](structure.md)
-- [Build commands](commands.md)
-- [Styles](styles.md)
-- [Handling static assets](static.md)
-- [Environment variables](env.md)
-- [Electron support](electron.md)
-- [Configure your build](build-config.md)
-- [API proxying during development](proxy.md)
-- [Prerendering for SEO](prerender.md)
diff --git a/meta.js b/meta.js
index 6b1dc2a..149b3c5 100755
--- a/meta.js
+++ b/meta.js
@@ -15,13 +15,6 @@ module.exports = {
type: 'string',
message: 'Author'
},
- electron: {
- type: 'confirm',
- message: 'Setup Electron support (might break browser support)?'
- }
- },
- filters: {
- 'electron/:*+/*': 'electron'
},
helpers: {
chandeDirectory: () => {
@@ -30,5 +23,5 @@ module.exports = {
: ` cd ${process.argv[3]}\n`
}
},
- completeMessage: 'To get started:\n\n{{chandeDirectory}} npm install\n npm start\n\nDocumentation can be found at https://pierrechls.github.io/seed'
+ completeMessage: 'To get started:\n\n{{chandeDirectory}} yarn install\n yarn serve\n\nDocumentation can be found at https://pierrechls.github.io/seed'
}
diff --git a/package.json b/package.json
index 169aca5..b8eb33f 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,14 @@
{
"name": "vue-cli-template",
- "version": "2.1.1",
+ "version": "3.0.0",
"license": "MIT",
"description": "A vue-cli template who plants the first seed of your project in order to become a sturdy and flowering tree",
"scripts": {
- "serve-doc": "cd documentation && gitbook serve",
- "deploy-doc": "bash ./deploy-doc.sh"
+ "docs:dev": "vuepress dev docs",
+ "docs:build": "vuepress build docs",
+ "docs:deploy": "bash ./deploy-doc.sh"
+ },
+ "devDependencies": {
+ "vuepress": "^0.14.10"
}
}
diff --git a/template/.babelrc b/template/.babelrc
deleted file mode 100755
index 41789ca..0000000
--- a/template/.babelrc
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "presets": ["es2015", "stage-2"],
- "plugins": ["transform-runtime"],
- "comments": false
-}
diff --git a/template/.browserslistrc b/template/.browserslistrc
new file mode 100644
index 0000000..9dee646
--- /dev/null
+++ b/template/.browserslistrc
@@ -0,0 +1,3 @@
+> 1%
+last 2 versions
+not ie <= 8
diff --git a/template/.editorconfig b/template/.editorconfig
deleted file mode 100755
index 9d08a1a..0000000
--- a/template/.editorconfig
+++ /dev/null
@@ -1,9 +0,0 @@
-root = true
-
-[*]
-charset = utf-8
-indent_style = space
-indent_size = 2
-end_of_line = lf
-insert_final_newline = true
-trim_trailing_whitespace = true
diff --git a/template/.env.dist b/template/.env.dist
new file mode 100644
index 0000000..a539789
--- /dev/null
+++ b/template/.env.dist
@@ -0,0 +1,2 @@
+NODE_ENV="development"
+VUE_APP_SEED_KEY="seed"
diff --git a/template/.eslintignore b/template/.eslintignore
deleted file mode 100755
index 34af377..0000000
--- a/template/.eslintignore
+++ /dev/null
@@ -1,2 +0,0 @@
-build/*.js
-config/*.js
diff --git a/template/.eslintrc.js b/template/.eslintrc.js
deleted file mode 100755
index af09600..0000000
--- a/template/.eslintrc.js
+++ /dev/null
@@ -1,19 +0,0 @@
-module.exports = {
- root: true,
- parserOptions: {
- sourceType: 'module'
- },
- // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
- extends: 'standard',
- // required to lint *.vue files
- plugins: [
- 'html'
- ],
- // add your custom rules here
- 'rules': {
- // allow paren-less arrow functions
- 'arrow-parens': 0,
- // allow debugger during development
- 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0
- }
-}
diff --git a/template/.gitignore b/template/.gitignore
old mode 100755
new mode 100644
index d4eea3a..f95fb1a
--- a/template/.gitignore
+++ b/template/.gitignore
@@ -1,6 +1,25 @@
.DS_Store
-node_modules/
-dist/
-npm-debug.log
-.cache/
-releases/
+node_modules
+/dist
+
+/tests/e2e/videos/
+/tests/e2e/screenshots/
+
+# local env files
+.env
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw*
diff --git a/template/README.md b/template/README.md
old mode 100755
new mode 100644
index 209c5f2..0860f83
--- a/template/README.md
+++ b/template/README.md
@@ -1,43 +1,98 @@
+[![version](https://img.shields.io/badge/version-1.0-green.svg?style=flat-square)](https://github.com/pierrechls/seed) [![front-end-framework](https://img.shields.io/badge/framework-vue.js-lightgrey.svg?style=flat-square)](http://vuejs.org/) [![router](https://img.shields.io/badge/router-vue--router-lightgrey.svg?style=flat-square)](http://router.vuejs.org/en/index.html) [![internationalization](https://img.shields.io/badge/internationalization-vue--i18n-lightgrey.svg?style=flat-square)](https://github.com/kazupon/vue-i18n) [![js-standard-style](https://img.shields.io/badge/code_style-standard-lightgrey.svg?style=flat-square)](http://standardjs.com/) [![sass-stylesheets](https://img.shields.io/badge/stylesheets-sass-lightgrey.svg?style=flat-square)](http://sass-lang.com/)
+
# {{ name }}
> {{ description }}
-[![version](https://img.shields.io/badge/version-1.0-green.svg?style=flat-square)](https://github.com/pierrechls/seed) [![front-end-framework](https://img.shields.io/badge/framework-vue.js-lightgrey.svg?style=flat-square)](http://vuejs.org/) [![router](https://img.shields.io/badge/router-vue--router-lightgrey.svg?style=flat-square)](http://router.vuejs.org/en/index.html) [![internationalization](https://img.shields.io/badge/internationalization-vue--i18n-lightgrey.svg?style=flat-square)](https://github.com/kazupon/vue-i18n) [![js-standard-style](https://img.shields.io/badge/code_style-standard-lightgrey.svg?style=flat-square)](http://standardjs.com/) [![sass-stylesheets](https://img.shields.io/badge/stylesheets-sass-lightgrey.svg?style=flat-square)](http://sass-lang.com/)
+# :grey_exclamation: Prior installation
+
+- [Node.js](https://nodejs.org/en/download/)
+- [Yarn](https://yarnpkg.com/lang/en/docs/install/)
+- [Vue CLI](https://cli.vuejs.org/guide/installation.html)
+
+# :rocket: How to install ?
+
+#### Clone the repo
+
+```bash
+$ git clone