Skip to content

Commit

Permalink
Add support for Bootstrap and FontAwesome via NPM packages (#904)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
chalin committed Feb 22, 2022
1 parent d3ad0fd commit f03cba0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 14 deletions.
20 changes: 19 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,22 @@ permalinkable = false
[module]
[module.hugoVersion]
extended = true
min = "0.73.0"
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'
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 3 additions & 9 deletions userguide/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit f03cba0

Please sign in to comment.