-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to use Rollup to generate the main and umd files. BREAKING CHANGE: drop bower support.
- Loading branch information
Showing
19 changed files
with
547 additions
and
450 deletions.
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
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 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
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,37 @@ | ||
/** | ||
* 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: [ | ||
'es3', | ||
['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,57 @@ | ||
/** | ||
* 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: [ | ||
'es3', | ||
['es2015', { | ||
loose: true, | ||
modules: false | ||
}] | ||
], | ||
plugins: [ | ||
'external-helpers', | ||
'transform-object-assign' | ||
] | ||
}) | ||
] | ||
}; |
Oops, something went wrong.