typings-generator.js 743 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env node
  2. /*
  3. * Pass optional path to target directory as command line argument.
  4. *
  5. * The directory must include the apis/ folder and service customizations at
  6. * `lib/services`. Clients will be generated in `clients/`.
  7. *
  8. * If parameter is not passed the repository root will be used.
  9. */
  10. var path = require('path');
  11. var TSGenerator = require('./lib/ts-generator');
  12. var basePath = process.argv[2] || path.join(__dirname, '..');
  13. var tsGenerator = new TSGenerator({
  14. SdkRootDirectory: basePath
  15. });
  16. tsGenerator.generateAllClientTypings();
  17. tsGenerator.generateGroupedClients();
  18. tsGenerator.updateDynamoDBDocumentClient();
  19. tsGenerator.generateConfigurationServicePlaceholders();
  20. console.log('TypeScript Definitions created.');