Skip to content
Permalink
Browse files

Update project config files

  • Loading branch information...
cezary committed Jul 25, 2015
1 parent cf4a059 commit 8fdbdb6cca8ceadd33c1ca2d3aa79ee950de4c75
Showing with 89 additions and 185 deletions.
  1. +4 −0 .babelrc
  2. +4 −0 .eslintignore
  3. +16 −0 .eslintrc
  4. +6 −1 .gitignore
  5. +6 −7 .npmignore
  6. +3 −0 .travis.yml
  7. +0 −157 dist/react-webcam.js
  8. +12 −7 package.json
  9. 0 {lib → src}/react-webcam.js
  10. +38 −13 webpack.config.js
@@ -0,0 +1,4 @@
{
"stage": 0,
"loose": "all"
}
@@ -0,0 +1,4 @@
lib
**/node_modules
**/webpack.config.js
examples/**/server.js
@@ -0,0 +1,16 @@
{
"extends": "eslint-config-airbnb",
"env": {
"browser": true,
"mocha": true,
"node": true
},
"rules": {
"react/jsx-uses-react": 2,
"react/jsx-uses-vars": 2,
"react/react-in-jsx-scope": 2
},
"plugins": [
"react"
]
}
@@ -1 +1,6 @@
node_modules/
node_modules
*.log
.DS_Store
dist
lib
coverage
@@ -1,7 +1,6 @@
**/.*
example
script
specs
bower.json
karma.conf.js
webpack.config.js
.DS_Store
*.log
src
test
examples
coverage
@@ -0,0 +1,3 @@
language: node_js
node_js:
- "iojs"

This file was deleted.

Oops, something went wrong.
@@ -4,12 +4,9 @@
"description": "React webcam component",
"main": "dist/react-webcam.js",
"scripts": {
"build": "./node_modules/.bin/babel lib --out-dir dist"
},
"browserify": {
"transform": [
"reactify"
]
"build": "babel src --out-dir lib",
"build:umd": "webpack src/react-webcam.js dist/react-webcam.js && NODE_ENV=production webpack src/react-webcam.js dist/react-webcam.min.js",
"lint": "eslint src"
},
"repository": {
"type": "git",
@@ -30,6 +27,14 @@
"react": ">=0.13.0"
},
"devDependencies": {
"babel": "^5.6.7"
"babel": "^5.6.7",
"babel-core": "^5.6.18",
"babel-eslint": "^3.1.15",
"babel-loader": "^5.1.4",
"eslint": "^0.23",
"eslint-config-airbnb": "0.0.6",
"eslint-plugin-react": "^2.3.0",
"webpack": "^1.9.6",
"webpack-dev-server": "^1.8.2"
}
}
File renamed without changes.
@@ -1,18 +1,43 @@
'use strict';

var webpack = require('webpack');

var plugins = [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV)
})
];

if (process.env.NODE_ENV === 'production') {
plugins.push(
new webpack.optimize.UglifyJsPlugin({
compressor: {
screw_ie8: true,
warnings: false
}
})
);
}

module.exports = {
entry: './index.js',
externals: [{
react: {
root: 'React',
commonjs2: 'react',
commonjs: 'react',
amd: 'react'
}
}],
module: {
loaders: [{
test: /\.js$/,
loader: 'babel-loader'
}]
},
output: {
filename: './dist/react-webcam.js',
sourceMapFilename: './dist/react-webcam.map',
library: 'Webcam',
library: 'react-webcam',
libraryTarget: 'umd'
},
externals: {
'react': 'React',
'react/addons': 'React'
},
module: {
loaders: [
{test: /\.js$/, loader: 'jsx-loader'}
]
}
plugins: plugins
};

0 comments on commit 8fdbdb6

Please sign in to comment.
You can’t perform that action at this time.