Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Commit

Permalink
fix: 修复跨平台开发 esm build 结果报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Darmody authored and yesmeck committed Oct 9, 2019
1 parent 530e7c6 commit cc5cd34
Show file tree
Hide file tree
Showing 39 changed files with 1,969 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/remax-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"@types/ejs": "^2.6.1",
"@types/fs-readdir-recursive": "^1.0.0",
"@types/gulp": "^4.0.6",
"@types/jest": "^24.0.15",
"@types/jest": "^24.0.18",
"@types/lodash": "^4.14.135",
"@types/node": "^12.7.2",
"@types/react": "^16.8.22",
Expand Down
18 changes: 18 additions & 0 deletions packages/remax-cli/src/__tests__/build.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
import * as path from 'path';
import runTest from './helpers/runTest';

describe('build', () => {
runTest('alipay');
runTest('wechat', 'wechat');
runTest('toutiao', 'toutiao');

runTest(
'universe',
'alipay',
path.resolve(__dirname, `./fixtures/universe/expected/alipay`)
);
runTest(
'universe',
'wechat',
path.resolve(__dirname, `./fixtures/universe/expected/wechat`)
);
runTest(
'universe',
'toutiao',
path.resolve(__dirname, `./fixtures/universe/expected/toutiao`)
);

runTest('customRootDir');
runTest('babelrc');
runTest('cssUrl');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"pages/index"
],
"window": {
"defaultTitle": "Todo App",
"defaultTitle": "Alipay App",
"titleBarColor": "#323239"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
pages: ['pages/index'],
window: {
defaultTitle: 'Todo App',
defaultTitle: 'Alipay App',
titleBarColor: '#323239',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"pages/index"
],
"window": {
"defaultTitle": "Todo App",
"titleBarColor": "#323239"
"navigationBarBackgroundColor": "#323239",
"navigationBarTitleText": "Toutiao App"
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
pages: ['pages/index'],
window: {
defaultTitle: 'Todo App',
titleBarColor: '#323239',
navigationBarBackgroundColor: '#323239',
navigationBarTitleText: 'Toutiao App',
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
App({});
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"pages": [
"pages/index"
],
"window": {
"defaultTitle": "Alipay App",
"titleBarColor": "#323239"
}
}
Loading

0 comments on commit cc5cd34

Please sign in to comment.