@nozbe/zacs
Advanced tools
Comparing version 0.9.1 to 0.9.2
@@ -7,2 +7,8 @@ # Changelog | ||
## 0.9.2 (2019-09-27) | ||
- Fix issue with web installation | ||
## 0.9.1 (2019-09-05) | ||
- Initial release of `zacs` |
{ | ||
"name": "@nozbe/zacs", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"description": "Zero Abstraction Cost Styling (for React DOM and React Native)", | ||
@@ -63,3 +63,4 @@ "main": "src/index.js", | ||
"jest": "^24.9.0", | ||
"prettier": "^1.18.2" | ||
"prettier": "^1.18.2", | ||
"prettier-eslint-cli": "^5.0.0" | ||
}, | ||
@@ -66,0 +67,0 @@ "dependencies": { |
@@ -83,23 +83,2 @@ <p align="center"> | ||
For web support, you need a temporary workaround in your Webpack config, because zacs releases are not compiled yet. Sorry - this is a temporary inconvenience: | ||
```js | ||
module: { | ||
rules: [ | ||
... | ||
{ | ||
test: /\.js$/, | ||
exclude: { | ||
and: [/(node_modules)/, { not: [/zacs/] }], | ||
}, | ||
use: { | ||
loader: 'babel-loader', | ||
// ... | ||
}, | ||
}, | ||
}, | ||
... | ||
} | ||
``` | ||
## Using `zacs` | ||
@@ -176,3 +155,3 @@ | ||
Declare conditional styles as `{ [propName: string]: RNStyleOrClassName }`. If a specified prop is | ||
passed to the component with a truthy value, the corresponsing style will be added. | ||
passed to the component with a truthy value, the corresponding style will be added. | ||
@@ -179,0 +158,0 @@ <details> |
@@ -1,14 +0,17 @@ | ||
// @flow | ||
/* eslint-disable */ | ||
// TODO: Add Flow types | ||
const displayZacsError = (type: string) => (...args: any[]) => (): any => { | ||
// eslint-disable-next-line no-console | ||
console.log(`zacs error info`, args) | ||
throw new Error( | ||
`zacs.${type} method called directly (not transpiled). Your Babel file is probably misconfigured or you have a syntax error. See https://github.com/Nozbe/zacs#troubleshooting for more info`, | ||
) | ||
function displayZacsError(methodName) { | ||
return function zacsRuntimePlaceholder() { | ||
return function zacsPlaceholderComponent() { | ||
console.log(`zacs arguments passed:`, arguments) | ||
throw new Error( | ||
'zacs.' + | ||
methodName + | ||
'method called directly (not transpiled). Your Babel file is probably misconfigured or you have a syntax error. See https://github.com/Nozbe/zacs#troubleshooting for more info', | ||
) | ||
} | ||
} | ||
} | ||
export default { | ||
module.exports = { | ||
view: displayZacsError('view'), | ||
@@ -15,0 +18,0 @@ text: displayZacsError('text'), |
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
1157
87329
15
471