diff --git a/.travis.yml b/.travis.yml index a7f9c0f0..7cbaf2c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,9 @@ node_js: - node script: > npm run travis-tests # && - # gzip -c built/winamp.js > built/winamp.js.gz && - # python node_modules/travis-weigh-in/weigh_in.py built/winamp.js && - # python node_modules/travis-weigh-in/weigh_in.py built/winamp.js.gz + # gzip -c built/webamp.bundle.min.js > built/webamp.bundle.min.js.gz && + # python node_modules/travis-weigh-in/weigh_in.py built/webamp.bundle.min.js && + # python node_modules/travis-weigh-in/weigh_in.py built/webamp.bundle.min.js.gz after_success: - bash <(curl -s https://codecov.io/bash) before_deploy: echo webamp.org > built/CNAME diff --git a/config/webpack.common.js b/config/webpack.common.js index ac7932a7..7342ec60 100644 --- a/config/webpack.common.js +++ b/config/webpack.common.js @@ -42,8 +42,8 @@ module.exports = { // directory, and injects a tag into the gererated index.html file // it also, applies cache-busting for all the icons. new WebpackPwaManifest({ - name: "Winamp", - short_name: "Winamp", // eslint-disable-line camelcase + name: "Webamp", + short_name: "Webamp", // eslint-disable-line camelcase description: "Winamp 2.9 reimplemented in HTML5 and JavaScript", start_url: "./?utm_source=web_app_manifest", // eslint-disable-line camelcase scope: "./", @@ -70,7 +70,7 @@ module.exports = { }) ], entry: { - winamp: ["./js/index.js"] + webamp: ["./js/index.js"] }, output: { filename: "[name]-[hash].js", diff --git a/config/webpack.library.js b/config/webpack.library.js index 6383d84d..4e7067b1 100644 --- a/config/webpack.library.js +++ b/config/webpack.library.js @@ -45,12 +45,12 @@ module.exports = { }) ], entry: { - bundle: "./js/winamp.js", - "bundle.min": "./js/winamp.js" + bundle: "./js/webamp.js", + "bundle.min": "./js/webamp.js" }, output: { path: path.resolve(__dirname, "../built"), - filename: "winamp.[name].js", + filename: "webamp.[name].js", library: "Webamp", libraryTarget: "umd" } diff --git a/config/webpack.prod.js b/config/webpack.prod.js index 8d3e3970..b0ebd553 100644 --- a/config/webpack.prod.js +++ b/config/webpack.prod.js @@ -33,6 +33,6 @@ const config = merge(common, { ] }); -config.entry.winamp.unshift("./js/googleAnalytics.min.js"); +config.entry.webamp.unshift("./js/googleAnalytics.min.js"); module.exports = config; diff --git a/docs/architecture.md b/docs/architecture.md index 1c576ad7..1b8f76d6 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -5,7 +5,7 @@ This repository contains both an NPM module, and a demo page, found at . The NPM module's goal is to provide a widget which can be embedded in any website, where as the demo page depends upon the library, and provides the canonical usage. You can find more information about the library's API in the [usage](./usage.md) document. * The entry point for the demo page is [index.js](../js/index.js) -* The entry point for the NPM modules is [winamp.js](../js/winamp.js) +* The entry point for the NPM modules is [webamp.js](../js/webamp.js) ## Redux diff --git a/docs/usage.md b/docs/usage.md index e9b01f2f..24b60626 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -21,7 +21,7 @@ Or, you can include it via a script tag: ```html - + ``` ## Create a container @@ -66,7 +66,7 @@ webamp.renderWhenReady(document.getElementById('winamp-container')); ## API -Many methods on the winamp instance deal with `track`s. Here is the shape of a `track`: +Many methods on the webamp instance deal with `track`s. Here is the shape of a `track`: ```JavaScript const track = { @@ -151,19 +151,19 @@ const options = { requiresNetwork: true }] }; -const winamp = new Winamp(options); +const webamp = new Webamp(options); ``` ## Instance Methods -The `Winamp` class has the following _instance_ methods: +The `Webamp` class has the following _instance_ methods: ### `appendTracks(tracks)` Add an array of `track`s (see above) to the end of the playlist. ```JavaScript -winamp.appendTracks([ +webamp.appendTracks([ {url: 'https://example.com/track1.mp3'}, {url: 'https://example.com/track2.mp3'}, {url: 'https://example.com/track3.mp3'} @@ -175,7 +175,7 @@ winamp.appendTracks([ Replace the playlist with an array of `track`s (see above) and begin playing the first track. ```JavaScript -winamp.setTracksToPlay([ +webamp.setTracksToPlay([ {url: 'https://example.com/track1.mp3'}, {url: 'https://example.com/track2.mp3'}, {url: 'https://example.com/track3.mp3'} @@ -188,8 +188,8 @@ Webamp will wait until it has fetch the skin and fully parsed it, and then rende ```JavaScript const container = document.getElementById('winamp-container'); -winamp.renderWhenReady(container).then(() => { - console.log('rendered winamp!'); +webamp.renderWhenReady(container).then(() => { + console.log('rendered webamp!'); }); ``` @@ -198,8 +198,8 @@ winamp.renderWhenReady(container).then(() => { A callback which will be called when Webamp is closed. Returns an "unsubscribe" function. ```JavaScript -const unsubscribe = winamp.onClose(() => { - console.log("Winamp closed"); +const unsubscribe = webamp.onClose(() => { + console.log("Webamp closed"); }); // If at some point in the future you want to stop listening to these events: @@ -211,8 +211,8 @@ unsubscribe(); A callback which will be called when Webamp is minimized. Returns an "unsubscribe" function. ```JavaScript -const unsubscribe = winamp.onClose(() => { - console.log("Winamp closed"); +const unsubscribe = webamp.onClose(() => { + console.log("Webamp closed"); }); // If at some point in the future you want to stop listening to these events: diff --git a/examples/minimal/index.html b/examples/minimal/index.html index b44f5106..f4d468c3 100755 --- a/examples/minimal/index.html +++ b/examples/minimal/index.html @@ -7,9 +7,9 @@
- +