babel-plugin-jsx-dom-expressions
Advanced tools
Comparing version 0.0.7 to 0.0.8
{ | ||
"name": "babel-plugin-jsx-dom-expressions", | ||
"description": "A JSX to DOM plugin that wraps expressions for fine grained render libraries", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"author": "Ryan Carniato", | ||
@@ -10,3 +10,6 @@ "license": "MIT", | ||
"scripts": { | ||
"prepublishOnly": "rollup -f \"cjs\" -c -o lib/index.js" | ||
"buildPlugin": "rollup -f \"cjs\" -c -o lib/index.js src/index.coffee", | ||
"buildRuntimeES": "rollup -f \"es\" -c -o dist/createRuntime.js src/createRuntime/index.coffee", | ||
"buildRuntimeCJS": "rollup -f \"cjs\" -c -o lib/createRuntime.js src/createRuntime/index.coffee", | ||
"prepublishOnly": "npm run buildPlugin && npm run buildRuntimeES && npm run buildRuntimeCJS" | ||
}, | ||
@@ -13,0 +16,0 @@ "devDependencies": { |
@@ -13,16 +13,12 @@ # Babel Plugin JSX DOM Expressions | ||
To write a wrapper you create an object with the following methods: | ||
To write a runtime you create an object with the following methods: | ||
wrap(accessor, fn): | ||
### wrap(accessor, fn) | ||
This is called around attribute expressions. Generally this will be a straight mapping to a computed or equivalent in your library. | ||
This is called around attribute expressions. Call fn with the resolved value. | ||
insert(parentNode, multi, accessor): | ||
### wrapContent(accessor, fn) | ||
This handles content expressions (expressions between the tags). Multi indicates whether there is only a single expression or multiple expressions/tags between the parent tags which can allow for optimization. This method typically works much more like a hyperscript function with a big switch statment to handle different data types. | ||
This called around content expressions. Call fn with the resolved value. | ||
assign(obj1, obj2): | ||
This is used in a few places and for spreads. Use the approach of choice to merge object properties. | ||
## Work in Progress | ||
@@ -29,0 +25,0 @@ |
@@ -5,3 +5,2 @@ import coffee2 from 'rollup-plugin-coffee2'; | ||
export default { | ||
input: 'src/index.coffee', | ||
plugins: [ | ||
@@ -8,0 +7,0 @@ coffee2(), |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
49224
7
1372
35
1