Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save okunokentaro/b58f6a6ad4cc27b99c443707c60e341f to your computer and use it in GitHub Desktop.
Save okunokentaro/b58f6a6ad4cc27b99c443707c60e341f to your computer and use it in GitHub Desktop.
素振り環境を晒す2016年末
2016/12/31 にQiitaに投稿した記事のアーカイブです
---
@armorik83です。みなさん素振りしてますか。
春に書いた『[素振り環境を晒す2016年春](http://qiita.com/armorik83/items/d4a00263fdb6dcd168ad)』の改良版。@mizchiさんの『[最強のフロントエンドの雛形作った (2016/12/31)](http://qiita.com/mizchi/items/8dc1f8a5180949f307de)』が[Flow](https://flowtype.org/) + [AVA](https://github.com/avajs/ava)環境として手頃かつ妥当だったので、個人的には使わないReactまわり、PostCSSまわりをomitした上で、自分の手に馴染む環境にアレンジしました。本家の方は`env`周りやCI周りのチューニングがされてるので見ておくといいです。
AngularやRxJSはよく使うけど、そっちはangular-cliがあるから別にいいかなと思い、プレーンにしてます。
# 構成
https://github.com/armorik83/suburi-20161231
- [AVA](https://github.com/avajs/ava)
- [Babel](https://babeljs.io/)
- [ESLint](http://eslint.org/)
- [Flow](https://flowtype.org/)
- [webpack 2.x](https://webpack.github.io/)
- [webpack-dev-server](https://github.com/webpack/webpack-dev-server)
```package.json
{
"name": "suburi-20161231",
"version": "1.0.0",
"author": "OKUNOKENTARO <okunokentaro@me.com>",
"ava": {
"require": [
"babel-register"
]
},
"devDependencies": {
"ava": "^0.17.0",
"babel-core": "^6.21.0",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.10",
"babel-plugin-transform-es2015-modules-commonjs": "^6.18.0",
"babel-plugin-transform-flow-strip-types": "^6.21.0",
"eslint": "^3.12.2",
"eslint-plugin-flowtype": "^2.29.2",
"flow-bin": "^0.37.4",
"webpack": "^2.2.0-rc.3",
"webpack-dev-server": "^2.2.0-rc.0"
},
"license": "MIT",
"main": "index.js",
"repository": "git@github.com:armorik83/suburi-20161231.git",
"scripts": {
"lint": "eslint src test",
"lint:fix": "eslint src test --fix",
"start": "webpack-dev-server",
"test": "ava",
"typecheck": "flow"
}
}
```
`.eslintrc`は若干手を入れたけど、大半は妥当なのでmizchiさんの設定からそのまま拝借。サーバには`webpack-dev-server`を入れました。`yarn start`だけでいい。スケルトンにはESLint, Flow, AVAの動作検証用のコードを入れてるので消してから使います。
小さいライブラリの開発基盤に使う予定。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment