Comments (6)
sure take a stab at it but it seems like a lot of refactoring of the code.
from generate-template-files.
@marksmccann would this PR #66 be sufficient for your request?
from generate-template-files.
Unless I misunderstand the update, I don't think so. The main issue I was explaining is that the string replacer syntax is not valid JavaScript syntax.
class __name__(pascalCase) { ... } <-- not valid js syntax
class __name__ PascalCase__ { ... } <-- ALSO not valid js syntax
There needs to be a way to specify the case without parenthesis, a space, or any other invalid character. I guess something like this could work?
class __name____pascalCase__ { ... }
from generate-template-files.
There is new case converters:
__replacerSlot__NoCase__; // Lives down BY the River
__replacerSlot__CamelCase__; // livesDownByTheRiver
__replacerSlot__ConstantCase__; // LIVES_DOWN_BY_THE_RIVER
__replacerSlot__DotCase__; // lives.down.by.the.river
__replacerSlot__KebabCase__; // lives-down-by-the-river
__replacerSlot__LowerCase__; // livesdownbytheriver
__replacerSlot__PascalCase__; // LivesDownByTheRiver
__replacerSlot__PathCase__; // lives/down/by/the/river
__replacerSlot__SentenceCase__; // Lives down by the river
__replacerSlot__SnakeCase__; // lives_down_by_the_river
__replacerSlot__TitleCase__; // Lives Down By The River
So you can use PascalCase__
in combination with __name__
:
class __name__PascalCase__ { ... } <-- valid js syntax
from generate-template-files.
Yeah looks like I did misunderstand. Is that a new feature, or did I just totally miss that feature? Which version did this feature become available? This looks great and it looks like this issue is resolved.
from generate-template-files.
It was added yesterday by @TikiTDO (Version 3.2.0)
from generate-template-files.
Related Issues (20)
- When using slotValue I get TypeError: prop.split is not a function HOT 10
- Is there a way to pass an input in one single commands? HOT 18
- Description of the string replacers HOT 3
- stringReplacers is not optional HOT 2
- stringReplacers should be mandatory even for command line usage HOT 2
- Non-interactive / Batch Mode HOT 1
- Is there a default slot value to fallback to? HOT 2
- Any ideas/chances to run it with Arrays/Objects properly? HOT 3
- Prompt confirmation before files are written HOT 1
- How Can I add branch and PR? HOT 1
- Is it possible to use CaseConverter per stringReplacers? HOT 2
- ConfigItem.output.path as string or function HOT 1
- Add `caseConverter__` values to `CaseConverterEnum` HOT 3
- Emitter-mixin deprecation warning HOT 1
- [Question] Is there a way to run a generate without the interactive cli? HOT 1
- [Question] Is there a way to silence console messages? HOT 3
- [Question] Is there a way I can call multiple options at once HOT 1
- The result file generated by the binary template file is damaged
- Having a default replacement string HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from generate-template-files.