mirror of
https://github.com/openharmony/developtools_ace-js2bundle.git
synced 2026-07-20 21:59:23 -04:00
add card test with *.js Signed-off-by: lihong <lihong67@huawei.com> Change-Id: Ide01b23857f0ced78b392c4ce35fc27e8da82c2d
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+1101
-564
File diff suppressed because it is too large
Load Diff
@@ -24,9 +24,7 @@ const codegen = require("./codegen/index.js");
|
||||
module.exports = function (source, map) {
|
||||
this.cacheable && this.cacheable();
|
||||
const callback = this.async();
|
||||
if (process.env.DEVICE_LEVEL === 'card') {
|
||||
codegen = require('./codegen/card-index.js');
|
||||
}
|
||||
|
||||
const parsed = codegen.genHmlAndCss(source);
|
||||
const loaderQuery = loaderUtils.getOptions(this) || {};
|
||||
if (parsed.errorType && parsed.errorType !== '') {
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"template": {
|
||||
"attr": {},
|
||||
"classList": [
|
||||
"container"
|
||||
],
|
||||
"type": "div"
|
||||
},
|
||||
"styles": {},
|
||||
"actions": {},
|
||||
"data": {
|
||||
"event": "$event.talk",
|
||||
"name": "{{map.amy}}"
|
||||
},
|
||||
"apiVersion": {}
|
||||
}
|
||||
@@ -93,4 +93,8 @@ describe('build', () => {
|
||||
const page = 'showAttr'
|
||||
expect(getActualJSON(page, 'showAttr')).eql(getExpectJSON(page, 'showAttr'));
|
||||
});
|
||||
it('withJS', () => {
|
||||
const page = 'withJS'
|
||||
expect(getActualJSON(page, 'withJS')).eql(getExpectJSON(page, 'withJS'));
|
||||
})
|
||||
});
|
||||
@@ -15,7 +15,8 @@
|
||||
"pages/inlineStyle/inlineStyle",
|
||||
"pages/mediaQuery/mediaQuery",
|
||||
"pages/privateAttr/privateAttr",
|
||||
"pages/showAttr/showAttr"
|
||||
"pages/showAttr/showAttr",
|
||||
"pages/withJS/withJS"
|
||||
],
|
||||
"window": {
|
||||
"designWidth": 720,
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<div class="container">
|
||||
</div>
|
||||
@@ -0,0 +1,6 @@
|
||||
export default {
|
||||
data: {
|
||||
name: this.map['amy'],
|
||||
event: $event.talk
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user