2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-05-21 13:24:08 +03:00

Use Hugo mounts for our docs vendor JS files.

This commit is contained in:
XhmikosR
2019-08-17 19:38:24 +03:00
parent d8999dd566
commit 6f2c9fa459
6 changed files with 1192 additions and 18 deletions
+10
View File
@@ -40,6 +40,16 @@ module:
target: static/apple-touch-icon.png
- source: site/static/docs/5.1/assets/img/favicons/favicon.ico
target: static/favicon.ico
# docsearch is referenced in a `script` tag so we just mount it in the static folder
- source: node_modules/docsearch.js/dist/cdn/docsearch.min.js
target: static/docs/5.1/assets/js/vendor/docsearch.min.js
# the following are concatenated via Hugo pipes with docs.js so we need them in the assets folder
- source: node_modules/anchor-js/anchor.min.js
target: assets/js/vendor/anchor.min.js
- source: node_modules/bs-custom-file-input/dist/bs-custom-file-input.min.js
target: assets/js/vendor/bs-custom-file-input.min.js
- source: node_modules/clipboard/dist/clipboard.min.js
target: assets/js/vendor/clipboard.min.js
params:
description: "The most popular HTML, CSS, and JS library in the world."
+1177
View File
File diff suppressed because it is too large Load Diff
+4 -1
View File
@@ -64,7 +64,7 @@
"docs-serve": "hugo server --port 9001 --disableFastRender",
"docs-serve-only": "npx sirv-cli _site --port 9001",
"lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json",
"update-deps": "ncu -u -x globby,karma-browserstack-launcher,stylelint && echo Manually update site/assets/js/vendor",
"update-deps": "ncu -u -x globby,karma-browserstack-launcher,stylelint",
"release": "npm-run-all dist release-sri docs-build release-zip*",
"release-sri": "node build/generate-sri.js",
"release-version": "node build/change-version.js",
@@ -108,11 +108,14 @@
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.0.6",
"@rollup/plugin-replace": "^3.0.0",
"anchor-js": "^4.3.1",
"autoprefixer": "^10.4.0",
"bundlewatch": "^0.3.2",
"clean-css-cli": "^5.4.2",
"clipboard": "^2.0.8",
"cross-env": "^7.0.3",
"cspell": "^5.13.1",
"docsearch.js": "^2.6.3",
"eslint": "^8.3.0",
"eslint-config-xo": "^0.39.0",
"eslint-plugin-import": "^2.25.3",
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -5,7 +5,7 @@
{{- end }}
{{ if eq .Page.Layout "docs" -}}
<script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script>
<script src="/docs/{{ .Site.Params.docs_version }}/assets/js/vendor/docsearch.min.js"></script>
{{- end }}
{{- $vendor := resources.Match "js/vendor/*.js" -}}