Closed muesli closed 5 years ago
Friendly ping to @marc-gr as he was interested on this.
Instead of exclude files with a pattern, I created a feature that lets you include only certain files using a pattern. This makes it possible, for example, to include only web files (html, css, js, images, fonts) when working on a web project.
For example:
$ statik -src=./ -exts=*.html,*.map,*.json,*.js,*.css,*.ttf,*.woff*,*.otf,*.svg,*.ico,*.gif,*.png,*.jpg
I created this feature with the ease of generating static files and the architecture I use, where my template files are in the same directory as the control codes, just like dotnet core projects (ex: index.html and index .html.go).
To be honest I, most of the time, prefer whitelist over blacklist. In this specific case, we use statik
to include files that are in other repository (e.g. json schemas) and that repository has its own stuff: readme, package.json, license, etc. I am in for the extension whitelist. Any opinion @marc-gr @rakyll ?
Closed by https://github.com/rakyll/statik/pull/78
An argument to exclude certain file patterns (like
.git
) would be nice.