chore(scaffolder): moving things around to make things work for the actually scaffoling

This commit is contained in:
blam
2020-06-20 03:33:41 +02:00
parent f04844441c
commit 95344229ab
25 changed files with 6 additions and 4 deletions
@@ -9,4 +9,4 @@ sed -i -e "s/__component_id__/{{ cookiecutter.component_id }}/g" package.json
mv ../../node_modules.tmp ../../\{\{cookiecutter.component_id\}\}/node_modules 2>/dev/null ||:
# move back the build directory that was moved out in the pre_gen hook (if it exists)
mv ../../build.tmp ../../\{\{cookiecutter.component_id\}\}/build 2>/dev/null ||:
mv ../../build.tmp ../../\{\{cookiecutter.component_id\}\}/build 2>/dev/null ||:
@@ -25,7 +25,7 @@ export class CookieCutter implements TemplaterBase {
...options.values,
};
await fs.writeJSON(options.directory, cookieInfo);
await fs.writeJSON(`${options.directory}/cookiecutter.json`, cookieInfo);
return '';
// run cookie cutter with new json
}
@@ -15,7 +15,7 @@
*/
export interface RequiredTemplateValues {
componentId: string;
component_id: string;
}
export interface TemplaterRunOptions {
@@ -67,7 +67,9 @@ export async function createRouter(
const path = await preparer.prepare(mockEntity);
// Run the templater on the mock directory with values from the post body
await templater.run({ directory: path, values: { componentId: 'test' } });
await templater.run({ directory: path, values: { component_id: 'test' } });
console.warn(path);
});
const app = express();