-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Rollup #24
Merged
feat: Rollup #24
Changes from 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
f52e05d
update to rollup generator 5
gkatsev 4aad341
updates
gkatsev 808de4e
update tests
gkatsev 1a601a0
fix linting
gkatsev 242c46c
remove old babel package
gkatsev b96c75e
loose es2015
gkatsev 40f0e39
add es3 to rollup configs
gkatsev 0cdc9c1
fix indent
gkatsev 7928016
chore: prepare CHANGELOG for conventional changelog
gkatsev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"presets": [ "es3", ["es2015"] ], | ||
"presets": [ "es3", ["es2015", {"loose": true}] ], | ||
"plugins": ["transform-object-assign"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
sudo: false | ||
dist: trusty | ||
language: node_js | ||
node_js: | ||
- 'node' | ||
- '4.2' | ||
|
||
- '8' | ||
- '6' | ||
- '4' | ||
before_script: | ||
|
||
# Set up a virtual screen for Firefox. | ||
- export CHROME_BIN=/usr/bin/google-chrome | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
addons: | ||
firefox: latest | ||
apt: | ||
sources: | ||
- google-chrome | ||
packages: | ||
- google-chrome-stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Copyright 2016 brandonocasey <[email protected]> | ||
Copyright Brightcove, Inc | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
"name": "m3u8-parser", | ||
"version": "2.1.0", | ||
"description": "m3u8 parser", | ||
"jsnext:main": "src/index.js", | ||
"main": "es5/index.js", | ||
"main": "dist/m3u8-parser.cjs.js", | ||
"module": "dist/m3u8-parser.es.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:videojs/m3u8-parser.git" | ||
|
@@ -25,34 +25,43 @@ | |
"scripts": { | ||
"prebuild": "npm run clean", | ||
"build": "npm-run-all -p build:*", | ||
"build:js": "npm-run-all build:js:babel build:js:browserify build:js:bannerize build:js:uglify", | ||
"build:js": "npm-run-all build:js:rollup-modules build:js:rollup-umd build:js:bannerize build:js:uglify", | ||
"build:js:babel": "babel src -d es5", | ||
"build:js:bannerize": "bannerize dist/m3u8-parser.js --banner=scripts/banner.ejs", | ||
"build:js:browserify": "browserify . -s m3u8-parser -o dist/m3u8-parser.js", | ||
"build:js:uglify": "uglifyjs dist/m3u8-parser.js --comments --mangle --compress -o dist/m3u8-parser.min.js", | ||
"build:test": "babel-node scripts/build-test.js", | ||
"build:js:rollup-modules": "rollup -c scripts/modules.rollup.config.js", | ||
"build:js:rollup-umd": "rollup -c scripts/umd.rollup.config.js", | ||
"build:js:uglify": "uglifyjs dist/m3u8-parser.js --comments --mangle --compress -o dist/m3u8-parser.min.js", | ||
"prebuild:test": "node scripts/m3u8.js", | ||
"build:test": "rollup -c scripts/test.rollup.config.js", | ||
"change": "chg add", | ||
"clean": "rimraf dist test/dist es5 && mkdirp dist test/dist es5", | ||
"clean": "rimraf dist test/dist", | ||
"postclean": "mkdirp dist test/dist", | ||
"docs": "npm-run-all docs:*", | ||
"docs:api": "jsdoc src -r -d docs/api", | ||
"docs:toc": "doctoc README.md", | ||
"lint": "vjsstandard", | ||
"start": "npm-run-all -p watch start:*", | ||
"prestart": "npm run build", | ||
"start": "npm-run-all -p start:server watch", | ||
"start:serve": "babel-node scripts/server.js", | ||
"start:server": "static -a 0.0.0.0 -p 9999 -H '{\"Cache-Control\": \"no-cache, must-revalidate\"}' .", | ||
"pretest": "npm-run-all lint build", | ||
"test": "karma start test/karma.conf.js", | ||
"test:chrome": "npm run pretest && karma start test/karma.conf.js --browsers Chrome", | ||
"test:firefox": "npm run pretest && karma start test/karma.conf.js --browsers Firefox", | ||
"test:ie": "npm run pretest && karma start test/karma.conf.js --browsers IE", | ||
"test:safari": "npm run pretest && karma start test/karma.conf.js --browsers Safari", | ||
"preversion": "npm test", | ||
"version": "babel-node scripts/version.js", | ||
"version": "node scripts/version.js", | ||
"postversion": "babel-node scripts/postversion.js", | ||
"prepublish": "npm run build", | ||
"watch": "npm-run-all -p watch:*", | ||
"watch:js": "npm-run-all -p watch:js:babel watch:js:browserify", | ||
"watch:js-modules": "rollup -c scripts/modules.rollup.config.js -w", | ||
"watch:js-umd": "rollup -c scripts/umd.rollup.config.js -w", | ||
"watch:js:babel": "npm run build:js:babel -- --watch", | ||
"watch:js:browserify": "watchify . -v -g browserify-shim -o dist/m3u8-parser.js" | ||
"watch:js:browserify": "watchify . -v -g browserify-shim -o dist/m3u8-parser.js", | ||
"watch:test": "rollup -c scripts/test.rollup.config.js -w", | ||
"prepublish": "npm run build" | ||
}, | ||
"keywords": [], | ||
"author": "Brightcove, Inc", | ||
|
@@ -65,32 +74,28 @@ | |
"ignore": [ | ||
"dist", | ||
"docs", | ||
"es5", | ||
"test/dist", | ||
"test/karma.conf.js", | ||
"test/test-expected.js", | ||
"test/test-manifests.js", | ||
"test/manifests.js", | ||
"test/fixtures/m3u8/**/*.js" | ||
] | ||
}, | ||
"files": [ | ||
"CONTRIBUTING.md", | ||
"bower.json", | ||
"dist/", | ||
"docs/", | ||
"es5/", | ||
"index.html", | ||
"scripts/", | ||
"src/", | ||
"test/" | ||
], | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"babel": "^6.5.2", | ||
"babel-cli": "^6.11.4", | ||
"babel-plugin-external-helpers": "^6.22.0", | ||
"babel-plugin-transform-object-assign": "^6.8.0", | ||
"babel-preset-es2015": "^6.9.0", | ||
"babel-preset-es2015-loose": "^7.0.0", | ||
"babel-preset-es2015": "^6.14.0", | ||
"babel-preset-es3": "^1.0.1", | ||
"babelify": "^7.3.0", | ||
"bannerize": "^1.0.2", | ||
|
@@ -99,24 +104,39 @@ | |
"browserify-shim": "^3.8.12", | ||
"budo": "^8.0.4", | ||
"chg": "^0.3.2", | ||
"conventional-changelog-cli": "^1.3.1", | ||
"conventional-changelog-videojs": "^3.0.0", | ||
"doctoc": "^0.15.0", | ||
"glob": "^6.0.3", | ||
"global": "^4.3.0", | ||
"jsdoc": "^3.4.0", | ||
"karma": "^0.13.19", | ||
"karma-chrome-launcher": "^0.2.2", | ||
"karma-detect-browsers": "^2.0.2", | ||
"karma-firefox-launcher": "^0.1.7", | ||
"karma-ie-launcher": "^0.2.0", | ||
"karma-qunit": "^0.1.9", | ||
"karma-safari-launcher": "^0.1.1", | ||
"karma": "^1.7.0", | ||
"karma-chrome-launcher": "^2.1.1", | ||
"karma-detect-browsers": "^2.2.5", | ||
"karma-firefox-launcher": "^1.0.1", | ||
"karma-ie-launcher": "^1.0.0", | ||
"karma-qunit": "^1.2.1", | ||
"karma-safari-launcher": "^1.0.0", | ||
"minimist": "^1.2.0", | ||
"mkdirp": "^0.5.1", | ||
"npm-run-all": "^1.5.1", | ||
"qunitjs": "^1.21.0", | ||
"rimraf": "^2.5.1", | ||
"sinon": "~1.14.0", | ||
"uglify-js": "^2.6.1", | ||
"videojs-standard": "5.2.0", | ||
"node-static": "^0.7.9", | ||
"npm-run-all": "^4.0.2", | ||
"qunitjs": "^2.3.2", | ||
"rimraf": "^2.6.1", | ||
"rollup": "^0.41.6", | ||
"rollup-plugin-babel": "^2.7.1", | ||
"rollup-plugin-commonjs": "^8.0.2", | ||
"rollup-plugin-json": "^2.1.1", | ||
"rollup-plugin-multi-entry": "^2.0.1", | ||
"rollup-plugin-node-resolve": "^3.0.0", | ||
"rollup-watch": "^3.2.2", | ||
"semver": "^5.3.0", | ||
"sinon": "^2.2.0", | ||
"uglify-js": "^3.0.7", | ||
"videojs-standard": "^6.0.0", | ||
"watchify": "^3.7.0" | ||
}, | ||
"generator-videojs-plugin": { | ||
"version": "5.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
'use strict'; | ||
/* eslint no-console: 0 */ | ||
|
||
const fs = require('fs'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
'use strict'; | ||
const m3u8 = require('./export-m3u8s.js'); | ||
|
||
const args = require('minimist')(process.argv.slice(2), { | ||
boolean: ['watch', 'clean', 'build'], | ||
default: { | ||
build: true | ||
}, | ||
alias: { | ||
b: 'build', | ||
c: 'clean', | ||
w: 'watch' | ||
} | ||
}); | ||
|
||
if (args.w) { | ||
m3u8.watch(); | ||
} else if (args.c) { | ||
m3u8.clean(); | ||
} else if (args.b) { | ||
m3u8.build(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/** | ||
* Rollup configuration for packaging the plugin in a module that is consumable | ||
* by either CommonJS (e.g. Node or Browserify) or ECMAScript (e.g. Rollup). | ||
* | ||
* These modules DO NOT include their dependencies as we expect those to be | ||
* handled by the module system. | ||
*/ | ||
import babel from 'rollup-plugin-babel'; | ||
import json from 'rollup-plugin-json'; | ||
|
||
export default { | ||
moduleName: 'm3u8-parser', | ||
entry: 'src/index.js', | ||
legacy: true, | ||
plugins: [ | ||
json(), | ||
babel({ | ||
babelrc: false, | ||
exclude: 'node_modules/**', | ||
presets: [ | ||
['es2015', { | ||
loose: true, | ||
modules: false | ||
}] | ||
], | ||
plugins: [ | ||
'external-helpers', | ||
'transform-object-assign' | ||
] | ||
}) | ||
], | ||
targets: [ | ||
{dest: 'dist/m3u8-parser.cjs.js', format: 'cjs'}, | ||
{dest: 'dist/m3u8-parser.es.js', format: 'es'} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/** | ||
* Rollup configuration for packaging the plugin in a test bundle. | ||
* | ||
* This includes all dependencies for both the plugin and its tests. | ||
*/ | ||
import babel from 'rollup-plugin-babel'; | ||
import commonjs from 'rollup-plugin-commonjs'; | ||
import json from 'rollup-plugin-json'; | ||
import multiEntry from 'rollup-plugin-multi-entry'; | ||
import resolve from 'rollup-plugin-node-resolve'; | ||
|
||
export default { | ||
moduleName: 'm3u8-parser-test', | ||
entry: 'test/**/*.test.js', | ||
dest: 'test/dist/bundle.js', | ||
format: 'iife', | ||
external: [ | ||
'qunit', | ||
'qunitjs', | ||
'sinon' | ||
], | ||
globals: { | ||
qunit: 'QUnit', | ||
qunitjs: 'QUnit', | ||
sinon: 'sinon' | ||
}, | ||
legacy: true, | ||
plugins: [ | ||
multiEntry({ | ||
exports: false | ||
}), | ||
resolve({ | ||
browser: true, | ||
main: true, | ||
jsnext: true | ||
}), | ||
json(), | ||
commonjs({ | ||
sourceMap: false | ||
}), | ||
babel({ | ||
babelrc: false, | ||
exclude: 'node_modules/**', | ||
presets: [ | ||
['es2015', { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only tests, but maybe es3 for consistency |
||
loose: true, | ||
modules: false | ||
}] | ||
], | ||
plugins: [ | ||
'external-helpers', | ||
'transform-object-assign' | ||
] | ||
}) | ||
] | ||
}; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may need es3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added