UNPKG

generator-simple-less-site

Version:

Yeoman generator for creating a simple website using lessCSS and bootstrap

25 lines (20 loc) 806 B
'use strict'; var util = require('util'); var path = require('path'); var yeoman = require('yeoman-generator'); var utils = require('./util.js'); var Generator = module.exports = function Generator() { yeoman.generators.NamedBase.apply(this, arguments); try { this.appname = require(path.join(process.cwd(), 'bower.json')).name; } catch (e) { this.appname = path.basename(process.cwd()); } this.appname = this._.slugify(this._.humanize(this.appname)); this.scriptAppName = this._.camelize(this.appname) + utils.appName(this); this.cameledName = this._.camelize(this.name); this.classedName = this._.classify(this.name); this.filters = this.config.get('filters'); this.sourceRoot(path.join(__dirname, '/templates')); }; util.inherits(Generator, yeoman.generators.NamedBase);