Skip to content

Commit

Permalink
Setup travis-ci (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
natterstefan committed Apr 18, 2018
1 parent 8a514e1 commit a01126f
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 16 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Expand Up @@ -27,6 +27,7 @@ module.exports = {
expect: true,
global: true,
it: true,
module: true,
window: true,
},
rules: {
Expand Down
8 changes: 8 additions & 0 deletions .travis.yml
@@ -0,0 +1,8 @@
language: node_js
node_js:
- "8.9"
script:
- npm run lint
- npm run lint:scss
- npm run test
- npm run build
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -49,11 +49,11 @@ Log in to trello and get your api key here: [https://trello.com/app-key][1]

```sh
yarn // or npm install
cp config.example.js config.js
```

Once you have installed all requirements and copied the `config.js` file, you
have to enter your [API key][1] and other settings into the `config.js`.
Once you have installed all requirements, yarn/npm will copy `./config/config.example.js`
for you and rename it to `./config/config.js`. You then have to customize it according to
your needs and eg. enter your [API key][1] and other settings into the `config.js`.

```js
module.exports = {
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions package.json
Expand Up @@ -25,6 +25,7 @@
"format:scss": "stylelint --fix ./src",
"lint": "eslint ./src",
"lint:scss": "stylelint ./src",
"postinstall": "./node_modules/.bin/cpy \"./config/config.example.js\" \"./config\" --no-overwrite --rename=\"config.js\"",
"precommit": "lint-staged",
"prepush": "npm test",
"start": "webpack-dev-server --hot --config webpack/dev.config.js",
Expand Down Expand Up @@ -82,6 +83,7 @@
"babel-preset-env": "1.6.1",
"babel-preset-react": "6.24.1",
"babel-preset-stage-2": "6.24.1",
"cpy-cli": "1.0.1",
"cross-env": "5.1.4",
"css-loader": "0.28.11",
"enzyme": "3.3.0",
Expand Down
2 changes: 1 addition & 1 deletion setup-jest.js
Expand Up @@ -16,7 +16,7 @@ Enzyme.configure({ adapter: new Adapter() })
// make icons available in all tests
fontawesome.library.add(brands)

jest.mock('./config', () => ({
jest.mock('./config/config', () => ({
app_title: 'Trello Multiboard',
api_key: 'your_api_key',
company_member: 'exampleusername',
Expand Down
2 changes: 1 addition & 1 deletion src/actions/boards/index.js
@@ -1,5 +1,5 @@
import { forEach } from 'lodash'
import Config from '../../../config'
import Config from '../../../config/config'
import { getMeBoards } from '../../data/trello'

const actions = {
Expand Down
2 changes: 1 addition & 1 deletion src/actions/members/index.js
@@ -1,6 +1,6 @@
import { forEach, get, map, some } from 'lodash'
import { getMember, isTrelloAvailable } from '../../data/trello'
import Config from '../../../config'
import Config from '../../../config/config'

// NOTE: currently it is not possible to
// - request a single member (eg. async or after load etc.)
Expand Down
2 changes: 1 addition & 1 deletion src/components/app-menu-container/index.js
Expand Up @@ -16,7 +16,7 @@ import ChevronRightIcon from 'material-ui-icons/ChevronRight'

// App Menu Content
import AppMenuContent from './menu'
import Config from '../../../config'
import Config from '../../../config/config'

const drawerWidth = 240

Expand Down
2 changes: 1 addition & 1 deletion src/pages/page-config.js
Expand Up @@ -12,7 +12,7 @@ import Typography from 'material-ui/Typography'

// Config & Components
import proptypes from './page-config.prop-types'
import Config from '../../config'
import Config from '../../config/config'
import AppContainer from '../components/app-menu-container'
import ErrorBoundary from '../components/error-boundary'

Expand Down
4 changes: 2 additions & 2 deletions src/utils/__tests__/get-preferred-members.test.js
Expand Up @@ -30,7 +30,7 @@ describe('utils/getPreferredMembers', () => {

test('should return an empty array if no preferred member config exists', () => {
// mock config
jest.mock('../../../config', () => ({
jest.mock('../../../config/config', () => ({
preferred_members: undefined,
}))
const getPreferredMembersDefault = require('../get-preferred-members').default
Expand All @@ -42,7 +42,7 @@ describe('utils/getPreferredMembers', () => {

test('should return an empty array if the preferred_members config is not valid', () => {
// mock config
jest.mock('../../../config', () => ({
jest.mock('../../../config/config', () => ({
preferred_members: 999, // should be a regex string
}))
const getPreferredMembersDefault = require('../get-preferred-members').default
Expand Down
2 changes: 1 addition & 1 deletion src/utils/get-board-name.js
@@ -1,5 +1,5 @@
import { findIndex, get } from 'lodash'
import Config from '../../config'
import Config from '../../config/config'

export const getBoardName = (name = '') => {
const index = findIndex(Config.boards, b => b.board === name)
Expand Down
2 changes: 1 addition & 1 deletion src/utils/get-company-member.js
@@ -1,5 +1,5 @@
import { find } from 'lodash'
import { company_member as companyMember } from '../../config'
import { company_member as companyMember } from '../../config/config'

const getCompanyMember = members => find(members, { username: companyMember })

Expand Down
2 changes: 1 addition & 1 deletion src/utils/get-preferred-members.js
@@ -1,5 +1,5 @@
import { filter, get, includes, map } from 'lodash'
import Config from '../../config'
import Config from '../../config/config'

// example:
// const members: [{ id: 'mb1', username: 'exampleusername' }, { id: 'mb2', username: 'anotheruser' }],
Expand Down
2 changes: 1 addition & 1 deletion webpack/base.config.js
Expand Up @@ -2,7 +2,7 @@ const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')

const Config = require('../config')
const Config = require('../config/config')
const pkg = require('../package.json')
const SRC_DIR = path.resolve(process.cwd(), './src')

Expand Down
51 changes: 49 additions & 2 deletions yarn.lock
Expand Up @@ -2228,6 +2228,36 @@ cosmiconfig@^4.0.0:
parse-json "^4.0.0"
require-from-string "^2.0.1"

cp-file@^3.1.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/cp-file/-/cp-file-3.2.0.tgz#6f83616254624f0ad58aa4aa8d076f026be7e188"
dependencies:
graceful-fs "^4.1.2"
mkdirp "^0.5.0"
nested-error-stacks "^1.0.1"
object-assign "^4.0.1"
pify "^2.3.0"
pinkie-promise "^2.0.0"
readable-stream "^2.1.4"

cpy-cli@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/cpy-cli/-/cpy-cli-1.0.1.tgz#67fb5a4a2dec28ca8abff375de4b9e71f6a7561c"
dependencies:
cpy "^4.0.0"
meow "^3.6.0"

cpy@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/cpy/-/cpy-4.0.1.tgz#b67267eba2f3960ba06a5a61ac94033422833424"
dependencies:
cp-file "^3.1.0"
globby "^4.0.0"
meow "^3.6.0"
nested-error-stacks "^1.0.0"
object-assign "^4.0.1"
pinkie-promise "^2.0.0"

create-ecdh@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.0.tgz#888c723596cdf7612f6498233eebd7a35301737d"
Expand Down Expand Up @@ -3820,7 +3850,7 @@ glob-to-regexp@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"

glob@^6.0.4:
glob@^6.0.1, glob@^6.0.4:
version "6.0.4"
resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22"
dependencies:
Expand Down Expand Up @@ -3874,6 +3904,17 @@ globals@^9.18.0:
version "9.18.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"

globby@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-4.1.0.tgz#080f54549ec1b82a6c60e631fc82e1211dbe95f8"
dependencies:
array-union "^1.0.1"
arrify "^1.0.0"
glob "^6.0.1"
object-assign "^4.0.1"
pify "^2.0.0"
pinkie-promise "^2.0.0"

globby@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d"
Expand Down Expand Up @@ -6023,7 +6064,7 @@ memory-fs@^0.4.0, memory-fs@~0.4.1:
errno "^0.1.3"
readable-stream "^2.0.1"

meow@^3.3.0, meow@^3.7.0:
meow@^3.3.0, meow@^3.6.0, meow@^3.7.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
dependencies:
Expand Down Expand Up @@ -6316,6 +6357,12 @@ neo-async@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.0.tgz#76b1c823130cca26acfbaccc8fbaf0a2fa33b18f"

nested-error-stacks@^1.0.0, nested-error-stacks@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-1.0.2.tgz#19f619591519f096769a5ba9a86e6eeec823c3cf"
dependencies:
inherits "~2.0.1"

nice-try@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4"
Expand Down

0 comments on commit a01126f

Please sign in to comment.