Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

Commit

Permalink
added version to dist CSS build
Browse files Browse the repository at this point in the history
  • Loading branch information
Vino Rodrigues committed Mar 23, 2021
1 parent cbddf7d commit d0c69a2
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 1 deletion.
9 changes: 9 additions & 0 deletions build/replace-in-file.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

const pkg = require('../package.json');

module.exports = {
files: 'dist/css/*.css',
from: '(https://vinorodrigues.github.io/bootstrap-dark-5/)',
to: `v${pkg.version} (https://vinorodrigues.github.io/bootstrap-dark-5/)`
}
62 changes: 62 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"build": "echo \"Deprecated: Use `npm run dist`\" && npm-run-all dist",
"DISABLED_serve": "browser-sync start --server --files [\"dist/css/*.css\", \"dist/js/*.ts\", \"examples/*.*\", \"*.html\"]",
"serve": "browser-sync start --server",
"css": "npm-run-all css-wipe css-compile css-prefix css-minify",
"css": "npm-run-all css-wipe css-compile css-prefix css-minify css-version",
"css-wipe": "rimraf ./dist/css",
"css-compile": "sass --style expanded --source-map --embed-sources --no-error-css --load-path=node_modules/bootstrap/scss scss/:dist/css/",
"css-prefix": "postcss --config build/postcss.config.js --replace \"dist/css/*.css\" \"!dist/css/*.rtl*.css\" \"!dist/css/*.min.css\"",
Expand All @@ -23,6 +23,7 @@
"css-minify-dark": "cleancss -O1 --format breakWith=lf --output dist/css/bootstrap-dark.min.css dist/css/bootstrap-dark.css",
"css-minify-unlit": "cleancss -O1 --format breakWith=lf --output dist/css/bootstrap-unlit.min.css dist/css/bootstrap-unlit.css",
"css-minify-blackbox": "cleancss -O1 --format breakWith=lf --output dist/css/bootstrap-blackbox.min.css dist/css/bootstrap-blackbox.css",
"css-version": "replace-in-file --configFile=build/replace-in-file.config.js",
"css-lint": "npm-run-all --continue-on-error --parallel css-lint-*",
"css-lint-stylelint": "stylelint \"**/*.scss\" --cache --cache-location .cache/.stylelintcache --rd",
"css-lint-vars": "fusv scss/",
Expand Down Expand Up @@ -99,6 +100,7 @@
"npm-run-all": "^4.1.5",
"postcss": "^8.2.8",
"postcss-cli": "^8.3.1",
"replace-in-file": "^6.2.0",
"rimraf": "^3.0.2",
"sass": "^1.32.6",
"stylelint": "^13.12.0",
Expand Down

0 comments on commit d0c69a2

Please sign in to comment.