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

Add filename grouping function #24

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Add filename grouping function #24

wants to merge 5 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 16, 2016

Posibility to add source filename as additional folder to exported files.

Posibility to add source filename as additional folder to exported files.
@cognitom
Copy link
Owner

Could you explain the use case?

By the way, no need to change .gitignore, I think.

@ghost
Copy link
Author

ghost commented Mar 22, 2016

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.

@ghost
Copy link
Author

ghost commented Mar 22, 2016

By the way, to adjust .gitignore file for used OS and Tools prevent mistakes on commit with helper files.
There for I like the help of www.gitignore.io :)

@cognitom
Copy link
Owner

@nahody OK, it makes sense. Thanks!
But .gitignore should be another PR.

@@ -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
Copy link
Owner

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

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.

1 participant