Add generator for utils/helpers directory?
See original GitHub issueIf I ran something like this
$ yarn redwood generate helper convertdate
It creates a new subfolder called ConvertDate in helpers directory. That have the following files,
📦helpers
┣ 📂ConvertDate
┃ ┗ 📜ConvertDate.js
┃ ┗ 📜ConvertDate.test.js
┗ 📜.keep
Example files
This is the file that it generate ConvertDate.js
export const Add = (a, b) => {
return a + b
}
Here is the example test file ConvertDate.test.js
import { Add } from './ConvertDate'
test('ConvertDate works', () => {
const value = Add(1, 2)
expect(value).toBe(3)
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Learning to Plop
A little tool that saves you time and helps your team build new files with consistency. Generate code when you want, how you...
Read more >Helper Methods - Middleman
Template helpers are methods which can be used in your dynamic templates to simplify common HTML tasks. Most of the basic methods should...
Read more >generator-util | Yarn - Package Manager
Utils for generate generators. base, generate, generator, helper. readme. generator-util NPM version · Build Status ... Use it. $ yarn add generator-util ......
Read more >linkml.utils package — linkml documentation
Subclasses of this class implement specific generators. Each generator is in one of two styles: schemaloader-based, using a Visitor pattern (older). schemaview- ...
Read more >How to create custom helper functions in Laravel
First create helpers.php inside App\Http directory. Then add the following code inside the composer.json
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I like this idea!
I think we would just use a component in the React world. It’s components all the way down.