diff options
author | Patrice Chalin <chalin@users.noreply.github.com> | 2022-02-22 17:22:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-22 17:22:46 +0300 |
commit | f03cba057410f5f94afb5eb21059c3874373e0c4 (patch) | |
tree | d0a41404bc68a96499845788c819ee11bc4e3ddd | |
parent | d3ad0fd63ec73820f2a142ef367cc81ca2a89e79 (diff) |
Add support for Bootstrap and FontAwesome via NPM packages (#904)
* Add support for Bootstrap and FontAwesome via NPM packages
- Add FA npm package @5.15.4
- Add bootstrap@4.6.1
- Edit NPM scripts: drop submodule scripts
* Ensure that UG isn't built using the BS and FA submodules
* CI: use `prepare` instead of preinstall for the UG
-rw-r--r-- | config.toml | 20 | ||||
-rw-r--r-- | package.json | 9 | ||||
-rw-r--r-- | userguide/package.json | 12 |
3 files changed, 27 insertions, 14 deletions
diff --git a/config.toml b/config.toml index 406ed0f..b659281 100644 --- a/config.toml +++ b/config.toml @@ -29,4 +29,22 @@ permalinkable = false [module] [module.hugoVersion] extended = true -min = "0.73.0"
\ No newline at end of file +min = "0.73.0" + [[module.mounts]] + source = 'assets' + target = 'assets' + [[module.mounts]] + source = 'node_modules/bootstrap' + target = 'assets/vendor/bootstrap' + [[module.mounts]] + source = 'node_modules/@fortawesome/fontawesome-free' + target = 'assets/vendor/Font-Awesome' + [[module.mounts]] + source = "i18n" + target = "i18n" + [[module.mounts]] + source = 'layouts' + target = 'layouts' + [[module.mounts]] + source = 'static' + target = 'static' diff --git a/package.json b/package.json index 77883e6..9aecea9 100644 --- a/package.json +++ b/package.json @@ -8,10 +8,11 @@ "build:production": "npm run _docs build:production", "build": "npm run _docs build", "docs-install": "cd userguide && npm install", - "predocs-install": "npm install", - "serve": "npm run _docs serve", - "submodule:get": "git submodule update --init --recursive --depth 1", - "submodule:update": "git submodule update --remote --recursive --depth 1" + "serve": "npm run _docs serve" + }, + "dependencies": { + "@fortawesome/fontawesome-free": "^5.15.4", + "bootstrap": "^4.6.1" }, "devDependencies": { "hugo-extended": "0.92.2" diff --git a/userguide/package.json b/userguide/package.json index c6e547e..94ac008 100644 --- a/userguide/package.json +++ b/userguide/package.json @@ -1,20 +1,14 @@ { "scripts": { "_build": "npm run _hugo-dev", - "_hugo": "hugo --cleanDestinationDir --themesDir ../..", + "_hugo": "rm -Rf ../assets/vendor && hugo --cleanDestinationDir --themesDir ../..", "_hugo-dev": "npm run _hugo -- -e dev -DFE", "_serve": "npm run _hugo-dev -- serve", "build:preview": "npm run _hugo-dev -- --minify --baseURL \"${DEPLOY_PRIME_URL:-/}\"", "build:production": "npm run _hugo -- --minify", "build": "npm run _build", - "prebuild:preview": "npm run submodule:get", - "prebuild:production": "npm run submodule:get", - "prebuild": "npm run submodule:get", - "preinstall": "npm run submodule:get", - "preserve": "npm run submodule:get", - "serve": "npm run _serve", - "submodule:get": "cd .. && npm run submodule:get", - "submodule:update": "cd .. && npm run submodule:update" + "prepare": "cd .. && npm install", + "serve": "npm run _serve" }, "devDependencies": { "autoprefixer": "^9.5.0", |