Custom template does not work with output directory (--out) in node module template
See original GitHub issueIn my node module template does not work the output directory.
gql-gen --export ./dist/generator/schema.js -t graphql-codegen-sequelize-typescript --out ./src/models/types/
config file
const config = {
inputType: 'MULTIPLE_FILES',
templates: {
type,
inputType,
interface: interfaceTemplate,
enum: enumTemplate,
scalar,
union,
'loaders.ts.schema.handlebars': loaders,
'loaders-export.ts.schema.handlebars': loadersExport
},
flattenTypes: true,
filesExtension: 'ts',
....
The files ‘loaders.ts’ and ‘loaders-export.ts’ are writing in the root path, but output directory is ‘./src/models/types/’.
Is it a bug? In gql-gen.json file is working with loaders.ts.schema.handlebars file.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
The custom node template file is not working - Drupal Answers
I've created template file named node--product-display.tpl.php as suggested by the Theme developer module, but the changes I made to this file ...
Read more >hbs files are not copied to dist folder · Issue #42 - GitHub
Created a folder "templates" in the "src" folder and put my .hbs in there. Install npm module: cpx. Create a npm run command...
Read more >node.js - Jade - Loading templates from different directories
The setup used in the app is to have a /views/layout.jade file that loads for all sub-apps. The sub-apps' views are located in...
Read more >How to build your own project templates using Node CLI and ...
How to build your own project templates using Node CLI and typescript. This is a journey of having my own cli to create...
Read more >Template a file out to a target host - Ansible Documentation
In most cases, you can use the short module name template even without ... template_destpath is the path of the template on the...
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 think you can close the ticket. Version 0.9.1 fixes my problem.
I looked in the code for a minute and if the line 293 in to
then the files will writing in out directory. I don’t know, what do the master version do. https://github.com/dotansimha/graphql-code-generator/blob/da33ee50a7fa82a17ad4595be124cd1639deb6db/packages/graphql-codegen-compiler/src/generate-multiple-files.ts#L293-L299 I will checking the master build.