Comparing version 1.4.6 to 1.4.7
@@ -13,3 +13,4 @@ const transpileJSX = require('./lib/components'); | ||
const jsx = (input, config = {}) => { | ||
const { e, ef, i, ias, ii } = makeMarkers({ | ||
const { e, defObj, ef, i, ias, ii } = makeMarkers({ | ||
defObj: /^ *export\s+default\s+{[\s\S]+?}/mg, | ||
e: /^ *export\s+(?:default\s+)?/mg, | ||
@@ -29,7 +30,7 @@ ef: /^ *export\s+{[^}]+}\s+from\s+(['"])(?:.+?)\1/mg, | ||
const s = SyncReplaceable(input, [ | ||
makeCutRule(ef), makeCutRule(e), | ||
makeCutRule(ef), makeCutRule(defObj), makeCutRule(e), | ||
makeCutRule(i), makeCutRule(ias), makeCutRule(ii)]) | ||
const tt = transpileJSX(s, config) | ||
const as = SyncReplaceable(tt, [ | ||
makePasteRule(ef), makePasteRule(e), | ||
makePasteRule(ef), makePasteRule(defObj), makePasteRule(e), | ||
makePasteRule(i), makePasteRule(ias), makePasteRule(ii)]) | ||
@@ -36,0 +37,0 @@ return as |
@@ -0,1 +1,7 @@ | ||
## 16 April 2019 | ||
### [1.4.7](https://github.com/a-la/jsx/compare/v1.4.6...v1.4.7) | ||
- [fix] Fix export default object support. | ||
## 3 April 2019 | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "@a-la/jsx", | ||
"version": "1.4.6", | ||
"version": "1.4.7", | ||
"description": "The JSX Transform For ÀLaMode And Other Packages.", | ||
@@ -48,13 +48,13 @@ "main": "build/index.js", | ||
"devDependencies": { | ||
"@wrote/read": "1.0.3", | ||
"alamode": "1.9.0", | ||
"documentary": "1.23.2", | ||
"@wrote/read": "^1.0.4", | ||
"alamode": "^1.9.3", | ||
"documentary": "^1.23.4", | ||
"eslint-config-artdeco": "1.0.1", | ||
"yarn-s": "1.1.0", | ||
"zoroaster": "3.11.2" | ||
"zoroaster": "^3.11.5" | ||
}, | ||
"dependencies": { | ||
"@a-la/detect-jsx": "1.0.1", | ||
"restream": "3.5.1" | ||
"@a-la/detect-jsx": "^1.0.1", | ||
"restream": "^3.6.0" | ||
} | ||
} |
@@ -19,2 +19,3 @@ # @a-la/jsx | ||
- [The Dynamic Method](#the-dynamic-method) | ||
- [Limitations](#limitations) | ||
- [Copyright](#copyright) | ||
@@ -150,23 +151,48 @@ | ||
## Limitations | ||
- [ ] No JSX comments support. | ||
- [ ] Cannot use `<>` in functions, and `{}` in comments e.g., | ||
```js | ||
const C = ({ items }) => <div> | ||
{items.map((i, j) => { | ||
// stop when { 10 }: | ||
if (j > 10) return | ||
return <span>{i}</span> | ||
})} | ||
</div> | ||
``` | ||
- [ ] Cannot define components in `export default { }`, or use anything with `}`, e.g., | ||
```js | ||
export default { | ||
'my-component'() { | ||
return <div>Hello World</div> | ||
}, | ||
nested: { val: true }, | ||
} | ||
</div> | ||
``` | ||
<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/5.svg?sanitize=true"></a></p> | ||
## Copyright | ||
<table> | ||
<tr> | ||
<th> | ||
<a href="https://artd.eco"> | ||
<img src="https://github.com/wrote/wrote/raw/master/images/artdeco.png" alt="Art Deco"> | ||
</a> | ||
</th> | ||
<th>© <a href="https://artd.eco">Art Deco</a> for <a href="https://alamode.cc">À La Mode</a> 2019</th> | ||
<tr> | ||
<th> | ||
<a href="https://www.technation.sucks" title="Tech Nation Visa"> | ||
<img src="https://github.com/wrote/wrote/raw/master/images/technation.gif" alt="Tech Nation Visa"> | ||
</a> | ||
</th> | ||
<th> | ||
<a href="https://www.technation.sucks">Tech Nation Visa Sucks</a> | ||
</th> | ||
</tr> | ||
<a href="https://artd.eco"> | ||
<img src="https://raw.githubusercontent.com/wrote/wrote/master/images/artdeco.png" alt="Art Deco" /> | ||
</a> | ||
</th> | ||
<th>© <a href="https://artd.eco">Art Deco</a> for <a href="https://alamode.cc">À La Mode</a> 2019</th> | ||
<th> | ||
<a href="https://www.technation.sucks" title="Tech Nation Visa"> | ||
<img src="https://raw.githubusercontent.com/artdecoweb/www.technation.sucks/master/anim.gif" | ||
alt="Tech Nation Visa" /> | ||
</a> | ||
</th> | ||
<th><a href="https://www.technation.sucks">Tech Nation Visa Sucks</a></th> | ||
</tr> | ||
</table> | ||
<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/-1.svg?sanitize=true"></a></p> |
@@ -13,3 +13,4 @@ import transpileJSX from './lib/components' | ||
const jsx = (input, config = {}) => { | ||
const { e, ef, i, ias, ii } = makeMarkers({ | ||
const { e, defObj, ef, i, ias, ii } = makeMarkers({ | ||
defObj: /^ *export\s+default\s+{[\s\S]+?}/mg, | ||
e: /^ *export\s+(?:default\s+)?/mg, | ||
@@ -29,7 +30,7 @@ ef: /^ *export\s+{[^}]+}\s+from\s+(['"])(?:.+?)\1/mg, | ||
const s = SyncReplaceable(input, [ | ||
makeCutRule(ef), makeCutRule(e), | ||
makeCutRule(ef), makeCutRule(defObj), makeCutRule(e), | ||
makeCutRule(i), makeCutRule(ias), makeCutRule(ii)]) | ||
const tt = transpileJSX(s, config) | ||
const as = SyncReplaceable(tt, [ | ||
makePasteRule(ef), makePasteRule(e), | ||
makePasteRule(ef), makePasteRule(defObj), makePasteRule(e), | ||
makePasteRule(i), makePasteRule(ias), makePasteRule(ii)]) | ||
@@ -36,0 +37,0 @@ return as |
50568
1017
196
+ Added@a-la/detect-jsx@1.0.2(transitive)
+ Added@artdeco/clean-stack@1.2.1(transitive)
+ Addedcatchment@3.3.0(transitive)
+ Addederotic@2.1.1(transitive)
+ Addedrestream@3.7.4(transitive)
- Removed@a-la/detect-jsx@1.0.1(transitive)
- Removed@artdeco/clean-stack@1.0.1(transitive)
- Removedrestream@3.5.1(transitive)
Updated@a-la/detect-jsx@^1.0.1
Updatedrestream@^3.6.0