Comparing version 0.0.6 to 0.1.0
define(function(require, exports, module) { | ||
var yurine = require('./build/index')['default']; | ||
var yurine = require('./web/index')['default']; | ||
yurine.init = function() { | ||
@@ -19,2 +19,2 @@ var jsx = document.querySelectorAll('script'); | ||
module.exports = yurine; | ||
}); | ||
}); |
{ | ||
"name": "yurine", | ||
"version": "0.0.6", | ||
"description": "百合音", | ||
"version": "0.1.0", | ||
"description": "A CSX transformer for karas", | ||
"author": "army8735 <army8735@qq.com>", | ||
"maintainers": [ | ||
@@ -11,5 +12,11 @@ { | ||
], | ||
"keywords": [ | ||
"karasjs", | ||
"karas", | ||
"yurine", | ||
"csx transformer" | ||
], | ||
"scripts": { | ||
"build": "webpack --colors", | ||
"dev": "webpack --config webpack-dev.config.js --colors", | ||
"build": "gulp", | ||
"dev": "gulp watch", | ||
"test": "make test" | ||
@@ -22,8 +29,8 @@ }, | ||
"dependencies": { | ||
"homunculus": "~1.3.4", | ||
"homunculus": "~1.4.2", | ||
"jaw": "~5.0.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.0.0", | ||
"@babel/preset-env": "^7.0.0", | ||
"@babel/core": "^7.4.3", | ||
"@babel/preset-env": "^7.4.3", | ||
"babel-loader": "^8.0.4", | ||
@@ -33,8 +40,10 @@ "blanket": "^1.1.6", | ||
"expect.js": "^0.3.1", | ||
"gulp": "^3.9.0", | ||
"gulp-rimraf": "^0.2.2", | ||
"gulp-util": "^3.0.1", | ||
"mocha": "^2.2.4", | ||
"mocha-lcov-reporter": "^0.0.2", | ||
"webpack": "^4.27.1", | ||
"webpack-cli": "^3.1.2" | ||
"through2": "^3.0.0" | ||
}, | ||
"main": "./build/index", | ||
"main": "./index", | ||
"engines": { | ||
@@ -44,4 +53,3 @@ "node": ">=10.0.0" | ||
"license": "MIT", | ||
"readmeFilename": "README.md", | ||
"author": "army8735 <army8735@qq.com>" | ||
"readmeFilename": "README.md" | ||
} |
import homunculus from 'homunculus'; | ||
import linkage from './linkage'; | ||
let Token = homunculus.getClass('token', 'jsx'); | ||
let Node = homunculus.getClass('node', 'jsx'); | ||
let Token = homunculus.getClass('token', 'csx'); | ||
let Node = homunculus.getClass('node', 'csx'); | ||
@@ -7,0 +7,0 @@ function parse(node, res, param, opt) { |
@@ -8,4 +8,4 @@ import homunculus from 'homunculus'; | ||
let Token = homunculus.getClass('token', 'jsx'); | ||
let Node = homunculus.getClass('node', 'jsx'); | ||
let Token = homunculus.getClass('token', 'csx'); | ||
let Node = homunculus.getClass('node', 'csx'); | ||
@@ -12,0 +12,0 @@ let S = {}; |
import homunculus from 'homunculus'; | ||
let ES6Token = homunculus.getClass('token', 'js'); | ||
let Token = homunculus.getClass('token', 'jsx'); | ||
let Node = homunculus.getClass('node', 'jsx'); | ||
let Token = homunculus.getClass('token', 'csx'); | ||
let Node = homunculus.getClass('node', 'csx'); | ||
@@ -7,0 +7,0 @@ let S = {}; |
'use strict'; | ||
import Yurine from './Yurine'; | ||
import Yurine from './yurine'; | ||
export default Yurine; |
import homunculus from 'homunculus'; | ||
import jsx from './jsx'; | ||
import csx from './csx'; | ||
import ignore from './ignore'; | ||
@@ -7,4 +7,4 @@ import linkage from './linkage'; | ||
let Token = homunculus.getClass('token', 'jsx'); | ||
let Node = homunculus.getClass('node', 'jsx'); | ||
let Token = homunculus.getClass('token', 'csx'); | ||
let Node = homunculus.getClass('node', 'csx'); | ||
@@ -45,5 +45,5 @@ class InnerTree { | ||
switch(node.name()) { | ||
case Node.JSXElement: | ||
case Node.JSXSelfClosingElement: | ||
this.res += jsx(node, { | ||
case Node.CSXElement: | ||
case Node.CSXSelfClosingElement: | ||
this.res += csx(node, { | ||
isInBind: self.opt.isInBind || self.opt.isBind, | ||
@@ -50,0 +50,0 @@ arrowFn: self.opt.arrowFn, |
import homunculus from 'homunculus'; | ||
let Token = homunculus.getClass('token', 'jsx'); | ||
let Token = homunculus.getClass('token', 'csx'); | ||
@@ -5,0 +5,0 @@ let S = {}; |
import homunculus from 'homunculus'; | ||
import arrowfn from './arrowfn'; | ||
let Token = homunculus.getClass('token', 'jsx'); | ||
let Node = homunculus.getClass('node', 'jsx'); | ||
let Token = homunculus.getClass('token', 'csx'); | ||
let Node = homunculus.getClass('node', 'csx'); | ||
@@ -99,3 +99,3 @@ function parse(node, res, param, opt) { | ||
break; | ||
case Node.JSXElement: | ||
case Node.CSXElement: | ||
parse(node.first(), res, param, opt); | ||
@@ -106,4 +106,4 @@ for(let i = 1, leaves = node.leaves(); i < leaves.length - 1; i++) { | ||
break; | ||
case Node.JSXSelfClosingElement: | ||
case Node.JSXOpeningElement: | ||
case Node.CSXSelfClosingElement: | ||
case Node.CSXOpeningElement: | ||
for(let i = 1, leaves = node.leaves(); i < leaves.length - 1; i++) { | ||
@@ -113,5 +113,5 @@ parse(leaves[i], res, param, opt); | ||
break; | ||
case Node.JSXAttribute: | ||
case Node.CSXAttribute: | ||
let value = node.last(); | ||
if(value.name() === Node.JSXAttributeValue) { | ||
if(value.name() === Node.CSXAttributeValue) { | ||
let first = value.first(); | ||
@@ -123,3 +123,3 @@ if(first.isToken() && first.token().content() === '{') { | ||
break; | ||
case Node.JSXChild: | ||
case Node.CSXChild: | ||
node.leaves().forEach((leaf) => { | ||
@@ -126,0 +126,0 @@ parse(leaf, res, param, opt); |
import homunculus from 'homunculus'; | ||
import ignore from './ignore'; | ||
import InnerTree from './InnerTree'; | ||
import jsx from './jsx'; | ||
import csx from './csx'; | ||
import join2 from './join2'; | ||
let Token = homunculus.getClass('token', 'jsx'); | ||
let Node = homunculus.getClass('node', 'jsx'); | ||
let Token = homunculus.getClass('token', 'csx'); | ||
let Node = homunculus.getClass('node', 'csx'); | ||
@@ -37,5 +37,5 @@ let res; | ||
switch(node.name()) { | ||
case Node.JSXElement: | ||
case Node.JSXSelfClosingElement: | ||
res += jsx(node, { isBind: true, }, param); | ||
case Node.CSXElement: | ||
case Node.CSXSelfClosingElement: | ||
res += csx(node, { isBind: true, }, param); | ||
return; | ||
@@ -42,0 +42,0 @@ case Node.FNEXPR: |
import homunculus from 'homunculus'; | ||
import jsx from './jsx'; | ||
import csx from './csx'; | ||
import ignore from './ignore'; | ||
@@ -7,3 +7,3 @@ import render from './render'; | ||
let Node = homunculus.getClass('node', 'jsx'); | ||
let Node = homunculus.getClass('node', 'csx'); | ||
@@ -41,5 +41,5 @@ class Tree { | ||
switch(node.name()) { | ||
case Node.JSXElement: | ||
case Node.JSXSelfClosingElement: | ||
this.res += jsx(node, {}, this.param); | ||
case Node.CSXElement: | ||
case Node.CSXSelfClosingElement: | ||
this.res += csx(node, {}, this.param); | ||
return; | ||
@@ -46,0 +46,0 @@ case Node.CLASSDECL: |
Sorry, the diff of this file is too big to display
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
42
160881
12
4659
1
1
+ Addedhomunculus@1.4.3(transitive)
Updatedhomunculus@~1.4.2