Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
Chameleon
提交
5f0b7989
C
Chameleon
项目概览
DiDi
/
Chameleon
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Chameleon
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5f0b7989
编写于
4月 17, 2019
作者:
Y
yylgit
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
template-parser
上级
4cb6e7d2
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
29 addition
and
39 deletion
+29
-39
packages/chameleon-loader/src/interface-check/mvvm.js
packages/chameleon-loader/src/interface-check/mvvm.js
+0
-3
packages/chameleon-tool/configs/utils.js
packages/chameleon-tool/configs/utils.js
+0
-1
packages/mvvm-babel-generator/lib/buffer.js
packages/mvvm-babel-generator/lib/buffer.js
+1
-1
packages/mvvm-babel-generator/lib/generators/classes.js
packages/mvvm-babel-generator/lib/generators/classes.js
+1
-1
packages/mvvm-babel-generator/lib/generators/expressions.js
packages/mvvm-babel-generator/lib/generators/expressions.js
+1
-1
packages/mvvm-babel-generator/lib/generators/flow.js
packages/mvvm-babel-generator/lib/generators/flow.js
+1
-1
packages/mvvm-babel-generator/lib/generators/methods.js
packages/mvvm-babel-generator/lib/generators/methods.js
+1
-1
packages/mvvm-babel-generator/lib/generators/modules.js
packages/mvvm-babel-generator/lib/generators/modules.js
+1
-1
packages/mvvm-babel-generator/lib/generators/statements.js
packages/mvvm-babel-generator/lib/generators/statements.js
+1
-1
packages/mvvm-babel-generator/lib/generators/types.js
packages/mvvm-babel-generator/lib/generators/types.js
+2
-2
packages/mvvm-babel-generator/lib/node/index.js
packages/mvvm-babel-generator/lib/node/index.js
+1
-1
packages/mvvm-babel-generator/lib/node/parentheses.js
packages/mvvm-babel-generator/lib/node/parentheses.js
+1
-1
packages/mvvm-babel-generator/lib/node/whitespace.js
packages/mvvm-babel-generator/lib/node/whitespace.js
+1
-1
packages/mvvm-babel-generator/lib/printer.js
packages/mvvm-babel-generator/lib/printer.js
+3
-3
packages/mvvm-babel-generator/lib/source-map.js
packages/mvvm-babel-generator/lib/source-map.js
+1
-1
packages/mvvm-interface-parser/README.md
packages/mvvm-interface-parser/README.md
+2
-1
packages/mvvm-pack/compiler.js
packages/mvvm-pack/compiler.js
+1
-1
packages/mvvm-template-parser/common/index.js
packages/mvvm-template-parser/common/index.js
+1
-1
packages/mvvm-template-parser/common/process-template.js
packages/mvvm-template-parser/common/process-template.js
+1
-1
packages/mvvm-template-parser/index.js
packages/mvvm-template-parser/index.js
+8
-3
packages/mvvm-template-parser/lib/standardParser.js
packages/mvvm-template-parser/lib/standardParser.js
+0
-12
未找到文件。
packages/chameleon-loader/src/interface-check/mvvm.js
已删除
100644 → 0
浏览文件 @
4cb6e7d2
const
getInterfaceCode
=
require
(
'
mvvm-interface-parser/lib/getInterfaceCode.js
'
);
console
.
log
(
typeof
getInterfaceCode
)
\ No newline at end of file
packages/chameleon-tool/configs/utils.js
浏览文件 @
5f0b7989
...
...
@@ -211,7 +211,6 @@ exports.updateEntry = function (updateEntryConfig) {
source
=
parts
.
template
[
0
].
content
;
options
=
analyzeTemplate
(
source
,
options
)
}
}
});
let
usedBuildInTagMap
=
options
.
usedBuildInTagMap
;
...
...
packages/mvvm-babel-generator/lib/buffer.js
浏览文件 @
5f0b7989
...
...
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
exports
.
default
=
void
0
;
function
_trimRight
()
{
const
data
=
_interopRequireDefault
(
require
(
"
trim-right
"
));
const
data
=
_interopRequireDefault
(
require
(
"
../node_modules/
trim-right
"
));
_trimRight
=
function
()
{
return
data
;
...
...
packages/mvvm-babel-generator/lib/generators/classes.js
浏览文件 @
5f0b7989
...
...
@@ -12,7 +12,7 @@ exports.ClassPrivateMethod = ClassPrivateMethod;
exports
.
_classMethodHead
=
_classMethodHead
;
function
t
()
{
const
data
=
_interopRequireWildcard
(
require
(
"
@babel/types
"
));
const
data
=
_interopRequireWildcard
(
require
(
"
../../node_modules/@babel/types/lib
"
));
t
=
function
()
{
return
data
;
...
...
packages/mvvm-babel-generator/lib/generators/expressions.js
浏览文件 @
5f0b7989
...
...
@@ -28,7 +28,7 @@ exports.PrivateName = PrivateName;
exports
.
AwaitExpression
=
exports
.
YieldExpression
=
void
0
;
function
t
()
{
const
data
=
_interopRequireWildcard
(
require
(
"
@babel/types
"
));
const
data
=
_interopRequireWildcard
(
require
(
"
../../node_modules/@babel/types/lib
"
));
t
=
function
()
{
return
data
;
...
...
packages/mvvm-babel-generator/lib/generators/flow.js
浏览文件 @
5f0b7989
...
...
@@ -67,7 +67,7 @@ Object.defineProperty(exports, "StringLiteralTypeAnnotation", {
});
function
t
()
{
const
data
=
_interopRequireWildcard
(
require
(
"
@babel/types
"
));
const
data
=
_interopRequireWildcard
(
require
(
"
../../node_modules/@babel/types/lib
"
));
t
=
function
()
{
return
data
;
...
...
packages/mvvm-babel-generator/lib/generators/methods.js
浏览文件 @
5f0b7989
...
...
@@ -13,7 +13,7 @@ exports.FunctionDeclaration = exports.FunctionExpression = FunctionExpression;
exports
.
ArrowFunctionExpression
=
ArrowFunctionExpression
;
function
t
()
{
const
data
=
_interopRequireWildcard
(
require
(
"
@babel/types
"
));
const
data
=
_interopRequireWildcard
(
require
(
"
../../node_modules/@babel/types/lib
"
));
t
=
function
()
{
return
data
;
...
...
packages/mvvm-babel-generator/lib/generators/modules.js
浏览文件 @
5f0b7989
...
...
@@ -15,7 +15,7 @@ exports.ImportDeclaration = ImportDeclaration;
exports
.
ImportNamespaceSpecifier
=
ImportNamespaceSpecifier
;
function
t
()
{
const
data
=
_interopRequireWildcard
(
require
(
"
@babel/types
"
));
const
data
=
_interopRequireWildcard
(
require
(
"
../../node_modules/@babel/types/lib
"
));
t
=
function
()
{
return
data
;
...
...
packages/mvvm-babel-generator/lib/generators/statements.js
浏览文件 @
5f0b7989
...
...
@@ -19,7 +19,7 @@ exports.VariableDeclarator = VariableDeclarator;
exports
.
ThrowStatement
=
exports
.
BreakStatement
=
exports
.
ReturnStatement
=
exports
.
ContinueStatement
=
exports
.
ForOfStatement
=
exports
.
ForInStatement
=
void
0
;
function
t
()
{
const
data
=
_interopRequireWildcard
(
require
(
"
@babel/types
"
));
const
data
=
_interopRequireWildcard
(
require
(
"
../../node_modules/@babel/types/lib
"
));
t
=
function
()
{
return
data
;
...
...
packages/mvvm-babel-generator/lib/generators/types.js
浏览文件 @
5f0b7989
...
...
@@ -20,7 +20,7 @@ exports.PipelineBareFunction = PipelineBareFunction;
exports
.
PipelinePrimaryTopicReference
=
PipelinePrimaryTopicReference
;
function
t
()
{
const
data
=
_interopRequireWildcard
(
require
(
"
@babel/types
"
));
const
data
=
_interopRequireWildcard
(
require
(
"
../../node_modules/@babel/types/lib
"
));
t
=
function
()
{
return
data
;
...
...
@@ -30,7 +30,7 @@ function t() {
}
function
_jsesc
()
{
const
data
=
_interopRequireDefault
(
require
(
"
jsesc
"
));
const
data
=
_interopRequireDefault
(
require
(
"
../../node_modules/jsesc/
jsesc
"
));
_jsesc
=
function
()
{
return
data
;
...
...
packages/mvvm-babel-generator/lib/node/index.js
浏览文件 @
5f0b7989
...
...
@@ -13,7 +13,7 @@ var whitespace = _interopRequireWildcard(require("./whitespace"));
var
parens
=
_interopRequireWildcard
(
require
(
"
./parentheses
"
));
function
t
()
{
const
data
=
_interopRequireWildcard
(
require
(
"
@babel/types
"
));
const
data
=
_interopRequireWildcard
(
require
(
"
../../node_modules/@babel/types/lib
"
));
t
=
function
()
{
return
data
;
...
...
packages/mvvm-babel-generator/lib/node/parentheses.js
浏览文件 @
5f0b7989
...
...
@@ -26,7 +26,7 @@ exports.AssignmentExpression = AssignmentExpression;
exports
.
NewExpression
=
NewExpression
;
function
t
()
{
const
data
=
_interopRequireWildcard
(
require
(
"
@babel/types
"
));
const
data
=
_interopRequireWildcard
(
require
(
"
../../node_modules/@babel/types/lib
"
));
t
=
function
()
{
return
data
;
...
...
packages/mvvm-babel-generator/lib/node/whitespace.js
浏览文件 @
5f0b7989
...
...
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
exports
.
list
=
exports
.
nodes
=
void
0
;
function
t
()
{
const
data
=
_interopRequireWildcard
(
require
(
"
@babel/types
"
));
const
data
=
_interopRequireWildcard
(
require
(
"
../../node_modules/@babel/types/lib
"
));
t
=
function
()
{
return
data
;
...
...
packages/mvvm-babel-generator/lib/printer.js
浏览文件 @
5f0b7989
...
...
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
exports
.
default
=
void
0
;
function
_isInteger
()
{
const
data
=
_interopRequireDefault
(
require
(
"
lodash/isInteger
"
));
const
data
=
_interopRequireDefault
(
require
(
"
../node_modules/
lodash/isInteger
"
));
_isInteger
=
function
()
{
return
data
;
...
...
@@ -16,7 +16,7 @@ function _isInteger() {
}
function
_repeat
()
{
const
data
=
_interopRequireDefault
(
require
(
"
lodash/repeat
"
));
const
data
=
_interopRequireDefault
(
require
(
"
../node_modules/
lodash/repeat
"
));
_repeat
=
function
()
{
return
data
;
...
...
@@ -30,7 +30,7 @@ var _buffer = _interopRequireDefault(require("./buffer"));
var
n
=
_interopRequireWildcard
(
require
(
"
./node
"
));
function
t
()
{
const
data
=
_interopRequireWildcard
(
require
(
"
@babel/types
"
));
const
data
=
_interopRequireWildcard
(
require
(
"
../node_modules/@babel/types/lib
"
));
t
=
function
()
{
return
data
;
...
...
packages/mvvm-babel-generator/lib/source-map.js
浏览文件 @
5f0b7989
...
...
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
exports
.
default
=
void
0
;
function
_sourceMap
()
{
const
data
=
_interopRequireDefault
(
require
(
"
source-map
"
));
const
data
=
_interopRequireDefault
(
require
(
"
../node_modules/source-map/
source-map
"
));
_sourceMap
=
function
()
{
return
data
;
...
...
packages/mvvm-interface-parser/README.md
浏览文件 @
5f0b7989
#### mvvm协议标准中处理interface文件
\ No newline at end of file
#### 使用
chameleon-loader和interface-loader中获取interface文件内容时使用
packages/mvvm-pack/compiler.js
浏览文件 @
5f0b7989
...
...
@@ -3,7 +3,7 @@ const path = require('path');
const
Log
=
require
(
'
./log.js
'
);
const
EventEmitter
=
require
(
'
events
'
);
const
cmlUtils
=
require
(
'
chameleon-tool-utils
'
);
const
parser
=
require
(
'
mvvm-babel-parser
'
);
const
parser
=
require
(
'
../mvvm-babel-parser/lib
'
);
class
Compiler
{
constructor
(
webpackCompiler
)
{
this
.
moduleRule
=
[
// 文件后缀对应module信息
...
...
packages/mvvm-template-parser/common/index.js
浏览文件 @
5f0b7989
...
...
@@ -23,7 +23,7 @@ let source = `<template>
<view :class="true ? 'cls4' : 'cls5'"></view>
<button></button>
<third-comp1 v-on:click="click1"></third-comp1>
<origin-checkbox
:class="click1
" class="cls1"></origin-checkbox>
<origin-checkbox
v-on:click="click1" :name="13" :class="clas2
" class="cls1"></origin-checkbox>
</view>
</template>`
let
options
=
{
lang
:
'
cml
'
,
...
...
packages/mvvm-template-parser/common/process-template.js
浏览文件 @
5f0b7989
const
parser
=
require
(
'
mvvm-babel-parser
'
);
const
t
=
require
(
'
@babel/types
'
);
const
traverse
=
require
(
'
@babel/traverse
'
)[
"
default
"
];
const
generate
=
require
(
'
mvvm-babel-generator
'
)[
"
default
"
];
const
generate
=
require
(
'
mvvm-babel-generator
/lib
'
)[
"
default
"
];
const
_
=
module
.
exports
=
{};
/* 将vue语法的模板转化为cml语法
...
...
packages/mvvm-template-parser/index.js
浏览文件 @
5f0b7989
const
standardParser
=
require
(
'
./lib/standardParser
'
);
const
generator
=
require
(
'
@babel/generator
'
);
const
{
vueToCml
}
=
require
(
'
./common/process-template.js
'
);
const
parser
=
require
(
'
mvvm-babel-parser
'
);
const
generator
=
require
(
'
mvvm-babel-generator/lib
'
)
const
types
=
require
(
'
@babel/types
'
);
const
traverse
=
require
(
'
@babel/traverse
'
);
exports
.
standardParser
=
standardParser
;
exports
.
vueToCml
=
vueToCml
;
exports
.
parser
=
parser
;
exports
.
generator
=
generator
[
"
default
"
];
exports
.
types
=
types
;
exports
.
traverse
=
traverse
[
"
default
"
];
packages/mvvm-template-parser/lib/standardParser.js
已删除
100644 → 0
浏览文件 @
4cb6e7d2
const
parser
=
require
(
'
mvvm-babel-parser
'
);
module
.
exports
=
function
({
source
,
lang
=
"
cml
"
})
{
const
ast
=
parser
.
parse
(
source
,
{
sourceType
:
'
module
'
,
plugins
:
[
'
jsx
'
]
});
return
{
convert
:
ast
,
output
:
source
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录