UNPKG

generator-jhipster-dotnetcore

Version:

[![NPM version][npm-image]][npm-url] [![Documentation Status](https://readthedocs.org/projects/jhipsternet/badge/?version=latest)](https://jhipsternet.readthedocs.io/en/latest/?badge=latest) [![Generator Build Status][github-actions-generator-image]][gi

38 lines (32 loc) 1.21 kB
#!/usr/bin/env node const { dirname, basename, join } = require('path'); const { version, bin } = require('../package.json'); // Get package name to use as namespace. // Allows blueprints to be aliased. const packagePath = dirname(__dirname); const packageFolderName = basename(packagePath); const devBlueprintPath = join(packagePath, '.blueprint'); const blueprint = packageFolderName.startsWith('jhipster-') ? `generator-${packageFolderName}` : packageFolderName; (async () => { const { runJHipster, done, logger } = await import('generator-jhipster/cli'); const executableName = Object.keys(bin)[0]; runJHipster({ executableName, executableVersion: version, defaultCommand: 'app', devBlueprintPath, blueprints: { [blueprint]: version, }, printBlueprintLogo: () => { console.log('===================== JHipster Dotnetcore ====================='); console.log(''); }, lookups: [{ packagePaths: [packagePath] }], ...require('./cli-customizations.cjs'), }).catch(done); process.on('unhandledRejection', up => { logger.error('Unhandled promise rejection at:'); logger.fatal(up); }); })();