module AmberCLI::StaticAssets

Overview

Shared, convention-based access to a web application's authored and compiled static assets. Keeping this outside the command class lets project generation and watch mode use the compiler in-process instead of spawning a second CLI executable.

Defined in:

amber_cli/static_assets.cr

Constant Summary

MANIFEST_NAME = "manifest.json"
OUTPUT_ROOT = Path["public/assets"]
PUBLIC_PATH = "/assets"
SOURCE_ROOT = Path["app/assets"]

Class Method Summary

Class Method Detail

def self.build(project_root : Path | String = Path["."]) : AssetPipeline::StaticAssets::Manifest #

[View source]
def self.check(project_root : Path | String = Path["."]) : AssetPipeline::StaticAssets::Manifest #

[View source]
def self.compiler(project_root : Path | String = Path["."]) : AssetPipeline::StaticAssets::Compiler #

[View source]