-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add filename grouping function #24
base: master
Are you sure you want to change the base?
Conversation
Posibility to add source filename as additional folder to exported files.
Could you explain the use case? By the way, no need to change |
Our case for this adjustment is that we create many icons. To make this clearer, we have according to the subject a Sketch file with matching icons in it. Our desire is to retain the themes at export. Therefore, should for each sketch file, which deals with a subject, an identically-folders are created, in which the files are then exported. This way it is faster, easier and less error happen. Since there are many workers working here. Of course we can also rename all slices with paths, but as I said we deem cumbersome and error prone. |
By the way, to adjust .gitignore file for used OS and Tools prevent mistakes on commit with helper files. |
@nahody OK, it makes sense. Thanks! |
@@ -90,6 +92,8 @@ module.exports = (options = {}) -> | |||
recursive tmp_dir.path, (err, files) => | |||
for abs_path in files | |||
rel_path = path.relative tmp_dir.path, abs_path | |||
if options.filenameGrouping | |||
rel_path = path.join group, rel_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An indent is supposed to be 2 spaces. Or:
rel_path = path.join group, rel_path if options.filenameGrouping
Posibility to add source filename as additional folder to exported files.