File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ script:
1616 - npm run build:lib
1717 - npm run build:demo
1818 - npm run build:dist
19+ - npm run build:standalone
1920after_success :
2021 - npm run coverage
2122 - test $TRAVIS_PULL_REQUEST == "false" && test $TRAVIS_BRANCH == "master" && sshpass -e scp -r -o stricthostkeychecking=no demo/* $DEPLOY_DEST
Original file line number Diff line number Diff line change 1313 "build:lib" : " cross-env NODE_ENV=production babel src -d lib --ignore src/demo" ,
1414 "build:demo" : " cross-env NODE_ENV=production webpack --config webpack.demo.babel.js" ,
1515 "build:dist" : " cross-env NODE_ENV=production webpack --config webpack.dist.babel.js" ,
16+ "build:standalone" : " cross-env NODE_ENV=production webpack --config webpack.standalone.babel.js" ,
1617 "preversion" : " npm run lint" ,
17- "version" : " auto-changelog -p && npm run build:dist && git add CHANGELOG.md dist" ,
18+ "version" : " auto-changelog -p && npm run build:dist && npm run build:standalone && git add CHANGELOG.md dist" ,
1819 "prepublishOnly" : " npm run build:lib && npm run build:dist" ,
1920 "postpublish" : " npm run clean"
2021 },
Original file line number Diff line number Diff line change 1+ import React from 'react'
2+ import { render } from 'react-dom'
3+ import ReactPlayer from './ReactPlayer'
4+
5+ export default function renderReactPlayer ( container , props ) {
6+ render ( < ReactPlayer { ...props } /> , container )
7+ }
Original file line number Diff line number Diff line change 1+ import path from 'path'
2+ import config , { minifyPlugins } from './webpack.demo.babel'
3+
4+ export default {
5+ ...config ,
6+ entry : './src/standalone.js' ,
7+ output : {
8+ path : path . join ( __dirname , 'dist' ) ,
9+ filename : 'ReactPlayer.standalone.js' ,
10+ library : 'renderReactPlayer'
11+ } ,
12+ module : {
13+ rules : [
14+ {
15+ test : / \. j s $ / ,
16+ loader : 'babel-loader' ,
17+ options : {
18+ plugins : [ 'add-module-exports' ]
19+ }
20+ }
21+ ]
22+ } ,
23+ plugins : minifyPlugins
24+ }
You can’t perform that action at this time.
0 commit comments