const needleBase = require('./needle-base');

module.exports = class extends needleBase {
    addStyle(style, comment, filePath, needle) {
        const styleBlock = this.mergeStyleAndComment(style, comment);
        this.addBlockContentToFile(filePath, styleBlock, needle);
    }

    mergeStyleAndComment(style, comment) {
        let styleBlock = '';

        if (comment) {
            styleBlock += '/* ==========================================================================\n';
            styleBlock += `${comment}\n`;
            styleBlock += '========================================================================== */\n';
        }
        styleBlock += `${style}\n`;

        return styleBlock;
    }
};

@@ -214,63 +214,177 @@
     
-this.addBlockContentToFile(filePath, styleBlock, needle
+const rewriteFileModel = this.generateFileModel(filePath, needle, styleBlock);%0A%0A        this.addBlockContentToFile(rewriteFileModel, 'Style not added to JHipster app.%5Cn'
 );%0A 

Use needleNase API in clientBase