JSRocksHQ / harmonic

The next static site generator
http://harmonicjs.com/
MIT License
282 stars 26 forks source link

Enhancement: adds user defined resource folder that is copied to public #141

Closed soapdog closed 9 years ago

soapdog commented 9 years ago

This enhancement adds a user defined resources folder that is copied to public during build. This folder is copied after the theme's resources are copied so it can be used to overlay items as well.

If there is no resources folder present then Harmonic displays a warning saying that no user resources were copied during build. This happens if the folder is not present or if there was an error in the copying process. Node documentations says that fs.exists and fs.existsSync will be deprecated and I didn't want to use functions that will soon go away thus generating debug work for my future self.

This was implemented by splitting the copyResources() function into two functions called copyThemeResources and copyUserResources as mentioned in #138 (which is solved by this PR).

Hope your folks like it, it makes things a lot easier for me at least.

UltCombo commented 9 years ago

Excellent work!

Node documentations says that fs.exists and fs.existsSync will be deprecated

I believe those are already deprecated in io.js.

Note to self:

jaydson commented 9 years ago

jaydson commented 9 years ago

Let's release on npm this feature @UltCombo ?

UltCombo commented 9 years ago

@jaydson yep, sure. Go ahead with the Harmonic release while I work with @robsongajunior to release the new JS Rocks build. =]

jaydson commented 9 years ago

Ok!

jaydson commented 9 years ago

Released as v0.3.0

UltCombo commented 9 years ago

Nice!

Now I wonder if it wouldn't be better to place the resources directory inside the src dir. I guess it doesn't matter much either way.