Comparing version 0.3.0 to 0.3.1
@@ -17,3 +17,3 @@ 'use strict'; | ||
if (typeof nextState === 'function') { | ||
nextState = nextState(this.state); | ||
nextState = nextState(this.state, this.props); | ||
} | ||
@@ -20,0 +20,0 @@ |
{ | ||
"name": "ink", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "React for CLI", | ||
@@ -13,3 +13,3 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=4" | ||
"node": ">=6" | ||
}, | ||
@@ -43,3 +43,3 @@ "scripts": { | ||
"lodash.isequal": "^4.5.0", | ||
"log-update": "^1.0.2", | ||
"log-update": "^2.1.0", | ||
"prop-types": "^15.5.10" | ||
@@ -46,0 +46,0 @@ }, |
@@ -69,2 +69,5 @@ <h1 align="center"> | ||
- [ink-spinner](https://github.com/vadimdemedes/ink-spinner) - Spinner. | ||
- [ink-console](https://github.com/ForbesLindesay/ink-console) - Render output from `console[method]` calls in a scrollable panel. | ||
- [ink-image](https://github.com/kevva/ink-image) - Display images inside the terminal. | ||
- [ink-checkbox-list](https://github.com/MaxMEllon/ink-checkbox-list) - Checkbox. | ||
@@ -91,4 +94,21 @@ | ||
To ensure all examples work and you can begin your adventure with Ink, make sure to set up a JSX transpiler and set JSX pragma to `h`. Don' forget to import `h` into every file that contains JSX. | ||
To ensure all examples work and you can begin your adventure with Ink, make sure to set up a JSX transpiler and set JSX pragma to `h`. You can use [`babel-plugin-transform-react-jsx`](https://babeljs.io/docs/plugins/transform-react-jsx/) to do this. For example, in `package.json`: | ||
```json | ||
{ | ||
"babel": { | ||
"plugins": [ | ||
[ | ||
"transform-react-jsx", | ||
{ | ||
"pragma": "h" | ||
} | ||
] | ||
] | ||
} | ||
} | ||
``` | ||
Don't forget to import `h` into every file that contains JSX: | ||
```jsx | ||
@@ -95,0 +115,0 @@ const {h} = require('ink'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28795
523
+ Addedansi-escapes@3.2.0(transitive)
+ Addedansi-regex@3.0.1(transitive)
+ Addedcli-cursor@2.1.0(transitive)
+ Addedis-fullwidth-code-point@2.0.0(transitive)
+ Addedlog-update@2.3.0(transitive)
+ Addedmimic-fn@1.2.0(transitive)
+ Addedonetime@2.0.1(transitive)
+ Addedrestore-cursor@2.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedstring-width@2.1.1(transitive)
+ Addedstrip-ansi@4.0.0(transitive)
+ Addedwrap-ansi@3.0.1(transitive)
- Removedansi-escapes@1.4.0(transitive)
- Removedcli-cursor@1.0.2(transitive)
- Removedexit-hook@1.1.1(transitive)
- Removedlog-update@1.0.2(transitive)
- Removedonetime@1.1.0(transitive)
- Removedrestore-cursor@1.0.1(transitive)
Updatedlog-update@^2.1.0