Skip to content
Snippets Groups Projects
Commit 13cc3ba2 authored by Ivica Puljic's avatar Ivica Puljic Committed by Ivica Puljic
Browse files

Issue #3339903 by pivica: Update caniuse-lite in build process

parent f91d7d81
No related branches found
No related tags found
No related merge requests found
......@@ -249,3 +249,15 @@ function bs_base_bs_update_8010($target_theme_name) {
system('rm -rf ' . escapeshellarg($themes_info[$target_theme_name]->subpath . '/node_modules'));
}
}
/**
* Add caniuse-lite update into theme build process.
*/
function bs_base_bs_update_8011($target_theme_name) {
$themes_info = _bs_base_drupal_theme_list_info();
if (isset($themes_info[$target_theme_name])) {
_bs_base_regexp_file($themes_info[$target_theme_name]->subpath . '/package.json', [
'npx gulp clean:css' => "npx browserslist@latest --update-db && npx gulp clean:css",
]);
}
}
......@@ -872,7 +872,7 @@ function _bs_base_theme_run_update_hooks($target_machine_name) {
function _bs_base_drush_build_css($path) {
// Install npm packages and execute gulp sass compilation.
drush_log("Installing any missing package and rebuilding sass files", LogLevel::INFO);
exec('cd ' . $path . ' && npm run build-css');
exec('cd ' . $path . ' && npm run build-css --yes');
}
/**
......
......@@ -34,6 +34,6 @@
"through2": "^4.0.2"
},
"scripts": {
"build-css": "((type pnpm && pnpm install) || npm install) && npx gulp clean:css && npx gulp sass"
"build-css": "((type pnpm && pnpm install) || npm install) && npx browserslist@latest --update-db && npx gulp clean:css && npx gulp sass"
}
}
......@@ -5,7 +5,7 @@ base theme: bs_base
core_version_requirement: ^9.3 || ^10
bs_versions:
bs_base: 8010
bs_base: 8011
# @todo - Core does not allow for now themes to declare dependencies on modules.
# @see https://www.drupal.org/project/drupal/issues/474684
......
......@@ -35,6 +35,6 @@
"through2": "^4.0.2"
},
"scripts": {
"build-css": "((type pnpm && pnpm install) || npm install) && npx gulp clean:css && npx gulp sass"
"build-css": "((type pnpm && pnpm install) || npm install) && npx browserslist@latest --update-db && npx gulp clean:css && npx gulp sass"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment