diff --git a/package-lock.json b/package-lock.json index bc408c3f..0a5ad61e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14692,12 +14692,6 @@ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true }, - "simple-html-tokenizer": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/simple-html-tokenizer/-/simple-html-tokenizer-0.1.1.tgz", - "integrity": "sha1-BcLuxXn//+FFoDCsJs/qYbmA+r4=", - "dev": true - }, "simple-swizzle": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", @@ -15458,17 +15452,6 @@ "has-flag": "^3.0.0" } }, - "svg-inline-loader": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/svg-inline-loader/-/svg-inline-loader-0.8.2.tgz", - "integrity": "sha512-kbrcEh5n5JkypaSC152eGfGcnT4lkR0eSfvefaUJkLqgGjRQJyKDvvEE/CCv5aTSdfXuc+N98w16iAojhShI3g==", - "dev": true, - "requires": { - "loader-utils": "^1.1.0", - "object-assign": "^4.0.1", - "simple-html-tokenizer": "^0.1.1" - } - }, "svgo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", diff --git a/public/js/extra.js b/public/js/extra.js index da309d8c..82af9ae9 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -23,7 +23,7 @@ import markdownitContainer from 'markdown-it-container' /* Defined regex markdown it plugins */ import Plugin from 'markdown-it-regexp' -import { renderFretBoard } from '../vendor/fretboard/fretboard.js' +import { renderFretBoard } from './lib/renderer/fretboard/fretboard.js' require('prismjs/themes/prism.css') require('prismjs/components/prism-wiki') diff --git a/public/vendor/fretboard/css/i.css b/public/js/lib/renderer/fretboard/css/i.css similarity index 100% rename from public/vendor/fretboard/css/i.css rename to public/js/lib/renderer/fretboard/css/i.css diff --git a/public/vendor/fretboard/fretboard.js b/public/js/lib/renderer/fretboard/fretboard.js similarity index 100% rename from public/vendor/fretboard/fretboard.js rename to public/js/lib/renderer/fretboard/fretboard.js diff --git a/public/vendor/fretboard/svg/dot.svg b/public/js/lib/renderer/fretboard/svg/dot.svg similarity index 100% rename from public/vendor/fretboard/svg/dot.svg rename to public/js/lib/renderer/fretboard/svg/dot.svg diff --git a/public/vendor/fretboard/svg/dotEmpty.svg b/public/js/lib/renderer/fretboard/svg/dotEmpty.svg similarity index 100% rename from public/vendor/fretboard/svg/dotEmpty.svg rename to public/js/lib/renderer/fretboard/svg/dotEmpty.svg diff --git a/public/vendor/fretboard/svg/dotEmpty_h.svg b/public/js/lib/renderer/fretboard/svg/dotEmpty_h.svg similarity index 100% rename from public/vendor/fretboard/svg/dotEmpty_h.svg rename to public/js/lib/renderer/fretboard/svg/dotEmpty_h.svg diff --git a/public/vendor/fretboard/svg/dotWideLeft.svg b/public/js/lib/renderer/fretboard/svg/dotWideLeft.svg similarity index 100% rename from public/vendor/fretboard/svg/dotWideLeft.svg rename to public/js/lib/renderer/fretboard/svg/dotWideLeft.svg diff --git a/public/vendor/fretboard/svg/dotWideMiddle.svg b/public/js/lib/renderer/fretboard/svg/dotWideMiddle.svg similarity index 100% rename from public/vendor/fretboard/svg/dotWideMiddle.svg rename to public/js/lib/renderer/fretboard/svg/dotWideMiddle.svg diff --git a/public/vendor/fretboard/svg/dotWideRight.svg b/public/js/lib/renderer/fretboard/svg/dotWideRight.svg similarity index 100% rename from public/vendor/fretboard/svg/dotWideRight.svg rename to public/js/lib/renderer/fretboard/svg/dotWideRight.svg diff --git a/public/vendor/fretboard/svg/dot_h.svg b/public/js/lib/renderer/fretboard/svg/dot_h.svg similarity index 100% rename from public/vendor/fretboard/svg/dot_h.svg rename to public/js/lib/renderer/fretboard/svg/dot_h.svg diff --git a/public/vendor/fretboard/svg/fretb_horiz_5.svg b/public/js/lib/renderer/fretboard/svg/fretb_horiz_5.svg similarity index 100% rename from public/vendor/fretboard/svg/fretb_horiz_5.svg rename to public/js/lib/renderer/fretboard/svg/fretb_horiz_5.svg diff --git a/public/vendor/fretboard/svg/fretb_horiz_6.svg b/public/js/lib/renderer/fretboard/svg/fretb_horiz_6.svg similarity index 100% rename from public/vendor/fretboard/svg/fretb_horiz_6.svg rename to public/js/lib/renderer/fretboard/svg/fretb_horiz_6.svg diff --git a/public/vendor/fretboard/svg/fretb_horiz_7.svg b/public/js/lib/renderer/fretboard/svg/fretb_horiz_7.svg similarity index 100% rename from public/vendor/fretboard/svg/fretb_horiz_7.svg rename to public/js/lib/renderer/fretboard/svg/fretb_horiz_7.svg diff --git a/public/vendor/fretboard/svg/fretb_vert_12.svg b/public/js/lib/renderer/fretboard/svg/fretb_vert_12.svg similarity index 100% rename from public/vendor/fretboard/svg/fretb_vert_12.svg rename to public/js/lib/renderer/fretboard/svg/fretb_vert_12.svg diff --git a/public/vendor/fretboard/svg/fretb_vert_15.svg b/public/js/lib/renderer/fretboard/svg/fretb_vert_15.svg similarity index 100% rename from public/vendor/fretboard/svg/fretb_vert_15.svg rename to public/js/lib/renderer/fretboard/svg/fretb_vert_15.svg diff --git a/public/vendor/fretboard/svg/fretb_vert_4.svg b/public/js/lib/renderer/fretboard/svg/fretb_vert_4.svg similarity index 100% rename from public/vendor/fretboard/svg/fretb_vert_4.svg rename to public/js/lib/renderer/fretboard/svg/fretb_vert_4.svg diff --git a/public/vendor/fretboard/svg/fretb_vert_5.svg b/public/js/lib/renderer/fretboard/svg/fretb_vert_5.svg similarity index 100% rename from public/vendor/fretboard/svg/fretb_vert_5.svg rename to public/js/lib/renderer/fretboard/svg/fretb_vert_5.svg diff --git a/public/vendor/fretboard/svg/fretb_vert_7.svg b/public/js/lib/renderer/fretboard/svg/fretb_vert_7.svg similarity index 100% rename from public/vendor/fretboard/svg/fretb_vert_7.svg rename to public/js/lib/renderer/fretboard/svg/fretb_vert_7.svg diff --git a/public/vendor/fretboard/svg/fretb_vert_9.svg b/public/js/lib/renderer/fretboard/svg/fretb_vert_9.svg similarity index 100% rename from public/vendor/fretboard/svg/fretb_vert_9.svg rename to public/js/lib/renderer/fretboard/svg/fretb_vert_9.svg diff --git a/public/vendor/fretboard/svg/string_o.svg b/public/js/lib/renderer/fretboard/svg/string_o.svg similarity index 100% rename from public/vendor/fretboard/svg/string_o.svg rename to public/js/lib/renderer/fretboard/svg/string_o.svg diff --git a/public/vendor/fretboard/svg/string_x.svg b/public/js/lib/renderer/fretboard/svg/string_x.svg similarity index 100% rename from public/vendor/fretboard/svg/string_x.svg rename to public/js/lib/renderer/fretboard/svg/string_x.svg diff --git a/webpack.common.js b/webpack.common.js index ed15258b..d66abcba 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -484,14 +484,14 @@ module.exports = { }] }, { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, - exclude: path.resolve(__dirname, 'public/vendor/fretboard'), + exclude: path.resolve(__dirname, 'public/js/lib/renderer/fretboard'), use: [{ loader: 'url-loader', options: { limit: '10000', mimetype: 'svg+xml' } }] }, { - test: /.*\/fretb.*\.svg$/, - loader: 'svg-inline-loader' + test: /.*\/fretboard\/svg\/.*\.svg$/, + loader: 'string-loader' }, { test: /\.png(\?v=\d+\.\d+\.\d+)?$/, use: [{