You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm loving the simplicity of the hashmark library, but I'm wondering if there's a (non-complex) way to preserve the output hash for the purposes of using it in a build process. For example, if I'm building a front-end it would be nice to have an index.html file with some sort of template <script src=<% hashmark.someFileWithHashedName%>/></script> to run through a template engine with the results of running hashmark.
The text was updated successfully, but these errors were encountered:
Much too late to be coding for me. I see this is entirely already a feature with the --asset-map functionality. Kudos regardless. Is there a way to not have the json spit out if it's coming from a browserify files/** | hashmark?
If you dont want hashmark outputting json you could always redirect the stdout to /dev/null, for example: browserify files/** | hashmark > /dev/null. Alternatively you could write it out to a json file, like browserify files/** | hashmark > assets.json
The --asset-map flag will work similarly to hashmark > assets.json - except for one important distinction: it appends to an existing json, if present. If you don't need that feature, it might read easier using standard pipes and redirections.
Having said all of that, it might be nice to add a --silent flag to silence the output - especially when using --asset-map. Feel free to write a PR for this, if you'd like the feature @aft-luke
I'm loving the simplicity of the hashmark library, but I'm wondering if there's a (non-complex) way to preserve the output hash for the purposes of using it in a build process. For example, if I'm building a front-end it would be nice to have an
index.html
file with some sort of template<script src=<% hashmark.someFileWithHashedName%>/></script>
to run through a template engine with the results of running hashmark.The text was updated successfully, but these errors were encountered: