This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 365
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
254 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,9 @@ | ||
<import src="<%= baseTemplate %>"/> | ||
<template is="TPL_TRAVERSAL" data="{{ root: root }}" /> | ||
|
||
<% if (entries.length > 0) { %> | ||
<% for (let index = 0; index < entries.length; index++) { %> | ||
<template is="TPL_<%=entries[index].templateID%>" data="{{ node: root.children[<%=index%>] }}" /> | ||
<% } %> | ||
<% } else { %> | ||
<template is="TPL_TRAVERSAL" data="{{ root: root }}" /> | ||
<% } %> |
3 changes: 2 additions & 1 deletion
3
packages/remax-cli/src/__tests__/fixtures/staticCompiler/alipay/expected/alipay/app.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
{ | ||
"pages": [ | ||
"pages/index" | ||
"pages/index", | ||
"pages/entry/index" | ||
], | ||
"window": { | ||
"defaultTitle": "Alipay App", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...x-cli/src/__tests__/fixtures/staticCompiler/alipay/expected/alipay/pages/entry/index.axml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<import src="../../base.axml"/> | ||
|
||
|
||
|
||
<template is="TPL_6" data="{{ node: root.children[0] }}" /> | ||
|
57 changes: 57 additions & 0 deletions
57
...max-cli/src/__tests__/fixtures/staticCompiler/alipay/expected/alipay/pages/entry/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
var React = require('react'); | ||
require('../../npm/remax/esm/render.js'); | ||
require('../../npm/remax/esm/createAppConfig.js'); | ||
require('../../npm/remax/esm/createHostComponent.js'); | ||
require('../../npm/remax/esm/Platform.js'); | ||
var createPageConfig = require('../../npm/remax/esm/createPageConfig.js'); | ||
require('../../npm/remax/esm/index.js'); | ||
var index$2 = require('../../npm/remax/npm/remax-alipay/esm/hostComponents/View/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/ScrollView/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Swiper/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/SwiperItem/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/MovableView/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/MovableArea/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/CoverView/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/CoverImage/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Icon/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Text/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/RichText/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Progress/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Button/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/CheckboxGroup/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Checkbox/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Form/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Input/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Label/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Picker/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/PickerView/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/PickerViewColumn/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/RadioGroup/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Radio/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Slider/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Switch/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Textarea/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Navigator/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Image/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Map/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Canvas/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/WebView/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Lifestyle/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/ContactButton/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/hostComponents/Video/index.js'); | ||
require('../../npm/remax/npm/remax-alipay/esm/api/index.js'); | ||
|
||
function _ref() { | ||
return React.createElement(index$2.default, { | ||
entry: true, | ||
_tid: "6" | ||
}, React.createElement(index$2.default, null, "entry")); | ||
} | ||
|
||
var index = Page(createPageConfig.default(_ref)); | ||
|
||
exports.default = index; |
3 changes: 3 additions & 0 deletions
3
...x-cli/src/__tests__/fixtures/staticCompiler/alipay/expected/alipay/pages/entry/index.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"usingComponents": {} | ||
} |
4 changes: 3 additions & 1 deletion
4
...s/remax-cli/src/__tests__/fixtures/staticCompiler/alipay/expected/alipay/pages/index.axml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
<import src="../base.axml"/> | ||
<template is="TPL_TRAVERSAL" data="{{ root: root }}" /> | ||
|
||
|
||
<template is="TPL_TRAVERSAL" data="{{ root: root }}" /> |
2 changes: 1 addition & 1 deletion
2
packages/remax-cli/src/__tests__/fixtures/staticCompiler/alipay/src/app.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
packages/remax-cli/src/__tests__/fixtures/staticCompiler/alipay/src/pages/entry/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as React from 'react'; | ||
import { View } from 'remax/alipay'; | ||
|
||
export default function Index() { | ||
return ( | ||
<View entry> | ||
<View>entry</View> | ||
</View> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
export { default as preprocess } from './preprocess'; | ||
export { default as visit, jsxElementPathSet } from './visit'; | ||
export { default as renderTemplates } from './render/templates'; | ||
export { default as renderAsset } from './render/asset'; | ||
export { renderCommon, renderPage } from './render/asset'; | ||
export { default as constants } from './constants'; |
76 changes: 52 additions & 24 deletions
76
packages/remax-cli/src/build/plugins/compiler/static/render/asset.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.