forked from apache/incubator-weex
-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
ac04b4f
commit 9d102a5
Showing
9 changed files
with
173 additions
and
197 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
var path = require('path') | ||
var fs = require('fs') | ||
|
||
var dirPath = path.resolve(__dirname, '..', 'html5', 'runtime') | ||
var filePath = path.join(dirPath, 'config.js') | ||
if (!fs.existsSync(filePath)) { | ||
var programName = require('os').platform() === 'win32' ? 'npm.cmd' : 'npm' | ||
require('child_process').spawnSync(programName, ['run', 'build:config']) | ||
} | ||
|
||
var webpack = require('webpack') | ||
|
||
var pkg = require('../package.json') | ||
|
||
var sourceMapPlugin = new webpack.SourceMapDevToolPlugin({ | ||
test: /\.js$/ | ||
}) | ||
|
||
var version = pkg.subversion.browser | ||
|
||
var date = new Date().toISOString().split('T')[0].replace(/\-/g, '') | ||
var banner = `(function(s) {console.log(s)})` + | ||
`('START WEEX HTML5: ${version} Build ${date}');`; | ||
|
||
var bannerPlugin = new webpack.BannerPlugin(banner, { | ||
raw: true | ||
}) | ||
|
||
module.exports = { | ||
entry: './html5/browser', | ||
output: { | ||
path: './dist', | ||
filename: 'browser.common.js', | ||
}, | ||
node: { | ||
global: false | ||
}, | ||
module: { | ||
loaders: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: /node_modules/, | ||
loaders: ['babel'] | ||
}, | ||
{ test: /\.json$/, loader: 'json'}, | ||
{ test: /\.css$/, loader: 'style-loader!css-loader' } | ||
] | ||
}, | ||
plugins: [bannerPlugin, sourceMapPlugin] | ||
} |
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,23 @@ | ||
{ | ||
"name": "weex-html5", | ||
"version": "0.3.1", | ||
"description": "Weex HTML5 Renderer", | ||
"main": "dist/weex.common.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+ssh://[email protected]/alibaba/weex.git" | ||
}, | ||
"keywords": [ | ||
"weex", | ||
"html5" | ||
], | ||
"author": { | ||
"name": "mr.raindrop" | ||
}, | ||
"license": "Apache-2.0", | ||
"homepage": "https://alibaba.github.io/weex", | ||
"readmeFilename": "README.md", | ||
"bugs": { | ||
"url": "https://github.com/alibaba/weex/issues" | ||
} | ||
} |
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 |
---|---|---|
|
@@ -14,3 +14,5 @@ Weex.install(root) | |
Weex.install(div) | ||
Weex.install(components) | ||
Weex.install(api) | ||
|
||
export default Weex |
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 was deleted.
Oops, something went wrong.
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.