Skip to content

Commit

Permalink
more renaming
Browse files Browse the repository at this point in the history
Signed-off-by: Niv Sardi <[email protected]>
  • Loading branch information
xaiki committed Nov 19, 2015
1 parent b5e348b commit 48957e2
Show file tree
Hide file tree
Showing 35 changed files with 116 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"stage": 0,
"loose": "all",
"plugins": [
"rewire"
]
}
53 changes: 53 additions & 0 deletions make-webpack-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
'use strict'
// imports
var webpack = require('webpack')

module.exports = function(options){

// base set of plugins, used in any configuration
var plugins = [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(options.nodeEnv)
})
]

// production configuration
if (options.minimize) {
plugins.push(
new webpack.optimize.UglifyJsPlugin({
compressor: {
screw_ie8: true,
warnings: false
}
})
)
}

return {
module: {
loaders: [{
test: /\.jsx?$/,
loaders: ['babel-loader'],
exclude: /node_modules/
},{
test: /\.(svg|ttf|woff2?)$/,
loaders: ['url?limit=10000'],
exclude: /node_modules/
}]
},
resolve: {
extensions: ['', '.js', '.jsx'],
packageMains: ['webpack', 'browser', 'web', 'browserify', ['jam', 'main'], 'main']
},
externals: [
'wcjs-renderer',
'react'
],
output: {
library: 'react-wcjs-player',
libraryTarget: 'umd'
},
plugins: plugins
}
}
48 changes: 48 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "react-wcjs-player",
"version": "0.0.0",
"description": "A react component that plays viedos with webchimera.js (wcjs-renderer)",
"main": "lib/index.js",
"scripts": {
"clean": "rimraf dist lib tmp",
"build:umd": "webpack src/index.js dist/react-wcjs-player.js",
"build:umd:min": "webpack --config webpack.config.prod.js src/index.js dist/react-wcjs-player.min.js",
"build:lib": "babel src --out-dir lib",
"build": "npm run build:umd && npm run build:umd:min && npm run build:lib",
"lint": "standard ./src",
"prepublish": "npm run clean && npm run build",
"test": "npm run lint -s && babel-node ./tests | tap-spec",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"devDependencies": {
"babel": "^5.5.8",
"babel-core": "^5.6.18",
"babel-eslint": "^3.1.15",
"babel-loader": "^5.1.4",
"rimraf": "^2.3.4",
"standard": "^5.0.0-2",
"tap-spec": "^4.0.2",
"tape": "^4.0.1",
"webpack": "^1.9.6",
"webpack-dev-server": "^1.8.2",
"semantic-release": "^4.0.0"
},
"peerDependencies": {
"react": ">=0.13.2 || ^0.14.0-rc1"
},
"repository": {
"type": "git",
"url": "https://github.com/butterproject/react-wcjs-player"
},
"keywords": [
"react",
"wcjs",
"webchimera",
"video"
],
"author": "Niv Sardi <[email protected]>",
"license": "GPLv3",
"bugs": {
"url": "https://github.com/butterproject/react-wcjs-player/issues"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = require("./make-webpack-config")({
minimize: false,
nodeEnv: "development"
});
4 changes: 4 additions & 0 deletions webpack.config.prod.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = require("./make-webpack-config")({
minimize: true,
nodeEnv: 'production'
});

0 comments on commit 48957e2

Please sign in to comment.