Skip to content

Commit 4ff25b0

Browse files
committed
Initial commit from nwb v0.19.0
0 parents  commit 4ff25b0

File tree

11 files changed

+327
-0
lines changed

11 files changed

+327
-0
lines changed

.gitignore

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

.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+
- 6
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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Prerequisites
2+
3+
[Node.js](http://nodejs.org/) >= v4 must be installed.
4+
5+
## Installation
6+
7+
- Running `npm install` in the components's root directory will install everything you need for development.
8+
9+
## Demo Development Server
10+
11+
- `npm start` will run a development server with the component's demo app at [http://localhost:3000](http://localhost:3000) with hot module reloading.
12+
13+
## Running Tests
14+
15+
- `npm test` will run the tests once.
16+
17+
- `npm run test:coverage` will run the tests and produce a coverage report in `coverage/`.
18+
19+
- `npm run test:watch` will run the tests on every change.
20+
21+
## Building
22+
23+
- `npm run build` will build the component for publishing to npm and also bundle the demo app.
24+
25+
- `npm run clean` will delete built resources.

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# kc-react-widgets
2+
3+
[![Travis][build-badge]][build]
4+
[![npm package][npm-badge]][npm]
5+
[![Coveralls][coveralls-badge]][coveralls]
6+
7+
Describe kc-react-widgets here.
8+
9+
[build-badge]: https://img.shields.io/travis/user/repo/master.png?style=flat-square
10+
[build]: https://travis-ci.org/user/repo
11+
12+
[npm-badge]: https://img.shields.io/npm/v/npm-package.png?style=flat-square
13+
[npm]: https://www.npmjs.org/package/npm-package
14+
15+
[coveralls-badge]: https://img.shields.io/coveralls/user/repo/master.png?style=flat-square
16+
[coveralls]: https://coveralls.io/github/user/repo

demo/src/index.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React, {Component} from 'react'
2+
import {render} from 'react-dom'
3+
4+
import Example from '../../src'
5+
6+
class Demo extends Component {
7+
render() {
8+
return <div>
9+
<h1>kc-react-widgets Demo</h1>
10+
<Example/>
11+
</div>
12+
}
13+
}
14+
15+
render(<Demo/>, document.querySelector('#demo'))

nwb.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
module.exports = {
2+
type: 'react-component',
3+
npm: {
4+
esModules: true,
5+
umd: false
6+
}
7+
}

package-lock.json

Lines changed: 167 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "kc-react-widgets",
3+
"version": "1.0.0",
4+
"description": "kc-react-widgets React component",
5+
"main": "lib/index.js",
6+
"module": "es/index.js",
7+
"files": [
8+
"css",
9+
"es",
10+
"lib",
11+
"umd"
12+
],
13+
"scripts": {
14+
"build": "nwb build-react-component",
15+
"clean": "nwb clean-module && nwb clean-demo",
16+
"start": "nwb serve-react-demo",
17+
"test": "nwb test-react",
18+
"test:coverage": "nwb test-react --coverage",
19+
"test:watch": "nwb test-react --server"
20+
},
21+
"dependencies": {},
22+
"peerDependencies": {
23+
"react": "15.x"
24+
},
25+
"devDependencies": {
26+
"nwb": "0.19.x",
27+
"react": "^16.4.2",
28+
"react-dom": "^16.4.2"
29+
},
30+
"author": "",
31+
"homepage": "",
32+
"license": "MIT",
33+
"repository": "",
34+
"keywords": [
35+
"react-component"
36+
]
37+
}

src/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React, {Component} from 'react'
2+
3+
export default class extends Component {
4+
render() {
5+
return <div>
6+
<h2>Welcome to React components</h2>
7+
</div>
8+
}
9+
}

tests/.eslintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"env": {
3+
"mocha": true
4+
}
5+
}

0 commit comments

Comments
 (0)