How to use the @graphback/core.removeFiles function in @graphback/core

To help you get started, we’ve selected a few @graphback/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aerogear / graphback / packages / graphback-db-manage / src / database / migrations / schema / InputModelProvider.ts View on Github external
public async updatePreviousSchema(newSchema: string) {
    if (!existsSync(this.oldSchemaDir)) {
      mkdirSync(this.oldSchemaDir);
    }

    await removeFiles(join(this.oldSchemaDir, '*.graphql'));
    writeFileSync(join(this.oldSchemaDir, 'Previous.graphql'), newSchema);
  }
}