Skip to content
This repository was archived by the owner on Jun 3, 2021. It is now read-only.

Commit 5238f44

Browse files
committed
[WEEX-397][jsfm] update build script of js framework (#1199)
1 parent b639441 commit 5238f44

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

build/build.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ async function build (name) {
8585

8686
const config = getConfig(pkgName)
8787
const minifyConfig = getConfig(pkgName, true)
88-
const ES6Config = getConfig(pkgName, false, true)
89-
const ES6MinifyConfig = getConfig(pkgName, true, true)
88+
// const ES6Config = getConfig(pkgName, false, true)
89+
// const ES6MinifyConfig = getConfig(pkgName, true, true)
9090

9191
if (isWatch) {
9292
return await runRollupOnWatch(config)
@@ -95,8 +95,8 @@ async function build (name) {
9595
console.log(`\n => start to build ${pkgName}\n`)
9696
await runRollup(config)
9797
await runRollup(minifyConfig)
98-
await runRollup(ES6Config)
99-
await runRollup(ES6MinifyConfig)
98+
// await runRollup(ES6Config)
99+
// await runRollup(ES6MinifyConfig)
100100
}
101101
}
102102

build/config.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const configs = {
3838
input: absolute('runtime/entries/index.js'),
3939
output: {
4040
name: 'Weex',
41-
file: absolute('pre-build/weex-js-framework'),
41+
file: absolute('dist/weex-js-framework'),
4242
banner: `(this.nativeLog || function(s) {console.log(s)})`
4343
+ `('START JS FRAMEWORK ${subversion.framework}, Build ${now()}. `
4444
+ `(Vue: ${deps['weex-vue-framework']}, Rax: ${deps['weex-rax-framework']})');\n`
@@ -49,7 +49,7 @@ const configs = {
4949
input: absolute('runtime/entries/env.js'),
5050
output: {
5151
name: 'WeexEnvironmentAPIs',
52-
file: absolute('pre-build/weex-env'),
52+
file: absolute('dist/weex-env'),
5353
banner: `/* Prepare Weex Environment APIs ${subversion.framework}, Build ${now()}. */\n\n`
5454
+ `var global = this; var process = {env:{}};`
5555
}
@@ -58,14 +58,14 @@ const configs = {
5858
input: absolute('runtime/entries/polyfill.js'),
5959
output: {
6060
format: 'iife',
61-
file: absolute('pre-build/weex-polyfill')
61+
file: absolute('dist/weex-polyfill')
6262
}
6363
},
6464
'weex-vue': {
6565
input: absolute('runtime/entries/vue.js'),
6666
output: {
6767
name: 'WeexVue',
68-
file: absolute('pre-build/weex-vue'),
68+
file: absolute('dist/weex-vue'),
6969
banner: `(this.nativeLog || function(s) {console.log(s)})`
7070
+ `('Weex JS Framework ${subversion.framework}, Build ${now()}. `
7171
+ `(Vue: ${deps['weex-vue-framework']})');\n`
@@ -76,7 +76,7 @@ const configs = {
7676
input: absolute('runtime/entries/rax.js'),
7777
output: {
7878
name: 'WeexRax',
79-
file: absolute('pre-build/weex-rax'),
79+
file: absolute('dist/weex-rax'),
8080
banner: `(this.nativeLog || function(s) {console.log(s)})`
8181
+ `('Weex JS Framework ${subversion.framework}, Build ${now()}. `
8282
+ `(Rax: ${deps['weex-rax-framework']})');\n`
@@ -95,7 +95,7 @@ const configs = {
9595
input: absolute('runtime/entries/legacy.js'),
9696
output: {
9797
name: 'WeexLegacy',
98-
file: absolute('pre-build/weex-legacy'),
98+
file: absolute('dist/weex-legacy'),
9999
banner: `(this.nativeLog || function(s) {console.log(s)})`
100100
+ `('Weex Legacy Framework ${subversion.framework}, Build ${now()}.');\n`
101101
+ frameworkBanner

scripts/build_from_source.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ fi
2424

2525
echo "Build Weex SDK From Source...."
2626

27-
npm install --production
28-
npm run install:buildtools
29-
npm run build:source
27+
npm install
28+
npm run build:jsfm
29+
npm run build:polyfill
3030

31-
echo "Javascript Framework and HTML5 SDK build completed."
31+
echo "Weex JS Framework build completed."
3232
sleep 2
3333

3434
cp pre-build/weex-js-framework.min.js ios_sdk/WeexSDK/Resources/main.js

0 commit comments

Comments
 (0)