Skip to content

Commit

Permalink
Merge pull request #59 from kouhin/next
Browse files Browse the repository at this point in the history
Release 2.0
  • Loading branch information
kouhin authored Feb 5, 2018
2 parents e4ee294 + 2d78335 commit 6b9e342
Show file tree
Hide file tree
Showing 31 changed files with 2,852 additions and 2,638 deletions.
10 changes: 0 additions & 10 deletions .babelrc

This file was deleted.

13 changes: 13 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
presets: [
[
'@babel/preset-env',
{
modules: process.env.BABEL_ENV === 'es' ? false : 'commonjs',
forceAllTransforms: process.env.NODE_ENV === 'production'
}
],
'@babel/react',
'@babel/stage-1'
]
};
84 changes: 84 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
version: 2
jobs:
test:
docker:
- image: circleci/node:8-browsers
steps:
- checkout
- run: sudo npm install json -g
- run: json -f package.json -e 'this.version="0.0.0"' > .package.json
- restore_cache:
keys:
- node-cache-{{ checksum ".package.json" }}-{{ .Branch }}
- node-cache-{{ checksum ".package.json" }}
- node-cache
- run: npm install
- run: npm test
- save_cache:
key: node-cache-{{ checksum ".package.json" }}-{{ .Branch }}
paths:
- node_modules
release:
docker:
- image: circleci/node:8-browsers
steps:
- checkout
- run: sudo npm install json -g
- run: npm install
- run:
name: Publish
command: |
if [ "$(git describe --abbrev=0 --tags)" != "v$(json -f package.json version)" ]; then
git tag v`json -f package.json version`;
git push origin --tags;
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish;
fi
prerelease:
docker:
- image: circleci/node:8-browsers
steps:
- checkout
- run: sudo npm install -g json
- run: npm install
- run:
name: Publish
command: |
if [ "$(git describe --abbrev=0 --tags)" != "v$(json -f package.json version)" ]; then
git tag v`json -f package.json version`;
git push origin --tags;
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --tag next;
fi
workflows:
version: 2
build_and_publish:
jobs:
- test
- release:
type: approval
requires:
- test
filters:
branches:
only: master
- approval-release:
type: approval
requires:
- test
filters:
branches:
only: master
- release:
requires:
- approval-release
- approval-prerelease:
type: approval
requires:
- test
filters:
branches:
only: next
- prerelease:
requires:
- approval-prerelease
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
lib
dist
node_modules
node_modules
66 changes: 13 additions & 53 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,24 @@
{
"root": true,
"parser": "babel-eslint",
"extends": "eslint-config-airbnb",
"extends": [
"airbnb",
"prettier"
],
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"es6": true,
"node": true,
"mocha": true
"browser": true
},
"plugins": [
"react",
"import",
"babel"
"markdown"
],
"rules": {
"no-console": 0,
"operator-linebreak": [
2,
"after",
{
"overrides": {
"?": "before",
":": "before"
}
}
],
"react/jsx-boolean-value": [
2,
"always"
],
"react/prefer-stateless-function": 0,
"react/jsx-handler-names": [
2,
{
"eventHandlerPrefix": "handle",
"eventHandlerPropPrefix": "on"
}
],
"react/jsx-no-duplicate-props": [
2,
{
"ignoreCase": false
}
],
"react/jsx-sort-props": [
2,
{
"callbacksLast": true,
"shorthandFirst": false,
"ignoreCase": true
}
],
"react/sort-prop-types": [
2,
{
"ignoreCase": true,
"callbacksLast": true
}
],
"no-await-in-loop": 2,
"import/no-extraneous-dependencies": 0,
"react/jsx-filename-extension": 0
}
}
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
node_modules
npm-debug.log
.DS_Store
dist
lib
dist/
lib/
es/
.tern-port
.package.json
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lib/
es/
3 changes: 3 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
Loading

0 comments on commit 6b9e342

Please sign in to comment.