Skip to content
Andreas Håkansson edited this page Jun 21, 2014 · 2 revisions

When compiling the site we clear out the destination directory, but you may want to copy stuff into the directory, such as folders like stylesheets, javascript or images

So Snow lets you define directories to copy. These directories are copied as is, everything inside and all nested directories will also be copied.

To define the directories simply add a copyDirectories property in the Snow.config file:

"copyDirectories": [
  "images",
  "javascripts",
  "stylesheets"
]

Changing the destination directory.

In the event that you want the destination directory to be different to the source, this may occur if you have your Snow.config file anywhere except the root directory of the Snow site, you can specify a destination path using =>

Given the same examples in a sub directory, we can update the paths like so:

"copyDirectories": [
  "Snow/images => images",
  "Snow/javascripts => js",
  "Snow/stylesheets => css"
]

To copy files into the root directory, use . as a target

"copyDirectories": [
  "directoryName => ."
]