1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/big.boot-generator-jhipster

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
script-base.js 1.1 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
big.boot Отправлено 19.06.2014 09:20 ba67bda
'use strict';
var path = require('path'),
util = require('util'),
yeoman = require('yeoman-generator'),
jhipsterUtils = require('./util.js');
module.exports = Generator;
function Generator() {
yeoman.generators.NamedBase.apply(this, arguments);
this.env.options.appPath = this.config.get('appPath') || 'src/main/webapp';
console.log("appPath - " + this.env.options.appPath);
}
util.inherits(Generator, yeoman.generators.NamedBase);
Generator.prototype.addScriptToIndex = function (script) {
try {
var appPath = this.env.options.appPath;
console.log("appPath: " + this.env.options.appPath);
var fullPath = path.join(appPath, 'index.html');
jhipsterUtils.rewriteFile({
file: fullPath,
needle: '<!-- endbuild -->',
splicable: [
'<script src="scripts/' + script + '"></script>'
]
});
} catch (e) {
console.log('\nUnable to find '.yellow + fullPath + '. Reference to '.yellow + script + '.js ' + 'not added.\n'.yellow);
}
};

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/big.boot-generator-jhipster.git
git@api.gitlife.ru:oschina-mirror/big.boot-generator-jhipster.git
oschina-mirror
big.boot-generator-jhipster
big.boot-generator-jhipster
master