Skip to content

Commit

Permalink
Update the generator descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
taylor-steve committed Nov 5, 2024
1 parent 1c56c8c commit ffea72a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
17 changes: 8 additions & 9 deletions lib/generators/spotlight/assets/importmap_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ class ImportmapGenerator < Rails::Generators::Base
class_option :'bootstrap-version', type: :string, default: ENV.fetch('BOOTSTRAP_VERSION', '~> 5.3'), desc: "Set the generated app's bootstrap version"

desc <<-DESCRIPTION
This generator sets up the app to use importmap to manage the javascript,
and cssbundling-rails to manage the styles.
SCSS stylesheets are installed via yarn and built into a single CSS
stylesheet.
JS sources from the Blacklight and Spotlight gems are delivered via
importmap, and their dependencies are pinned to versions delivered via
CDN.
This generator configures the Spotlight app to use importmap for
javascript and bundling for the styles:
- Adds the frontend style dependencies, including spotlight-frontend,
via yarn
- Configures cssbundling-rails to build the styles
- Javascript from gems such as Blacklight and Spotlight are delivered
via importmap/the asset pipeline without the need for bundling
DESCRIPTION

def add_stylesheet_dependencies
Expand Down
9 changes: 6 additions & 3 deletions lib/generators/spotlight/assets/propshaft_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ class PropshaftGenerator < Rails::Generators::Base
class_option :'bootstrap-version', type: :string, default: ENV.fetch('BOOTSTRAP_VERSION', '~> 5.3'), desc: "Set the generated app's bootstrap version"

desc <<-DESCRIPTION
The Spotlight frontend assets are installed from the npm package. In
local development they automatically reference the versions from the
outer directory (the Spotlight repository) via a yarn symlink.
This generator configures the Spotlight app to use bundling for both
javascript and styles:
- Adds frontend dependencies, including spotlight-frontend, via yarn
- Configures jsbundling-rails (w/ esbuild) to bundle the JS
- Configures cssbundling-rails to build the styles
DESCRIPTION

def install_dependencies
Expand Down

0 comments on commit ffea72a

Please sign in to comment.