Skip to content

Commit

Permalink
fix(alita): 修复tpyescript 语法处理bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ykforerlang committed Nov 5, 2019
1 parent e334318 commit e96d1bc
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"@babel/plugin-syntax-jsx": "^7.0.0",
"@babel/plugin-transform-react-jsx": "^7.1.6",
"@babel/plugin-transform-runtime": "^7.5.0",
"@babel/plugin-transform-typescript": "^7.6.3",
"@babel/preset-flow": "^7.0.0",
"@babel/preset-typescript": "^7.6.0",
"@babel/traverse": "^7.1.6",
"@babel/types": "^7.1.6",
"babel-eslint": "^8.2.6",
Expand Down
9 changes: 9 additions & 0 deletions rn-template/alita.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
dependencies: [
{
name: '@areslabs/stringutil-rn',
wxName: '@areslabs/stringutil-wx',
wxVersion: '1.0.0'
}
],
}
9 changes: 9 additions & 0 deletions rn-typescript-template/alita.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
module.exports = {
dependencies: [
{
name: '@areslabs/stringutil-rn',
wxName: '@areslabs/stringutil-wx',
wxVersion: '1.0.0'
}
],
}
4 changes: 2 additions & 2 deletions src/util/uast.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const babelTransformJSX = babel.createConfigItem(require("../misc/transformJSX")


const babelFlow = babel.createConfigItem(require("@babel/preset-flow"), {type: 'presets'})
const babelTSX = babel.createConfigItem([require("@babel/plugin-syntax-typescript"), {isTSX: true}], {type: 'plugin'})
const babelTS = babel.createConfigItem([require("@babel/plugin-syntax-typescript"), {isTSX: false}], {type: 'plugin'})
const babelTSX = babel.createConfigItem([require("@babel/plugin-transform-typescript"), {isTSX: true}], {type: 'plugin'})
const babelTS = babel.createConfigItem([require("@babel/plugin-transform-typescript"), {isTSX: false}], {type: 'plugin'})

const babelRestSpread = babel.createConfigItem([require("@babel/plugin-proposal-object-rest-spread"), { "loose": true, "useBuiltIns": true }])
const babelClassProperties = babel.createConfigItem([require("@babel/plugin-proposal-class-properties"), {"loose": true}])
Expand Down

0 comments on commit e96d1bc

Please sign in to comment.