jsx-transform
Advanced tools
Comparing version 0.10.1 to 0.11.0
@@ -44,3 +44,2 @@ /*! | ||
* (i.e. `class` to `className`). | ||
* @param {Array=} options.tags list of known tags (default: exports.tags) | ||
* @param {Boolean=} options.tagMethods use tag name as method of jsx ident | ||
@@ -71,4 +70,3 @@ * instead of argument. If true `DOM.h1()` instead of `DOM("h1")`. | ||
transformFile: transformFile, | ||
tags: require('./tags'), | ||
visitor: visitNode | ||
}; | ||
}; |
var Syntax = require('jstransform/node_modules/esprima-fb').Syntax; | ||
var utils = require('jstransform/src/utils'); | ||
var knownTags = require('./tags'); | ||
@@ -25,6 +24,2 @@ | ||
if (!Array.isArray(options.tags)) { | ||
options.tags = knownTags; | ||
} | ||
if (options.ignoreDocblock && !options.jsx) { | ||
@@ -40,4 +35,5 @@ throw new Error("options.jsx must be specified if ignoring docblocks"); | ||
var knownTag = (~options.tags.indexOf(nameObj.name) | ||
&& nameObj.type === Syntax.XJSIdentifier); | ||
var tagName = nameObj.name; | ||
var isXJSIdentifier = nameObj.type === Syntax.XJSIdentifier; | ||
var knownTag = tagName[0] !== tagName[0].toUpperCase() && isXJSIdentifier; | ||
@@ -325,2 +321,2 @@ if (knownTag) { | ||
module.exports = visitNode; | ||
module.exports = visitNode; |
{ | ||
"name": "jsx-transform", | ||
"version": "0.10.1", | ||
"version": "0.11.0", | ||
"description": "JSX transpiler. Desugar JSX into JavaScript. A standard and configurable implementation of JSX decoupled from React.", | ||
@@ -32,3 +32,3 @@ "files": [ | ||
"dependencies": { | ||
"jstransform": "^8.2.0" | ||
"jstransform": "^9.1.0" | ||
}, | ||
@@ -42,4 +42,5 @@ "devDependencies": { | ||
"jsdoc-to-markdown": "^0.5.9", | ||
"jshint-stylish": "^1.0.0" | ||
"jshint-stylish": "^1.0.0", | ||
"vinyl-source-stream": "~1.0.0" | ||
} | ||
} |
@@ -148,3 +148,2 @@ # jsx-transform [![Build Status](http://img.shields.io/travis/alexmingoia/jsx-transform.svg?style=flat)](http://travis-ci.org/alexmingoia/jsx-transform) [![NPM version](http://img.shields.io/npm/v/jsx-transform.svg?style=flat)](https://npmjs.org/package/jsx-transform) [![Dependency Status](http://img.shields.io/david/alexmingoia/jsx-transform.svg?style=flat)](http://david-dm.org/alexmingoia/jsx-transform) | ||
(i.e. `class` to `className`). | ||
- \[tags\] `Array` - list of known tags (default: exports.tags) | ||
- \[tagMethods\] `Boolean` - use tag name as method of jsx ident | ||
@@ -151,0 +150,0 @@ instead of argument. If true `DOM.h1()` instead of `DOM("h1")`. |
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
18270
8
5
333
173
+ Addedesprima-fb@12001.1.0-dev-harmony-fb(transitive)
+ Addedjstransform@9.1.1(transitive)
- Removedesprima-fb@8001.1001.0-dev-harmony-fb(transitive)
- Removedjstransform@8.2.0(transitive)
Updatedjstransform@^9.1.0