feat(plugin-generate-js): first version
This commit is contained in:
parent
cdafd05c20
commit
ce4693d957
4 changed files with 61 additions and 0 deletions
12
packages/plugin-generate-js/src/index.ts
Normal file
12
packages/plugin-generate-js/src/index.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import { createGeneratorPlugin, getTimestampPrefix, sanitizeMigrationName } from '@emigrate/plugin-tools';
|
||||
|
||||
export default createGeneratorPlugin(async (name) => {
|
||||
return {
|
||||
filename: `${getTimestampPrefix()}_${sanitizeMigrationName(name)}.js`,
|
||||
content: `// ${name}
|
||||
export default async () => {
|
||||
|
||||
};
|
||||
`,
|
||||
};
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue