Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
souporserious committed Jul 9, 2015
0 parents commit ab4c238
Show file tree
Hide file tree
Showing 10 changed files with 195 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Mac OSX Files
.DS_Store
.Trashes
.Spotlight-V100
.AppleDouble
.LSOverride

# Bower & Node Modules
node_modules
npm-debug.log
app/bower_components

# General Files
.sass-cache
.hg
.idea
.svn
.cache
.project
.tmp
14 changes: 14 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Copyright (c) 2015, Travis Arnold <ftntravis@gmail.com>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## React Media Player 0.0.1

React video/audio player.

## TODOS

Playlist feature.
23 changes: 23 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "react-media-player",
"version": "0.0.1",
"homepage": "https://github.com/souporserious/react-media-player",
"authors": [
"Travis Arnold <ftntravis@gmail.com>"
],
"description": "React media player.",
"main": ["./dist/ReactMediaPlayer.js", "./dist/ReactMediaPlayer.min.js"],
"keywords": [
"react",
"transition",
"ui"
],
"license": "ISC",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
11 changes: 11 additions & 0 deletions example/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Component</title>
</head>
<body>
<script src="http://localhost:8080/webpack-dev-server.js"></script>
<script src="bundle.js"></script>
</body>
</html>
5 changes: 5 additions & 0 deletions example/index.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class ReactMediaPlayer {

}

export default ReactMediaPlayer;
Empty file added example/main.scss
Empty file.
45 changes: 45 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "react-media-player",
"version": "0.0.1",
"description": "React media player.",
"main": "scripts/index.jsx",
"scripts": {
"dev": "webpack-dev-server --devtool eval --hot --progress --colors",
"prebuild": "rm -rf dist && mkdir dist",
"build": "NODE_ENV=production webpack --config webpack.prod.config.js",
"postbuild": "NODE_ENV=production TARGET=minify webpack --config webpack.prod.config.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/souporserious/react-media-player"
},
"keywords": [
"react",
"component"
],
"author": "Travis Arnold <travis@souporserious.com> (http://souporserious.com)",
"license": "ISC",
"bugs": {
"url": "https://github.com/souporserious/react-media-player/issues"
},
"homepage": "https://github.com/souporserious/react-media-player",
"dependencies": {
"react": "^0.13.3",
"velocity-animate": "^1.2.2"
},
"devDependencies": {
"babel-core": "^5.6.15",
"babel-loader": "^5.2.2",
"babel-plugin-object-assign": "^1.2.0",
"css-loader": "^0.15.1",
"http-server": "^0.8.0",
"lodash": "^3.10.0",
"node-libs-browser": "^0.5.2",
"node-sass": "^3.2.0",
"sass-loader": "^1.0.2",
"style-loader": "^0.12.3",
"webpack": "^1.9.12",
"webpack-dev-server": "^1.9.0"
}
}
24 changes: 24 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
var path = require('path');
var nodeModulesDir = path.resolve(__dirname, 'node_modules');

module.exports = {
entry: {
index: ['webpack/hot/dev-server', './example/index.jsx']
},
output: {
path: './example',
filename: 'bundle.js'
},
module: {
loaders: [
{ test: /\.(jsx)/, exclude: /node_modules/, loader: 'babel' },
{ test: /\.scss$/, loader: 'style!css!sass?sourceMap' }
]
},
resolve: {
extensions: ['', '.js', '.jsx']
},
devServer: {
contentBase: './example',
}
};
46 changes: 46 additions & 0 deletions webpack.prod.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
var path = require('path');
var webpack = require('webpack');
var TARGET = process.env.TARGET || null;

var config = {
entry: {
index: './scripts/VelocityTransitionGroup.jsx'
},
output: {
path: path.join(__dirname, 'dist'),
publicPath: 'dist/',
filename: '[id].js',
sourceMapFilename: '[id].sourcemap.js',
library: '[id]',
libraryTarget: 'umd'
},
module: {
loaders: [
{ test: /\.(js|jsx)/, loader: 'babel' }
]
},
plugins: [],
resolve: {
extensions: ['', '.js', '.jsx']
},
externals: {
'react/addons': 'React',
'velocity-animate': 'Velocity',
'velocity-animate/velocity.ui': 'velocity-animate/velocity.ui'
},
};

if(TARGET === 'minify') {
config.output.filename = 'VelocityTransitionGroup.min.js';
config.output.sourceMapFilename = 'VelocityTransitionGroup.min.js';
config.plugins.push(new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
mangle: {
except: ['React', 'Velocity', 'VelocityTransitionGroup']
}
}));
}

module.exports = config;

0 comments on commit ab4c238

Please sign in to comment.