Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Managing Assets for a Pattern

Dave Olsen edited this page Jul 16, 2013 · 2 revisions

Assets for patterns, including JavaScript, CSS, and images, should be stored in the source/ directory. The PHP version of Pattern Lab will move these assets to the public/ directory for you when you generate your site or when you watch the source/ directory for changes. You can name and nest your assets however you like. The structure will be maintained when they're moved to the public/ directory.

Ignoring Assets Based on File Extension

By default, the PHP version of Pattern Lab will ignore assets with the following file extensions:

  • .less
  • .scss
  • .DS_Store

To ignore more file extensions just edit the ie variable in config/config.ini. For example, to ignore .png files your ie variable would look like:

ie = "scss,DS_Store,less,png"

Ignoring All Assets in a Directory

By default, the PHP version of Pattern Lab will ignore assets in directories with the following name:

  • scss

To ignore more directories just edit the id variable in config/config.ini. For example, to ignore directories named test/ your id variable would look like:

id = "scss,test"

Important: The PHP version of Pattern Lab will only ignore exact matches of ignored directories. For example, if you had a directory named cool_scss it, and the assets underneath it, would be moved to public/ even though scss was in the name of the directory.

Clone this wiki locally