galElmalah / scaffolder

Scaffolder - Increasing dev velocity and standardizing file conventions.
155 stars 11 forks source link

can't use transformers for file or folder names because of the '|' character #17

Open nirjan-dev opened 3 years ago

nirjan-dev commented 3 years ago

Hi, I can't use the transformers because windows won't let me use the '|' character in file/folder names, not sure if it's a windows only issue or it affects other Operating systems also but do you know if there's any way to use transformers without the '|' character? I want to do this {{tagName | capitalize}}

Thanks, for creating this awesome tool.

galElmalah commented 3 years ago

Hey, Thanks for the feedback!! :) Seems like '|' is indeed a forbidden char in windows. Here is a list of forbidden windows chars (windows sucks lol)

    < (less than)
        > (greater than)
        : (colon)
        " (double quote)
        / (forward slash)
        \ (backslash)
        | (vertical bar or pipe)
        ? (question mark)
        * (asterisk)

I guess the only solution is to support another char for transformers, maybe $ or #, what do you think @NK-WebDev ?

nirjan-dev commented 3 years ago

@galElmalah I think using another character would work, it's a shame because the '|' character is easy to reason that it's for transforming something but with other characters like $ or # we don't get that association. I guess using either $ or # will work unless it's not allowed in another operating system. It should also be a character that is unlikely to be part of the actual file/folder name. It would be great to use something like => (which also doesn't work in windows) that people can just look at and figure out what's happening.

galElmalah commented 3 years ago

Sorry for the slow response I’m currently out due to COVID 😖 I’ll get on top of this as soon as I’ll feel a bit better

nirjan-dev commented 3 years ago

I'm sorry to hear that, get well soon and stay safe.

galElmalah commented 3 years ago

this will be fixed this weekend

galElmalah commented 3 years ago

Havent got to it yet but you can use functions as a workaround for now

nirjan-dev commented 3 years ago

cool, I'll try it using functions, thanks @galElmalah