sygnal 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,7 +24,7 @@ Sygnal provides a structured way to create Cycle.js components that accomplishes
24
24
  - Handle all stream plumbing between components
25
25
  - Support arbitrarily complex applications with deep component hierarchies
26
26
  - Reuse the best patterns from popular frameworks like React and Vue while avoiding the pitfalls
27
- - Support pure Javascript, Typescript, and JSX
27
+ - Support pure Javascript, Typescript, and JSX (including fragments)
28
28
  - Provide application state out of the box, and make it easy to use
29
29
  - Use reasonable defaults while providing access to low-level Cycle.js functionality wherever possible
30
30
  - Provide automatic debugging information
@@ -106,7 +106,22 @@ The results will be in the 'dist' folder, and you can serve it locally by runnin
106
106
  npm preview
107
107
  ```
108
108
 
109
- Alternatively, you can use any other bundler of your choice (Webpack, Babel, Rollup, etc.). To use JSX in your components while using alternative bundlers, you will need to install [snabbdom-pragma](https://www.npmjs.com/package/snabbdom-pragma) and configure your bundler to use it for transforming JSX (see [examples here](https://www.npmjs.com/package/snabbdom-pragma#usage "snabbdom-pragma bundler configuration examples")).
109
+ Alternatively, you can use any other bundler of your choice (Webpack, Babel, Rollup, etc.). To use JSX in your components while using alternative bundlers, you will need to configure your bundler to use Sygnal's JSX pragma. This is slightly different for each bundler, but looks generally like:
110
+
111
+ ```javascript
112
+ // this example is for Vite or esbuild, but most bundlers have options similar to this for handling JSX transpiling
113
+ {
114
+ ...,
115
+ esbuild: {
116
+ // add the import for Sygnal's JSX and Fragment handler to the top of each .jsx and .tsx page automatically
117
+ jsxInject: `import { jsx, Fragment } from 'sygnal/jsx'`
118
+ // tell the transpiler to use Sygnal's 'jsx' funtion to render JSX elements
119
+ jsxFactory: `jsx`,
120
+ // tell the transpiler to use Sygnal's 'Fragment' funtion to render JSX fragments (<>...</>)
121
+ jsxFragment: 'Fragment',
122
+ },
123
+ }
124
+ ```
110
125
 
111
126
 
112
127
  ## Initialization
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sygnal",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "An intuitive framework for building fast and small components or applications based on Cycle.js",
5
5
  "main": "./dist/index.js",
6
6
  "exports": {
Binary file
package/sygnal-1.2.1.tgz DELETED
Binary file
package/sygnal-2.0.0.tgz DELETED
Binary file
package/sygnal-2.0.1.tgz DELETED
Binary file