Refactored repo file structure in preparation for jsdoc tutorials.

This commit is contained in:
Harrison Deng 2022-04-18 07:39:59 -05:00
parent ba9e950556
commit 29b3b30586
46 changed files with 12 additions and 13826 deletions

39
Jenkinsfile vendored
View File

@ -3,77 +3,38 @@ pipeline {
stages {
stage("install") {
steps {
dir('audioshowkit') {
nodejs('NodeJS (17.4.0)') {
sh "npm install"
}
}
}
}
stage("build") {
steps {
dir('audioshowkit') {
nodejs('NodeJS (17.4.0)') {
sh "npm run build:dev"
}
}
}
}
stage("test") {
steps {
dir('audioshowkit') {
nodejs('NodeJS (17.4.0)') {
sh "npm run test:junit"
}
junit 'junit/*.xml'
}
}
}
stage("archive product") {
steps {
archiveArtifacts artifacts: 'audioshowkit/dist/audioshowkit.js', followSymlinks: false
}
}
stage("publish") {
parallel {
stage("setup showcase") {
stages {
stage("install showcase") {
steps {
dir('showcase') {
nodejs('NodeJS (17.4.0)') {
sh "npm i"
}
}
}
}
stage("build showcase") {
steps {
dir('showcase') {
nodejs('NodeJS (17.4.0)') {
sh "npm run build"
}
}
}
}
stage("deploy showcase") {
steps {
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'showcase/dist', reportFiles: 'index.html', reportName: 'AudioShowKit Demo', reportTitles: ''])
}
}
}
}
stage("generate docs") {
steps {
dir('audioshowkit') {
nodejs('NodeJS (17.4.0)') {
sh "npm run docs"
}
}
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'audioshowkit/docs', reportFiles: 'index.html', reportName: 'AudioShowKit JSDocs', reportTitles: ''])
}
}
}
}
}
}

View File

@ -1,3 +0,0 @@
webpack.*.js
webpack.*.cjs
**/prism.js

View File

@ -1,36 +0,0 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:import/recommended"
],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
],
"import/extensions": [
"error",
"ignorePackages"
]
}
}

View File

@ -1,8 +0,0 @@
{
"cSpell.words": [
"audioshowkit",
"audioshowkitshowcase",
"Rosen"
],
"html.format.wrapLineLength": 0
}

Binary file not shown.

Binary file not shown.

View File

@ -1,4 +0,0 @@
{
"presets": [],
"plugins": []
}

13549
showcase/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,35 +0,0 @@
{
"name": "showcase",
"type": "module",
"version": "1.0.0",
"description": "",
"main": "webpack.common.js",
"scripts": {
"build": "webpack --config webpack.prod.cjs",
"watch": "webpack serve --config webpack.dev.cjs"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.17.9",
"@babel/eslint-parser": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"babel-loader": "^8.2.4",
"copy-webpack-plugin": "^10.2.4",
"css-loader": "^6.7.1",
"eslint": "^8.13.0",
"eslint-plugin-import": "^2.26.0",
"eslint-webpack-plugin": "^3.1.1",
"html-loader": "^3.1.0",
"html-webpack-plugin": "^5.5.0",
"style-loader": "^3.3.1",
"webpack": "^5.72.0",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.8.1",
"webpack-merge": "^5.8.0"
},
"dependencies": {
"audioshowkit": "file:../audioshowkit"
}
}

View File

@ -1,3 +0,0 @@
/* PrismJS 1.28.0
https://prismjs.com/download.html#themes=prism&languages=markup+css */
code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}

View File

@ -1,45 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="./css/prism.css" rel="stylesheet" />
<script src="./js/prism.js"></script>
<script src="../node_modules/audioshowkit/dist/audioshowkit.js" defer></script>
<title>AudioShowKit Showcase</title>
</head>
<body>
<div>
<h1>Welcome to the AudioShowKit Showcase!</h1>
<div>
<h2>Song Player</h2>
<p>The song player acts as a easier way for developers to set up multiple audio sources to play while a user is browsing through their site.</p>
<h3>Example</h3>
<div id="player-showcase"></div>
</div>
<div>
<h2>Visualizer and Visualizer Update Manager</h2>
<p>The visualizer itself serves little purpose other than creating a central location for updating and obtaining amplitude over the frequency domain data. It comes with a simple update system in which can be used to listen to updates over the entire bin.</p>
<p>Instead, the visualizer update manager handles the detailed update sequences in terms of:</p>
<ul>
<li>
Individual bins, where the parameters are the elapsed time since last update, the amplitude of the updating bin, and the delta of the amplitude from the last update.
</li>
<li>
Ranges of bins, where the parameters are the elapsed time since last updating, and an array of the amplitudes.
</li>
</ul>
<div id="visualizer-showcase"></div>
</div>
<div>
<h2>Mappings</h2>
<p>Mappings mainly provide functions for mapping commonly used CSS properties to a given range of frequency bins, or a single bin. The mappings portion of the library also contain helper functions for converting between CSS colors and interpolation functions.</p>
</div>
</div>
</body>
</html>

View File

@ -1,15 +0,0 @@
console.log("Beginning showcase..");
const ask = window.audioshowkit;
// Song Player
const playlist = ask.player.createSongPlaylist("Demo playlist");
playlist.add("/audio/moments.mp3", "moments", "Lost Identities x Robbie Rosen");
playlist.add("/audio/XXI.mp3", "XXI", "QR");
const player = ask.player.createSongPlayer(playlist);
const playerElem = document.getElementById("player-showcase");
playerElem.appendChild(player.generatePlayElement());
playerElem.appendChild(player.generateNextElement());
playerElem.appendChild(player.generatePreviousElement());
// Visualizer

File diff suppressed because one or more lines are too long

View File

@ -1,47 +0,0 @@
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CopyPlugin = require("copy-webpack-plugin");
const ESLintPlugin = require("eslint-webpack-plugin");
module.exports = {
entry: {
audioshowkitshowcase: path.resolve("./src/js/main.js"),
},
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"]
}
}
},
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
{
test: /\.html$/i,
loader: "html-loader",
},
]
},
output: {
filename: "[name].js",
path: path.resolve("./dist")
},
plugins: [
new ESLintPlugin(),
new HtmlWebpackPlugin({
template: path.resolve("./src/index.html"),
}),
new CopyPlugin({
patterns: [
{ from: "audio/*.mp3", to: "./" }
]
})
]
};

View File

@ -1,16 +0,0 @@
const path = require("path");
const { merge } = require("webpack-merge");
const webpackCommon = require("./webpack.common.cjs");
const devConfig = {
mode: "development",
devtool: "inline-source-map",
devServer: {
static: path.resolve("./dist"),
open: true,
hot: true
}
};
module.exports = merge(webpackCommon, devConfig);

View File

@ -1,9 +0,0 @@
const { merge } = require("webpack-merge");
const webpackCommon = require("./webpack.common.cjs");
const prodConfig = {
mode: "production",
};
module.exports = merge(webpackCommon, prodConfig);