Misc fixes

This commit is contained in:
Nicolas Gallagher
2015-09-07 09:45:10 -07:00
parent cd215a916d
commit 50771fc5cd
5 changed files with 32 additions and 17 deletions

View File

@@ -1,3 +1,2 @@
dist
docs
example

View File

@@ -29,7 +29,7 @@ module.exports = function (config) {
preprocessors: {
'src/specs.bundle.js': [ 'webpack', 'sourcemap' ]
},
reporters: [ process.env.TRAVIS ? 'dots' : 'progress' ],
reporters: [ 'dots' ],
singleRun: true,
webpack: assign({}, webpackConfig, { devtool: 'inline' }),
webpackMiddleware: {

View File

@@ -3,6 +3,20 @@ var base = require('./webpack-base.config.js')
var webpack = require('webpack')
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, {
entry: {
main: './src/index'
@@ -16,14 +30,5 @@ module.exports = assign({}, base, {
libraryTarget: 'commonjs2',
path: './dist'
},
plugins: [
new UglifyJsPlugin({
compress: {
dead_code: true,
drop_console: true,
screw_ie8: true,
warnings: true
}
})
]
plugins: plugins
})

View File

@@ -9,6 +9,7 @@
"scripts": {
"prepublish": "NODE_ENV=production npm run build",
"build": "rm -rf ./dist && webpack --config config/webpack.config.js --sort-assets-by --progress",
"example": "cd example && webpack --config webpack.config.js",
"lint": "eslint .",
"specs": "NODE_ENV=test karma start config/karma.config.js",
"specs:watch": "npm run specs -- --no-single-run",
@@ -16,7 +17,9 @@
"test": "npm run specs && npm run lint"
},
"dependencies": {
"react": "^0.13.3"
"react": "^0.13.3",
"react-swipeable": "^3.0.2",
"react-tappable": "^0.6.0"
},
"devDependencies": {
"autoprefixer-core": "^5.2.1",

View File

@@ -1,16 +1,24 @@
import React from 'react'
// components
import Image from './modules/Image'
import Text from './modules/Text'
import TextInput from './modules/TextInput'
import View from './modules/View'
import Image from './components/Image'
import ListView from './components/ListView'
import ScrollView from './components/ScrollView'
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 {
Image,
ListView,
ScrollView,
Swipeable,
Text,
TextInput,
Touchable,
View
}