Skip to content

Commit

Permalink
* [all] use npm production install to avoid un-related packages
Browse files Browse the repository at this point in the history
‘npm install’ will all packages under both dependencies and devdependencies, add ‘—production’ will install packages bundle with framework.
Add a extra script command to install tools required to build.
  • Loading branch information
sospartan committed May 11, 2017
1 parent 08014a2 commit 4416a80
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
13 changes: 8 additions & 5 deletions POSSIBLE-NOTICES-FOR-BIN-DIST
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,22 @@ by mr.raindrop , licensed under the MIT License.
This product contains software modals(https://www.npmjs.com/package/modals) developed
by mr.raindrop , licensed under the MIT License.

This product contains software query-string(https://www.npmjs.com/package/query-string) developed
This product contains software autoprefixer(https://github.com/postcss/autoprefixer) developed
by postcss , licensed under the MIT License.

This product contains software query-string(https://github.com/sindresorhus/query-string) developed
by sindresorhus , licensed under the MIT License.

This product contains software weex-picker(https://www.npmjs.com/package/weex-picker) developed
This product contains software weex-picker(https://github.com/weexteam/weex-picker) developed
by abigtree , licensed under the Apache 2.0 License.

This product contains software weex-rax-framework(https://www.npmjs.com/package/weex-rax-framework) developed
This product contains software weex-rax-framework(https://github.com/alibaba/rax) developed
by yuanyan , licensed under the BSD-3-Clause License.

This product contains software weex-vue-framework(https://www.npmjs.com/package/weex-vue-framework) developed
This product contains software weex-vue-framework(https://github.com/vuejs/vue) developed
by fkysly , licensed under the MIT License.

This product contains software weex-styler(https://www.npmjs.com/package/weex-styler) developed
This product contains software weex-styler(https://github.com/weexteam/weex-styler) developed
by songsiqi , licensed under the MIT License.

This product contains software vuejs(https://github.com/vuejs/vue) developed
Expand Down
18 changes: 9 additions & 9 deletions README_RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
### Build Javascript Framework and Html5 SDK
Javascript Framework is required by SDKs. **So this must be built first.**
Install npm dependencies(You must have node&npm installed):
> `$ npm install`
> `$ npm install --production`
Install `flow-typed` module
> `$ npm install -g flow-typed`
Use `flow-typed` to install libdef:
> `$ flow-typed install`
Install build tools:
> `$ npm run install:buildtools`
Build the javascript libraries:
> `$ npm run build:source`
Expand All @@ -30,7 +27,7 @@ Move `min` version to Native SDK folder, which will be used by native SDK build.
> `cp dist/native.min.js android/sdk/assets/main.js`
### Build Android SDK
Make sure you have install gradle, see install guide in [gradle website](https://gradle.org/install).
Make sure you have install gradle, see more details about 'how to install gradle' in [gradle website](https://gradle.org/install).
Go into the `android` folder then execute
> `$ cd android `
> `$ gradle wrapper --gradle-version 2.14.1`
Expand All @@ -41,11 +38,14 @@ Create a Gradle setting file
Build the SDK
> `$ ./gradlew :sdk:assemble -PasfRelease`
Now, you can see the artifacts under `android/sdk/build/output/`.
Now, you can see the artifacts under `android/sdk/build/output/`.
You can now import the aar file to your android project.
### Build iOS SDK
Execute command below to compile iOS SDK:
> `$ xcodebuild -project ios/sdk/WeexSDK.xcodeproj -target WeexSDK_MTL`
`$ xcodebuild -project ios/sdk/WeexSDK.xcodeproj -target WeexSDK_MTL`
Then you'll found iOS library(Framework file) under `ios/sdk/Products`.
## Run Apache-Rat
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"postinstall": "bash ./bin/install-hooks.sh",
"build:native": "node build/build.js native",
"build:runtime": "node build/build.js runtime",
"build:source": "npm run build:native && npm run build:browser && npm run build:vue",
"install:tools": "npm i rollup rollup-watch rollup-plugin-buble rollup-plugin-json rollup-plugin-eslint rollup-plugin-commonjs rollup-plugin-flow rollup-plugin-flow-no-whitespace rollup-plugin-postcss rollup-plugin-replace rollup-plugin-uglify rollup-plugin-node-resolve wwp flow-bin babel-core babel-eslint babel-istanbul babel-loader babel-plugin-coverage babel-preset-es2015 babel-runtime eslint-plugin-flowtype",
"build:source": "npm run build:native && npm run build:browser && node build/build.js vue",
"build:browser": "wwp && node build/build.js browser",
"build:browser:common": "rollup -c build/rollup.browser.common.config.js",
"build:vue": "flow check && node build/build.js vue",
Expand Down Expand Up @@ -82,6 +83,7 @@
"danger": "danger"
},
"dependencies": {
"autoprefixer": "^6.7.7",
"animationjs": "^0.1.5",
"blink-diff": "~1.0.12",
"core-js": "^2.4.0",
Expand All @@ -100,7 +102,6 @@
"weex-styler": "0.1.9"
},
"devDependencies": {
"autoprefixer": "^6.7.7",
"babel-core": "^6.17.0",
"babel-eslint": "^7.2.1",
"babel-istanbul": "^0.11.0",
Expand Down

0 comments on commit 4416a80

Please sign in to comment.