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

Commit

Permalink
[WEEX-397][jsfm] update build script of js framework (#1199)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanks10100 committed Jul 3, 2018
1 parent b639441 commit 5238f44
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ async function build (name) {

const config = getConfig(pkgName)
const minifyConfig = getConfig(pkgName, true)
const ES6Config = getConfig(pkgName, false, true)
const ES6MinifyConfig = getConfig(pkgName, true, true)
// const ES6Config = getConfig(pkgName, false, true)
// const ES6MinifyConfig = getConfig(pkgName, true, true)

if (isWatch) {
return await runRollupOnWatch(config)
Expand All @@ -95,8 +95,8 @@ async function build (name) {
console.log(`\n => start to build ${pkgName}\n`)
await runRollup(config)
await runRollup(minifyConfig)
await runRollup(ES6Config)
await runRollup(ES6MinifyConfig)
// await runRollup(ES6Config)
// await runRollup(ES6MinifyConfig)
}
}

Expand Down
12 changes: 6 additions & 6 deletions build/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const configs = {
input: absolute('runtime/entries/index.js'),
output: {
name: 'Weex',
file: absolute('pre-build/weex-js-framework'),
file: absolute('dist/weex-js-framework'),
banner: `(this.nativeLog || function(s) {console.log(s)})`
+ `('START JS FRAMEWORK ${subversion.framework}, Build ${now()}. `
+ `(Vue: ${deps['weex-vue-framework']}, Rax: ${deps['weex-rax-framework']})');\n`
Expand All @@ -49,7 +49,7 @@ const configs = {
input: absolute('runtime/entries/env.js'),
output: {
name: 'WeexEnvironmentAPIs',
file: absolute('pre-build/weex-env'),
file: absolute('dist/weex-env'),
banner: `/* Prepare Weex Environment APIs ${subversion.framework}, Build ${now()}. */\n\n`
+ `var global = this; var process = {env:{}};`
}
Expand All @@ -58,14 +58,14 @@ const configs = {
input: absolute('runtime/entries/polyfill.js'),
output: {
format: 'iife',
file: absolute('pre-build/weex-polyfill')
file: absolute('dist/weex-polyfill')
}
},
'weex-vue': {
input: absolute('runtime/entries/vue.js'),
output: {
name: 'WeexVue',
file: absolute('pre-build/weex-vue'),
file: absolute('dist/weex-vue'),
banner: `(this.nativeLog || function(s) {console.log(s)})`
+ `('Weex JS Framework ${subversion.framework}, Build ${now()}. `
+ `(Vue: ${deps['weex-vue-framework']})');\n`
Expand All @@ -76,7 +76,7 @@ const configs = {
input: absolute('runtime/entries/rax.js'),
output: {
name: 'WeexRax',
file: absolute('pre-build/weex-rax'),
file: absolute('dist/weex-rax'),
banner: `(this.nativeLog || function(s) {console.log(s)})`
+ `('Weex JS Framework ${subversion.framework}, Build ${now()}. `
+ `(Rax: ${deps['weex-rax-framework']})');\n`
Expand All @@ -95,7 +95,7 @@ const configs = {
input: absolute('runtime/entries/legacy.js'),
output: {
name: 'WeexLegacy',
file: absolute('pre-build/weex-legacy'),
file: absolute('dist/weex-legacy'),
banner: `(this.nativeLog || function(s) {console.log(s)})`
+ `('Weex Legacy Framework ${subversion.framework}, Build ${now()}.');\n`
+ frameworkBanner
Expand Down
8 changes: 4 additions & 4 deletions scripts/build_from_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ fi

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

npm install --production
npm run install:buildtools
npm run build:source
npm install
npm run build:jsfm
npm run build:polyfill

echo "Javascript Framework and HTML5 SDK build completed."
echo "Weex JS Framework build completed."
sleep 2

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

0 comments on commit 5238f44

Please sign in to comment.