Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
congy committed Aug 1, 2017
0 parents commit 29c5e82
Show file tree
Hide file tree
Showing 27 changed files with 16,732 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .babelrc
@@ -0,0 +1,50 @@
{
"plugins": [
"lodash",
["transform-define", "src/constants.js"],
["syntax-dynamic-import", { "useBuiltIns": true }],
["transform-object-rest-spread", { "useBuiltIns": true }],
["transform-decorators-legacy", { "useBuiltIns": true }],
["transform-class-properties", { "useBuiltIns": true }]
],
"presets": [
[ "env", {
"targets": {
"browsers": ["> 1%", "last 2 versions"]
},
"useBuiltIns": true,
"modules": false,
"loose": true,
"exclude": [
"transform-regenerator",
"es6.set",
"es6.map",
"es6.weak-map",
"es6.weak-set",
"es6.typed.array-buffer",
"es6.typed.int8-array",
"es6.typed.uint8-array",
"es6.typed.uint8-clamped-array",
"es6.typed.int16-array",
"es6.typed.uint16-array",
"es6.typed.int32-array",
"es6.typed.uint32-array",
"es6.typed.float32-array",
"es6.typed.float64-array",
"es6.reflect.apply",
"es6.reflect.construct",
"es6.reflect.define-property",
"es6.reflect.delete-property",
"es6.reflect.get",
"es6.reflect.get-own-property-descriptor",
"es6.reflect.get-prototype-of",
"es6.reflect.has",
"es6.reflect.is-extensible",
"es6.reflect.own-keys",
"es6.reflect.prevent-extensions",
"es6.reflect.set",
"es6.reflect.set-prototype-of"
]
}]
]
}
9 changes: 9 additions & 0 deletions .editorconfig
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
2 changes: 2 additions & 0 deletions .eslintignore
@@ -0,0 +1,2 @@
node_modules
dist
59 changes: 59 additions & 0 deletions .eslintrc
@@ -0,0 +1,59 @@
{
"parser": "babel-eslint",
"env": {
"browser": true
},
"plugins": [
"html",
"prettier"
],
"settings": {
"import/resolver": {
"webpack": {
"config": "./webpack.config.js"
}
}
},
"globals": {
"module": true,
"require": true,
"IS_PROD": true,
"APP_NAME": true,
"APP_VERSION": true,
"DEFAULT_LOCALE": true,
"API_ENDPOINT": true
},
"extends": [
"airbnb-base",
"prettier"
],
"rules": {
"linebreak-style": 0,
"prettier/prettier": [
"error",
{
"tabWidth": 2,
"parser": "babylon",
"printWidth": 105,
"singleQuote": true,
"bracketSpacing": true
}
],
"no-new": 0,
"arrow-parens": 0,
"no-restricted-syntax": 0,
"eqeqeq": 0,
"operator-linebreak": 0,
"no-underscore-dangle": 0,
"semi": 0,
"global-require": 0,
"consistent-return": 0,
"no-console": [1, { "allow": ["warn", "error"] }],
"import/prefer-default-export": 0,
"no-mixed-operators": 0,
"comma-dangle": 0,
"no-plusplus": 0,
"object-curly-spacing": 0,
"brace-style": 0
}
}
5 changes: 5 additions & 0 deletions .gitignore
@@ -0,0 +1,5 @@
.DS_Store
node_modules/
dist/
npm-debug.log
yarn.lock
1 change: 1 addition & 0 deletions .npmrc
@@ -0,0 +1 @@
loglevel=silent
61 changes: 61 additions & 0 deletions README.md
@@ -0,0 +1,61 @@
## Friendly-vue-starter

Full featured Vue.js starter project for browser apps.
Main focus:
* Developer experience
* Performance
* Future-proofness

### Features

* Vue.js 2 with single file components, Sass(Scss) and [vue-class-component](https://github.com/vuejs/vue-class-component) / [vue-property-decorator](https://github.com/kaorun343/vue-property-decorator)
* GraphQL (via [apollo-client](https://github.com/apollographql/apollo-client))
* [Vuex]() state management
* [Vue-router]()
* [Vue-i18n]()
* Webpack 3
* Hot-module-replacement for Vue-components, Vuex store and intl-messages!
* Critical-path css extraction via [critical](https://github.com/addyosmani/critical)
* Full ES6/ES7 and automatic polyfilling based on browser wish to support, via [babel-preset-env](https://github.com/babel/babel-preset-env)
* Eslint with [airbnb config](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb) and [Prettier](https://github.com/prettier/prettier) integration
* Route-based code splitting
* Bundle-analyzer, bundle size optimization, friendly and beautiful webpack messages, and much more!

### Usage

```git clone```

```npm run dev``` to start the webpack-dev-servcer in development mode with hot-reloading

```npm run build``` to build and optimize the application for production use

```npm run analyze``` to build and analyze the production bundle via webpack-bundle-analyzer

```npm run clean``` to remove node_modules, package.lock, yarn.lock and dist folder

```npm run lint``` to run Eslint on whole project

```npm run check``` to check for outdated packages

There's also a husky pre-commit hook included, that will run ```eslint``` before commiting and possibly abort the operation if there are any errors.
You can also add things like flow-typechecking and unit/e2e testing here, to ensure quality of your git repository

### Roadmap

- [ ] Add unit-tests (propably via [vue-test-utils](https://github.com/vuejs/vue-test-utils) when it's finished)
- [ ] Add e2e tests (probably via [testcafe](https://github.com/DevExpress/testcafe) and [testcafe-vue-selectors](https://github.com/devexpress/testcafe-vue-selectors))
- [ ] Possibly integrated Typescript (there's and ongoing work to improve typescript experience in Vue.js)
- [ ] Possibly integrate Flow-type (currently there are a bit of problems and bugs that make flow-type (in my opinion) not-worth to use with Vue.js, but this might change in the future)

### Caveats
* Prettier will format first line of script tags in .vue files badly. There is an ongoing work on better Vue.js integration (even for templates!)

### Backend
Friendly-vue-starter is configured to use GraphQL. You can use any GraphQL backend, your custom backend or BaaS solution like [graph.cool](https://www.graph.cool/) or [scaphold.io](https://scaphold.io/)<br />
If you do not want or can't use a GraphQL backend, you can simply remove apollo-client and fetch your data using any HTTP client (I recommend using [axios](https://github.com/mzabriskie/axios))

### Contributors
<p><img src="https://cdn.pbrd.co/images/GBXxXB1.png" height="105" width="78"></p>
<p>Matúš Čongrády</p>


9 changes: 9 additions & 0 deletions index.html
@@ -0,0 +1,9 @@
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div id="app"></div>
</body>
</html>
8 changes: 8 additions & 0 deletions jsconfig.json
@@ -0,0 +1,8 @@
{
"include": [
"./src/**/*"
],
"compilerOptions": {
"experimentalDecorators": true
}
}

0 comments on commit 29c5e82

Please sign in to comment.