Skip to content

Commit

Permalink
docs: added a section for precompiled filetypes (#1440)
Browse files Browse the repository at this point in the history
  • Loading branch information
mfranzke authored Sep 21, 2022
1 parent 4bf845e commit 392521d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/docs/src/docs/pattern-managing-assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ Pattern Lab has a configuration object which allows users to separate source pat

Note how some sets of files even extend into the "vendor" `./node_modules/` directory. Relative paths are the default but absolute paths are supported also. You may also use these paths within the Grunt or Gulp taskfiles by referring to the `paths()` function.

## Preprocessed files

In case you're using a preprocessor to e.g. compile TypeScript files to JavaScript files, or SCSS/SASS files to CSS files, you might want to use your solution of choice, that perfectly fits your needs. Pattern lab doesn't restrict you at all on this, and as well doesn't deliver any defaults for the general pattern files. So e.g. you could install [`sass` node package](https://www.npmjs.com/package/sass) to compile `.scss` files, add a script to your `package.json` as well, and let those files get genereated at the `./source/css` folder.

You might want to even also ignore those source files from being copied over to your `public` folders, as they won't need to get delivered to a hosting environment, which we describe in the next section.

## Preventing specific filetypes from being copied

If you'd like to prevent specific filetypes from being copied from your `source` to your `public` folder like e.g. CSS preprocessor source files (`.scss`), you could specify those within an array of your pattern lab config:
Expand Down

0 comments on commit 392521d

Please sign in to comment.