mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-06-03 10:46:19 +00:00
Misc fixes
This commit is contained in:
@@ -1,3 +1,2 @@
|
|||||||
dist
|
dist
|
||||||
docs
|
docs
|
||||||
example
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ module.exports = function (config) {
|
|||||||
preprocessors: {
|
preprocessors: {
|
||||||
'src/specs.bundle.js': [ 'webpack', 'sourcemap' ]
|
'src/specs.bundle.js': [ 'webpack', 'sourcemap' ]
|
||||||
},
|
},
|
||||||
reporters: [ process.env.TRAVIS ? 'dots' : 'progress' ],
|
reporters: [ 'dots' ],
|
||||||
singleRun: true,
|
singleRun: true,
|
||||||
webpack: assign({}, webpackConfig, { devtool: 'inline' }),
|
webpack: assign({}, webpackConfig, { devtool: 'inline' }),
|
||||||
webpackMiddleware: {
|
webpackMiddleware: {
|
||||||
|
|||||||
+15
-10
@@ -3,6 +3,20 @@ var base = require('./webpack-base.config.js')
|
|||||||
var webpack = require('webpack')
|
var webpack = require('webpack')
|
||||||
var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin
|
var UglifyJsPlugin = webpack.optimize.UglifyJsPlugin
|
||||||
|
|
||||||
|
var plugins = []
|
||||||
|
if (process.env.NODE_ENV === 'production') {
|
||||||
|
plugins.push(
|
||||||
|
new UglifyJsPlugin({
|
||||||
|
compress: {
|
||||||
|
dead_code: true,
|
||||||
|
drop_console: true,
|
||||||
|
screw_ie8: true,
|
||||||
|
warnings: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = assign({}, base, {
|
module.exports = assign({}, base, {
|
||||||
entry: {
|
entry: {
|
||||||
main: './src/index'
|
main: './src/index'
|
||||||
@@ -16,14 +30,5 @@ module.exports = assign({}, base, {
|
|||||||
libraryTarget: 'commonjs2',
|
libraryTarget: 'commonjs2',
|
||||||
path: './dist'
|
path: './dist'
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: plugins
|
||||||
new UglifyJsPlugin({
|
|
||||||
compress: {
|
|
||||||
dead_code: true,
|
|
||||||
drop_console: true,
|
|
||||||
screw_ie8: true,
|
|
||||||
warnings: true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
]
|
|
||||||
})
|
})
|
||||||
|
|||||||
+4
-1
@@ -9,6 +9,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"prepublish": "NODE_ENV=production npm run build",
|
"prepublish": "NODE_ENV=production npm run build",
|
||||||
"build": "rm -rf ./dist && webpack --config config/webpack.config.js --sort-assets-by --progress",
|
"build": "rm -rf ./dist && webpack --config config/webpack.config.js --sort-assets-by --progress",
|
||||||
|
"example": "cd example && webpack --config webpack.config.js",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"specs": "NODE_ENV=test karma start config/karma.config.js",
|
"specs": "NODE_ENV=test karma start config/karma.config.js",
|
||||||
"specs:watch": "npm run specs -- --no-single-run",
|
"specs:watch": "npm run specs -- --no-single-run",
|
||||||
@@ -16,7 +17,9 @@
|
|||||||
"test": "npm run specs && npm run lint"
|
"test": "npm run specs && npm run lint"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "^0.13.3"
|
"react": "^0.13.3",
|
||||||
|
"react-swipeable": "^3.0.2",
|
||||||
|
"react-tappable": "^0.6.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"autoprefixer-core": "^5.2.1",
|
"autoprefixer-core": "^5.2.1",
|
||||||
|
|||||||
+12
-4
@@ -1,16 +1,24 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
// components
|
// components
|
||||||
import Image from './modules/Image'
|
import Image from './components/Image'
|
||||||
import Text from './modules/Text'
|
import ListView from './components/ListView'
|
||||||
import TextInput from './modules/TextInput'
|
import ScrollView from './components/ScrollView'
|
||||||
import View from './modules/View'
|
import Swipeable from './components/Swipeable'
|
||||||
|
import Text from './components/Text'
|
||||||
|
import TextInput from './components/TextInput'
|
||||||
|
import Touchable from './components/Touchable'
|
||||||
|
import View from './components/View'
|
||||||
|
|
||||||
export default React
|
export default React
|
||||||
|
|
||||||
export {
|
export {
|
||||||
Image,
|
Image,
|
||||||
|
ListView,
|
||||||
|
ScrollView,
|
||||||
|
Swipeable,
|
||||||
Text,
|
Text,
|
||||||
TextInput,
|
TextInput,
|
||||||
|
Touchable,
|
||||||
View
|
View
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user