Skip to content

Commit 0417c72

Browse files
committed
Switch to nwb
1 parent 4def05b commit 0417c72

File tree

16 files changed

+2970
-644
lines changed

16 files changed

+2970
-644
lines changed

.babelrc

Lines changed: 0 additions & 34 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 35 deletions
This file was deleted.

.eslintrc.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
parser: 'babel-eslint',
3+
extends: [
4+
'eslint:recommended',
5+
'plugin:import/recommended',
6+
'plugin:react/recommended',
7+
],
8+
parserOptions: {
9+
ecmaVersion: 6,
10+
sourceType: 'module',
11+
ecmaFeatures: {
12+
jsx: true,
13+
experimentalObjectRestSpread: true,
14+
},
15+
},
16+
env: {
17+
browser: true,
18+
node: true,
19+
jest: true,
20+
},
21+
rules: {
22+
'valid-jsdoc': 2,
23+
'react/prop-types': 0,
24+
'react/jsx-uses-react': 1,
25+
'react/jsx-no-undef': 2,
26+
'react/display-name': 0,
27+
'import/no-unresolved': ['error', { ignore: ['^react$'] }],
28+
'import/unambiguous': 0,
29+
'react/jsx-key': 0,
30+
},
31+
plugins: ['import', 'react'],
32+
};

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.log
2-
node_modules
3-
lib
4-
es
5-
dist
2+
/coverage
3+
/es
4+
/lib
5+
/node_modules
6+
/umd

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package.json

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
sudo: false
2+
3+
language: node_js
4+
node_js:
5+
- 8
6+
7+
before_install:
8+
- npm install codecov.io coveralls
9+
10+
after_success:
11+
- cat ./coverage/lcov.info | ./node_modules/codecov.io/bin/codecov.io.js
12+
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
13+
14+
branches:
15+
only:
16+
- master

CONTRIBUTING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Prerequisites
2+
3+
[Node.js](http://nodejs.org/) >= v8 must be installed.
4+
5+
## Installation
6+
7+
* Running `yarn install` in the component's root directory will install everything you need for development.
8+
9+
## Demo
10+
11+
* `yarn storybook` will run a [storybook](https://storybook.js.org/) server with the component's demo views at [http://localhost:9001](http://localhost:9001).
12+
13+
## Running Tests
14+
15+
* `yarn test` will run on every change, only the tests related to what has changed
16+
17+
* `yarn test:all` will run all the tests once
18+
19+
## Building
20+
21+
* `yarn build` will build the component for publishing to npm.
22+
23+
* `yarn clean` will delete built resources.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ You might think that this is something that `Treefold` should do itself. But if
201201
## TO-DO
202202

203203
* Ability to load children asynchronously.
204+
* Ability to control child nodes visibility via css instead of removing them from the DOM.
205+
* Ability to animate the expand/collapse action of child nodes.
204206
* Full WAI-ARIA compliance.
205207
* Improve customization to expand the use cases where this can be applied.
206208

jest.config.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
collectCoverage: true,
3+
collectCoverageFrom: ['src/**/*.{js,jsx}', '!**/node_modules/**'],
4+
coverageDirectory: 'coverage',
5+
setupTestFrameworkScriptFile: './tests/setup.js',
6+
transform: {
7+
'^.+\\.js$': '<rootDir>/jest.transform.js',
8+
},
9+
moduleFileExtensions: ['js', 'json', 'jsx'],
10+
};

jest.transform.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = require('babel-jest').createTransformer({
2+
presets: ['es2015', 'react', 'stage-1'],
3+
});

0 commit comments

Comments
 (0)