-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
88 changed files
with
15,053 additions
and
1,674 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/node_modules | ||
/docs/.vuepress/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,42 @@ | ||
# 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`: | ||
|
||
``` bash | ||
$ 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! 👏 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 [email protected]:pierrechls/seed.git master:gh-pages | ||
|
||
cd - |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' | ||
], | ||
} | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
home: true | ||
actionText: Get Started → | ||
actionLink: /guide/ | ||
footer: MIT Licensed | Copyright © 2019-present Pierre Charles | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.