Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-jsx-dom-expressions

Package Overview
Dependencies
Maintainers
1
Versions
376
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-jsx-dom-expressions - npm Package Compare versions

Comparing version 0.0.7 to 0.0.8

dist/createRuntime.js

7

package.json
{
"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(),

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc