Skip to content

Commit

Permalink
Improve dev and CI tooling (signavio#220)
Browse files Browse the repository at this point in the history
* vscode settings

* use nwb

* setup prettier

* prettified everything

* fix peer dep to react 16

also fixed bug in nwb config

* made demo run again

* improvements for examples

* input inherits the styles of the parent shared with highlighter

BREAKING CHANGE: new default inline styles for inheriting control’s
font family and size

* fixed async example

* fixed test setup

* setup linting

* made all tests run again

* removed accidentally committed .grunt dir

* fixed all readme links to prepare for moving project to signavio

* use circle instead of travis and updates badges

* setup semantic release

* fixed all lint errors

* temp disabled automatic release

* updated ssh key fingerprint

* added build-demo script

* added publish-demo script
  • Loading branch information
jfschwarz authored and frontendphil committed Feb 9, 2018
1 parent b93b5a3 commit d5c2927
Show file tree
Hide file tree
Showing 61 changed files with 6,815 additions and 3,924 deletions.
10 changes: 0 additions & 10 deletions .babelrc

This file was deleted.

128 changes: 128 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
version: 2

defaults: &defaults
working_directory: ~/project/react-mentions
docker:
- image: circleci/node:8-browsers
environment:
CHROME_BIN: "/usr/bin/google-chrome"

attach_workspace: &attach_workspace
attach_workspace:
at: ~/project

restore_cache: &restore_cache
restore_cache:
name: Restore node_modules cache
keys:
- v1-node-{{ .Branch }}-{{ checksum "yarn.lock" }}
- v1-node-{{ .Branch }}-
- v1-node-

jobs:
install:
<<: *defaults
steps:
- checkout
- *attach_workspace
- *restore_cache
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- save_cache:
name: Save yarn cache
key: v1-yarn-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- .cache/yarn
- save_cache:
name: Save node_modules cache
key: v1-node-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules/
- run:
name: Remove node_modules to cleanup workspace
command: rm -r node_modules/
- persist_to_workspace:
root: ~/project
paths:
- react-mentions

lint:
<<: *defaults
steps:
- *attach_workspace
- *restore_cache
- run:
name: Lint
command: yarn lint

test:
<<: *defaults
steps:
- *attach_workspace
- *restore_cache
- run:
name: Test
command: yarn test:coverage
- run:
name: Codecov
command: bash <(curl -s https://codecov.io/bash)

publish-demo:
<<: *defaults
steps:
- *attach_workspace
- *restore_cache
- add_ssh_keys:
fingerprints:
- "21:90:d1:2d:be:19:c0:20:da:80:8a:6f:78:78:1f:91"
- run:
name: Fix host authenticity for github.com
command: mkdir -p ~/.ssh/ && ssh-keyscan github.com >> ~/.ssh/known_hosts
- run:
name: Set git name & email
command: |
git config --global user.name "CircleCI" && git config --global user.email "[email protected]"
- run:
name: Build demo
command: yarn build-demo
- run:
name: Publish demo
command: yarn publish-demo

release:
<<: *defaults
steps:
- *attach_workspace
- *restore_cache
- run:
name: Build
command: yarn build
- run:
name: Release
command: yarn semantic-release



workflows:
version: 2
qa-publish-release:
jobs:
- install
- lint:
requires:
- install
- test:
requires:
- install
- publish-demo:
requires:
- install
# - release:
# requires:
# - lint
# - flow
# - test
# filters:
# branches:
# only: master
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
extends: "signavio"
"extends": "react-app"
}
18 changes: 7 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
.DS_Store
node_modules
gh-pages/lib
gh-pages/css
gh-pages/bundle.js
gh-pages/bundle.js.map
react-mentions.sublime-workspace
coverage
lib
.grunt
results
/coverage
/demo/dist
/es
/lib
/node_modules
/umd
npm-debug.log*
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package.json
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"javascript.validate.enable": false,
"editor.tabSize": 2,
"search.exclude": {
"**/lib": true
},
"prettier.semi": false,
"prettier.singleQuote": true,
"prettier.trailingComma": "es5"
}
46 changes: 0 additions & 46 deletions Gruntfile.js

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD License

Copyright (c) 2014, Effektif GmbH
Copyright (c) 2018, Signavio GmbH
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
Expand Down
Loading

0 comments on commit d5c2927

Please sign in to comment.