Skip to content

Conversation

alvinlin123
Copy link
Member

It would be useful to allow customization on the "-blessed" part of the file name to something else so that we can potentially have different part name (using UUID for example) for different build.

@adam-lynch
Copy link
Member

Thanks for this. I guess the option should be called suffix.

I could see someone asking for more later though. Let's say they don't like how it uses a hyphen or the way the number is put on the end. What if this option could accept a function which would be called to generate the suffix for each file? It could be used like this:

.pipe(bless({
  suffix: function(index){
    return index + '_customSuffix';
  }
})

What do you think? This could be overthinking it.

@alvinlin123
Copy link
Member Author

I don't see why not. I think it's a good idea to accept a function. I will change the config to be called "suffix" and can be either a string or function. Thanks for the great suggestion.

Copy link
Member

@adam-lynch adam-lynch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great... just one last little thing 😄

index.js Outdated
@@ -1,5 +1,6 @@
'use strict';

var _ = require("lodash");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You aren't using a lot of lodash so to save the end user having to download it all on install, we could depend on the individual methods instead (which are independently published on npm). If you want _.isString for example, we could depend on lodash.isstring and require('lodash.isstring') here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, thanks for pointing that out, I did not know you can do that! That's awesome. I will make the change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :) let me know if anything else.

@adam-lynch adam-lynch merged commit d074d8d into BlessCSS:master Oct 9, 2016
@adam-lynch
Copy link
Member

Thanks a lot @alvinlin123! 👏 3.2.0 is now published with this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants