MishkaChelekom.Generators.Assets (Mishka Chelekom v0.0.9-beta.3)

Copy Markdown View Source

Vendor asset wiring shared by the generator tasks: copying component JS engines into assets/vendor/, wiring them into mishka_components.js + app.js, and installing the styled / headless stylesheets with their app.css imports.

Summary

Functions

Installs the functional (color-free) headless base stylesheet and imports it once into app.css. No-op for sub generations (--sub).

Installs the styled mishka_chelekom.css vendor stylesheet and the theme @import into app.css. No-op for sub generations (--sub).

Copies a component's JS engine files into assets/vendor/ and wires their imports/hooks into mishka_components.js and app.js. No-op when the catalog declares no :scripts.

Functions

setup_headless_css(igniter, options \\ [])

@spec setup_headless_css(
  Igniter.t(),
  keyword()
) :: Igniter.t()

Installs the functional (color-free) headless base stylesheet and imports it once into app.css. No-op for sub generations (--sub).

setup_styled_css(igniter, options \\ [])

@spec setup_styled_css(
  Igniter.t(),
  keyword()
) :: Igniter.t()

Installs the styled mishka_chelekom.css vendor stylesheet and the theme @import into app.css. No-op for sub generations (--sub).

wire_scripts(igniter, config)

@spec wire_scripts(
  Igniter.t(),
  keyword()
) :: Igniter.t()

Copies a component's JS engine files into assets/vendor/ and wires their imports/hooks into mishka_components.js and app.js. No-op when the catalog declares no :scripts.