diff --git a/.eslintignore b/.eslintignore index 6f371862..1a33f1f2 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,2 @@ dist docs -example diff --git a/config/karma.config.js b/config/karma.config.js index 35cb87f9..f6a3fb22 100644 --- a/config/karma.config.js +++ b/config/karma.config.js @@ -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: { diff --git a/config/webpack.config.js b/config/webpack.config.js index 62e02339..ec9c4d8a 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -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 }) diff --git a/package.json b/package.json index 58983890..1f329754 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/index.js b/src/index.js index 052794a0..e5f2bf13 100644 --- a/src/index.js +++ b/src/index.js @@ -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 }