Skip to content

Commit

Permalink
eslint + postcss
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpurr committed Dec 17, 2017
1 parent 2b3328d commit 4f55550
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"eslint.autoFixOnSave": true,
"eslint.validate": [
"javascript",{
"language": "vue",
"autoFix": true
},
"html",
"vue",
"javascriptreact"
],
}
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
# dircle-feed-frontend
The frontend of dricle feed


## Command

```bash
npm install
# webpack build
npm run build
# mock server localhost:3000
npm run mock
```

## Technology Stack

* Webpack
* JavaScript
* ECMAScript 6
* lodash
* Babel
* ESLint
* MVVM
* Vue
* Vuex
* vue-router
* axios
* json-server // for mock
* CSS
* PostCSS
* cssnext
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
"extract-text-webpack-plugin": "^3.0.2",
"html-webpack-plugin": "^2.30.1",
"json-server": "^0.12.1",
"less": "^2.7.3",
"less-loader": "^4.0.5",
"postcss-cssnext": "^3.0.2",
"postcss-loader": "^2.0.8",
"vue-loader": "^13.5.0",
Expand Down
19 changes: 19 additions & 0 deletions src/mock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"posts": [
{
"id": 1,
"title": "json-server",
"author": "typicode"
}
],
"comments": [
{
"id": 1,
"body": "some comment",
"postId": 1
}
],
"profile": {
"name": "typicode"
}
}
13 changes: 11 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ module.exports = {
// ]
// })
},
{
test: /\.less$/,
use: [{
loader: 'style-loader' // creates style nodes from JS strings
}, {
loader: 'css-loader' // translates CSS into CommonJS
}, {
loader: 'less-loader' // compiles Less to CSS
}]
},
{
test: /\.vue$/,
loader: 'vue-loader'
Expand All @@ -45,8 +55,7 @@ module.exports = {
'eslint-loader'
],
exclude: /node_modules/
}
]
}]
},
plugins: [
new CleanWebpackPlugin(['dist']),
Expand Down

0 comments on commit 4f55550

Please sign in to comment.