Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence output #10

Open
ghost opened this issue Aug 26, 2015 · 3 comments
Open

Silence output #10

ghost opened this issue Aug 26, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Aug 26, 2015

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.

@ghost
Copy link
Author

ghost commented Aug 26, 2015

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?

@ghost ghost closed this as completed Aug 26, 2015
@ghost ghost reopened this Aug 26, 2015
@keithamus
Copy link
Owner

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.

@keithamus
Copy link
Owner

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

@keithamus keithamus changed the title Preserving this hash? Silence output Aug 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant