DFE-Digital/govuk-components

View on GitHub
guide/Rules

Summary

Maintainability
Test Coverage
compile '/index.slim' do
  filter :slim
  layout '/splash.*'
  write '/index.html'
end

compile '/components/*/*.slim' do
  filter :slim, format: :html
  filter :colorize_syntax, default_colorizer: :rouge
  filter :rubypants
  layout '/example.*'
  write item.identifier.without_ext + '/index.html'
end

compile '/**/*.slim' do
  filter :slim, format: :html
  filter :colorize_syntax, default_colorizer: :rouge
  filter :rubypants
  layout '/default.*'
  write item.identifier.without_ext + '/index.html'
end

ignore '/**/_*.scss'
compile '/**/*.scss' do
  filter :dart_sass,
    targets: %w(content/stylesheets/application.scss),
    load_paths: %w(
      node_modules/govuk-frontend/
      node_modules/@x-govuk/govuk-prototype-components/
    )
  write item.identifier.without_ext + '.css'
end

compile '/sitemap.xml' do
  filter :erb
  write '/sitemap.xml'
end

compile '/**/*' do
  write item.identifier.to_s
end

layout '/**/*', :slim