Skip to content

Commit 2d58e79

Browse files
committed
v1
Added unit tests Updated readme Updated component package.json
1 parent 0441851 commit 2d58e79

20 files changed

+917
-241
lines changed

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
11
# Boilerplate Component
22

3-
A boilerplate React component project for development and testing before publishing to NPM
3+
A simple calculator component with the basic operations
44

55
## Prerequisites
66

7-
This component makes use of Bootstrap 4 class names, install bootstrap to your project or apply your own styles to the class names.
8-
9-
* [Bootstrap v4.3](http://www.dropwizard.io/1.0.2/docs/) - Front-end component library
107
* [React ^16.9.0](https://reactjs.org/) - Javascript library for user interfaces
118

129
## Installing
1310

1411
```
15-
npm install @kevinorriss/boilerplate
12+
npm install @kevinorriss/calculator
1613
```
1714

1815
## Usage
1916

2017
Import the component
2118

2219
```
23-
import Boilerplate from '@kevinorriss/boilerplate'
20+
import Calculator from '@kevinorriss/calculator'
2421
2522
...
2623
2724
<!-- JSX -->
2825
<div className="your-container">
29-
<Boilerplate />
26+
<Calculator />
3027
</div>
3128
```
3229

@@ -40,7 +37,7 @@ cd ./component
4037
yarn link
4138
4239
cd ..
43-
yarn link @kevinorriss/boilerplate
40+
yarn link @kevinorriss/calculator
4441
```
4542

4643
### Start the app
@@ -63,8 +60,6 @@ yarn test
6360

6461
This project uses Jest and Enzyme for its unit tests, simply run the above code to run the test suites.
6562

66-
If you want the tests to run during development, you will need to have rollup watching too!
67-
6863
## Author
6964

7065
* **Kevin Orriss** - [orriss.io](http://orriss.io)

component/README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
11
# Boilerplate Component
22

3-
A boilerplate React component project for development and testing before publishing to NPM
3+
A simple calculator component with the basic operations
44

55
## Prerequisites
66

7-
This component makes use of Bootstrap 4 class names, install bootstrap to your project or apply your own styles to the class names.
8-
9-
* [Bootstrap v4.3](http://www.dropwizard.io/1.0.2/docs/) - Front-end component library
107
* [React ^16.9.0](https://reactjs.org/) - Javascript library for user interfaces
118

129
## Installing
1310

1411
```
15-
npm install @kevinorriss/boilerplate
12+
npm install @kevinorriss/calculator
1613
```
1714

1815
## Usage
1916

2017
Import the component
2118

2219
```
23-
import Boilerplate from '@kevinorriss/boilerplate'
20+
import Calculator from '@kevinorriss/calculator'
2421
2522
...
2623
2724
<!-- JSX -->
2825
<div className="your-container">
29-
<Boilerplate />
26+
<Calculator />
3027
</div>
3128
```
3229

@@ -40,7 +37,7 @@ cd ./component
4037
yarn link
4138
4239
cd ..
43-
yarn link @kevinorriss/boilerplate
40+
yarn link @kevinorriss/calculator
4441
```
4542

4643
### Start the app
@@ -63,8 +60,6 @@ yarn test
6360

6461
This project uses Jest and Enzyme for its unit tests, simply run the above code to run the test suites.
6562

66-
If you want the tests to run during development, you will need to have rollup watching too!
67-
6863
## Author
6964

7065
* **Kevin Orriss** - [orriss.io](http://orriss.io)

component/package.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
{
22
"name": "@kevinorriss/calculator",
33
"version": "1.0.0",
4-
"description": "",
4+
"description": "A simple calculator component with the basic operations",
55
"main": "build/calculator.min.js",
66
"scripts": {
77
"build": "rollup -c -o build/calculator.min.js",
88
"dev": "rollup -c --watch -o build/calculator.min.js"
99
},
1010
"author": "Kevin Orriss <[email protected]>",
1111
"license": "ISC",
12+
"repository": {
13+
"type" : "git",
14+
"url" : "https://github.com/kevinorriss/reactjs-component-calculator",
15+
"directory": "component/"
16+
},
1217
"devDependencies": {
1318
"@babel/core": "^7.6.0",
1419
"@babel/plugin-proposal-class-properties": "^7.5.5",
@@ -20,5 +25,7 @@
2025
"rollup-plugin-postcss": "^2.0.3",
2126
"rollup-plugin-uglify": "^6.0.3"
2227
},
23-
"dependencies": {}
28+
"dependencies": {
29+
"math-expression-evaluator": "^1.2.17"
30+
}
2431
}

0 commit comments

Comments
 (0)