Skip to content

Commit

Permalink
Merge pull request #452 from codeconsole/7.0.x-bootstrap5
Browse files Browse the repository at this point in the history
Bootstrap 5.3.3
  • Loading branch information
codeconsole authored Dec 10, 2024
2 parents 3a61001 + e5165cf commit 15d56f3
Show file tree
Hide file tree
Showing 48 changed files with 203 additions and 41,228 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ public Builder compileOnly() {
return scope(Scope.COMPILE_ONLY);
}

public Builder developmentOnly() {
return scope(Scope.DEVELOPMENT_ONLY);
}

public Builder runtimeOnly() {
return scope(Scope.RUNTIME_ONLY);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,24 @@ public void apply(GeneratorContext generatorContext) {
.artifactId("asset-pipeline-grails")
.runtimeOnly());

generatorContext.addDependency(Dependency.builder()
.groupId("org.webjars.npm")
.artifactId("bootstrap")
.version("5.3.3")
.developmentOnly());

generatorContext.addDependency(Dependency.builder()
.groupId("org.webjars.npm")
.artifactId("bootstrap-icons")
.version("1.11.3")
.developmentOnly());

generatorContext.addDependency(Dependency.builder()
.groupId("org.webjars.npm")
.artifactId("jquery")
.version("3.7.1")
.developmentOnly());

final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
generatorContext.addTemplate("advancedgrails_svg", new URLTemplate("grails-app/assets/images/advancedgrails.svg", classLoader.getResource("assets/images/advancedgrails.svg")));
generatorContext.addTemplate("apple-touch-icon_png", new URLTemplate("grails-app/assets/images/apple-touch-icon.png", classLoader.getResource("assets/images/apple-touch-icon.png")));
Expand All @@ -80,48 +98,12 @@ public void apply(GeneratorContext generatorContext) {
generatorContext.addTemplate("grails_svg", new URLTemplate("grails-app/assets/images/grails.svg", classLoader.getResource("assets/images/grails.svg")));
generatorContext.addTemplate("grails-cupsonly-logo-white_svg", new URLTemplate("grails-app/assets/images/grails-cupsonly-logo-white.svg", classLoader.getResource("assets/images/grails-cupsonly-logo-white.svg")));
generatorContext.addTemplate("slack_svg", new URLTemplate("grails-app/assets/images/slack.svg", classLoader.getResource("assets/images/slack.svg")));
generatorContext.addTemplate("spinner_gif", new URLTemplate("grails-app/assets/images/spinner.gif", classLoader.getResource("assets/images/spinner.gif")));
generatorContext.addTemplate("database-add_png", new URLTemplate("grails-app/assets/images/skin/database_add.png", classLoader.getResource("assets/images/skin/database_add.png")));
generatorContext.addTemplate("database-delete_png", new URLTemplate("grails-app/assets/images/skin/database_delete.png", classLoader.getResource("assets/images/skin/database_delete.png")));
generatorContext.addTemplate("database-edit_png", new URLTemplate("grails-app/assets/images/skin/database_edit.png", classLoader.getResource("assets/images/skin/database_edit.png")));
generatorContext.addTemplate("database-save_png", new URLTemplate("grails-app/assets/images/skin/database_save.png", classLoader.getResource("assets/images/skin/database_save.png")));
generatorContext.addTemplate("database-table_png", new URLTemplate("grails-app/assets/images/skin/database_table.png", classLoader.getResource("assets/images/skin/database_table.png")));
generatorContext.addTemplate("exclamation_png", new URLTemplate("grails-app/assets/images/skin/exclamation.png", classLoader.getResource("assets/images/skin/exclamation.png")));
generatorContext.addTemplate("house_png", new URLTemplate("grails-app/assets/images/skin/house.png", classLoader.getResource("assets/images/skin/house.png")));
generatorContext.addTemplate("information_png", new URLTemplate("grails-app/assets/images/skin/information.png", classLoader.getResource("assets/images/skin/information.png")));
generatorContext.addTemplate("sorted_asc_gif", new URLTemplate("grails-app/assets/images/skin/sorted_asc.gif", classLoader.getResource("assets/images/skin/sorted_asc.gif")));
generatorContext.addTemplate("sorted_desc_gif", new URLTemplate("grails-app/assets/images/skin/sorted_desc.gif", classLoader.getResource("assets/images/skin/sorted_desc.gif")));

generatorContext.addTemplate("application_js", new URLTemplate("grails-app/assets/javascripts/application.js", classLoader.getResource("assets/javascripts/application.js")));
generatorContext.addTemplate("bootstrap_bundle_js", new URLTemplate("grails-app/assets/javascripts/bootstrap.bundle.js", classLoader.getResource("assets/javascripts/bootstrap.bundle.js")));
generatorContext.addTemplate("bootstrap_bundle_js_map", new URLTemplate("grails-app/assets/javascripts/bootstrap.bundle.js.map", classLoader.getResource("assets/javascripts/bootstrap.bundle.js.map")));
generatorContext.addTemplate("bootstrap_bundle_min_js", new URLTemplate("grails-app/assets/javascripts/bootstrap.bundle.min.js", classLoader.getResource("assets/javascripts/bootstrap.bundle.min.js")));
generatorContext.addTemplate("bootstrap_bundle_min_js_map", new URLTemplate("grails-app/assets/javascripts/bootstrap.bundle.min.js.map", classLoader.getResource("assets/javascripts/bootstrap.bundle.min.js.map")));
generatorContext.addTemplate("bootstrap_js", new URLTemplate("grails-app/assets/javascripts/bootstrap.js", classLoader.getResource("assets/javascripts/bootstrap.js")));
generatorContext.addTemplate("bootstrap_js_map", new URLTemplate("grails-app/assets/javascripts/bootstrap.js.map", classLoader.getResource("assets/javascripts/bootstrap.js.map")));
generatorContext.addTemplate("bootstrap_min_js", new URLTemplate("grails-app/assets/javascripts/bootstrap.min.js", classLoader.getResource("assets/javascripts/bootstrap.min.js")));
generatorContext.addTemplate("bootstrap_min_js_map", new URLTemplate("grails-app/assets/javascripts/bootstrap.min.js.map", classLoader.getResource("assets/javascripts/bootstrap.min.js.map")));
generatorContext.addTemplate("jquery-3_5_1_js", new URLTemplate("grails-app/assets/javascripts/jquery-3.5.1.js", classLoader.getResource("assets/javascripts/jquery-3.5.1.js")));
generatorContext.addTemplate("jquery-3_5_1_min_js", new URLTemplate("grails-app/assets/javascripts/jquery-3.5.1.min.js", classLoader.getResource("assets/javascripts/jquery-3.5.1.min.js")));
generatorContext.addTemplate("jquery-3_5_1_min_js_map", new URLTemplate("grails-app/assets/javascripts/jquery-3.5.1.min.js.map", classLoader.getResource("assets/javascripts/jquery-3.5.1.min.js.map")));
generatorContext.addTemplate("popper_js", new URLTemplate("grails-app/assets/javascripts/popper.js", classLoader.getResource("assets/javascripts/popper.js")));
generatorContext.addTemplate("popper_min_js", new URLTemplate("grails-app/assets/javascripts/popper.min.js", classLoader.getResource("assets/javascripts/popper.min.js")));
generatorContext.addTemplate("popper_min_js_map", new URLTemplate("grails-app/assets/javascripts/popper.min.js.map", classLoader.getResource("assets/javascripts/popper.min.js.map")));

generatorContext.addTemplate("application_css", new URLTemplate("grails-app/assets/stylesheets/application.css", classLoader.getResource("assets/stylesheets/application.css")));
generatorContext.addTemplate("bootstrap_css", new URLTemplate("grails-app/assets/stylesheets/bootstrap.css", classLoader.getResource("assets/stylesheets/bootstrap.css")));
generatorContext.addTemplate("bootstrap_css_map", new URLTemplate("grails-app/assets/stylesheets/bootstrap.css.map", classLoader.getResource("assets/stylesheets/bootstrap.css.map")));
generatorContext.addTemplate("bootstrap_min_css", new URLTemplate("grails-app/assets/stylesheets/bootstrap.min.css", classLoader.getResource("assets/stylesheets/bootstrap.min.css")));
generatorContext.addTemplate("bootstrap_min_css_map", new URLTemplate("grails-app/assets/stylesheets/bootstrap.min.css.map", classLoader.getResource("assets/stylesheets/bootstrap.min.css.map")));
generatorContext.addTemplate("bootstrap-grid_css", new URLTemplate("grails-app/assets/stylesheets/bootstrap-grid.css", classLoader.getResource("assets/stylesheets/bootstrap-grid.css")));
generatorContext.addTemplate("bootstrap-grid_css_map", new URLTemplate("grails-app/assets/stylesheets/bootstrap-grid.css.map", classLoader.getResource("assets/stylesheets/bootstrap-grid.css.map")));
generatorContext.addTemplate("bootstrap-grid_min_css", new URLTemplate("grails-app/assets/stylesheets/bootstrap-grid.min.css", classLoader.getResource("assets/stylesheets/bootstrap-grid.min.css")));
generatorContext.addTemplate("bootstrap-grid_min_css_map", new URLTemplate("grails-app/assets/stylesheets/bootstrap-grid.min.css.map", classLoader.getResource("assets/stylesheets/bootstrap-grid.min.css.map")));
generatorContext.addTemplate("bootstrap-reboot_css", new URLTemplate("grails-app/assets/stylesheets/bootstrap-reboot.css", classLoader.getResource("assets/stylesheets/bootstrap-reboot.css")));
generatorContext.addTemplate("errors_css", new URLTemplate("grails-app/assets/stylesheets/errors.css", classLoader.getResource("assets/stylesheets/errors.css")));
generatorContext.addTemplate("grails_css", new URLTemplate("grails-app/assets/stylesheets/grails.css", classLoader.getResource("assets/stylesheets/grails.css")));
generatorContext.addTemplate("main_css", new URLTemplate("grails-app/assets/stylesheets/main.css", classLoader.getResource("assets/stylesheets/main.css")));
generatorContext.addTemplate("mobile_css", new URLTemplate("grails-app/assets/stylesheets/mobile.css", classLoader.getResource("assets/stylesheets/mobile.css")));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ assets {
@if (applicationType == ApplicationType.WEB_PLUGIN) {
packagePlugin = true
}
minifyJs = true
minifyCss = true
excludes = [
'webjars/jquery/**',
'webjars/bootstrap/**',
'webjars/bootstrap-icons/**'
]
includes = [
'webjars/jquery/*/dist/jquery.js',
'webjars/bootstrap/*/dist/js/bootstrap.bundle.js',
'webjars/bootstrap/*/dist/css/bootstrap.css',
'webjars/bootstrap-icons/*/font/bootstrap-icons.css',
'webjars/bootstrap-icons/*/font/fonts/*',
]
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// You're free to add application-wide JavaScript to this file, but it's generally better
// to create separate JavaScript files as needed.
//
//= require jquery-3.5.1.min
//= require popper.min
//= require bootstrap
//= require webjars/jquery/3.7.1/dist/jquery.js
//= require webjars/bootstrap/5.3.3/dist/js/bootstrap.bundle
//= require_self
Loading

0 comments on commit 15d56f3

Please sign in to comment.