graphql-codegen-modules-gen
Advanced tools
Comparing version 1.2.0 to 1.3.0
{ | ||
"name": "graphql-codegen-modules-gen", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -190,3 +190,3 @@ import { | ||
/******************* */ | ||
/* 3.2/ ctxModules */ | ||
/* 3.2/ _ctxModules */ | ||
/******************* */ | ||
@@ -218,3 +218,3 @@ let dataCtxModules = []; | ||
writeFileSync( | ||
join(modulePath, "../graphql", genFolder, "ctxModules.ts"), | ||
join(modulePath, "../graphql", genFolder, "_ctxModules.ts"), | ||
dataCtxModules.join("\r\n"), | ||
@@ -232,2 +232,26 @@ (err) => { | ||
); | ||
/******************* */ | ||
/* 4.0/ _appModules */ | ||
/******************* */ | ||
let dataAppModules = []; | ||
moduleNames.forEach((moduleName) => { | ||
dataAppModules.push( | ||
`import { ${moduleName}Module } from '$lib/modules/${moduleName}';` | ||
); | ||
}); | ||
dataAppModules.push(``); | ||
dataAppModules.push(`export const modules = [`); | ||
moduleNames.forEach((moduleName) => { | ||
dataAppModules.push(` ${moduleName}Module,`); | ||
}); | ||
dataAppModules.push(`];`); | ||
writeFileSync( | ||
join(modulePath, "../graphql", genFolder, "_appModules.ts"), | ||
dataAppModules.join("\r\n"), | ||
(err) => { | ||
console.error(err); | ||
} | ||
); | ||
} else { | ||
@@ -234,0 +258,0 @@ console.error(`❌ '${modulePath}' is not a valid folder path`); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
20541
498