mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-21 00:59:29 +00:00
Revert "Remove unused "library" experiment"
This reverts commit a08ed96ab5.
This commit is contained in:
parent
b6f29c768f
commit
96a51eb245
2 changed files with 66 additions and 0 deletions
27
library.html
Executable file
27
library.html
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id='winamp2-js'></div>
|
||||
<script src="built/winamp.bundle.js"></script>
|
||||
<script>
|
||||
const Winamp = window.winamp2js;
|
||||
new Winamp({
|
||||
initialTrack: {
|
||||
name: "1. DJ Mike Llama - Llama Whippin' Intro",
|
||||
url: "https://d38dnrh1liu4f5.cloudfront.net/projects/winamp2-js/mp3/llama-2.91.mp3"
|
||||
},
|
||||
initialSkin: {
|
||||
url: "https://d38dnrh1liu4f5.cloudfront.net/projects/winamp2-js/skins/base-2.91.wsz"
|
||||
},
|
||||
avaliableSkins: [
|
||||
]
|
||||
}).render(document.getElementById('winamp2-js'));
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
39
webpack.library.config.js
Normal file
39
webpack.library.config.js
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
const path = require("path");
|
||||
|
||||
module.exports = {
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ["style-loader", "css-loader"]
|
||||
},
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /(node_modules)/,
|
||||
use: {
|
||||
loader: "babel-loader"
|
||||
}
|
||||
},
|
||||
{
|
||||
test: /\.(wsz|mp3)$/,
|
||||
use: [
|
||||
{
|
||||
loader: "file-loader",
|
||||
options: {
|
||||
emitFile: true,
|
||||
name: "[path][name]-[hash].[ext]"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
noParse: [/jszip\.js$/]
|
||||
},
|
||||
entry: ["babel-polyfill", "./js/winamp.js"],
|
||||
output: {
|
||||
path: path.resolve(__dirname, "built"),
|
||||
filename: "winamp.bundle.js",
|
||||
library: "winamp2js",
|
||||
libraryTarget: "umd"
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue