UNPKG

generator-begcode

Version:

Spring Boot + Angular/React/Vue in one handy generator

18 lines (17 loc) 816 B
import needleBase from '../../needle-base.js'; export default class extends needleBase { addStyle(style, comment, filePath, needle) { const content = this._mergeStyleAndComment(style, comment); this.addBlockContentToFile({ file: filePath, needle, splicable: content, regexp: `\n${style}\n`, prettierAware: true }, 'Style not added to JHipster app.\n'); } _mergeStyleAndComment(style, comment) { let styleBlock = ''; if (comment) { styleBlock += '/* ==========================================================================\n'; styleBlock += `${comment}\n`; styleBlock += '========================================================================== */\n'; } styleBlock += `${style}\n`; return styleBlock; } }