This repository has been archived by the owner on Sep 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmain.js
43 lines (37 loc) · 1.59 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
process.logging = process.logging || require('./lib/util/log');
// The generator system is a framework for node to author reusable and
// composable Generators, for a vast majority of use-case.
//
// Inspired and based off the work done on Thor and Rails 3 Generators, we try
// to provide the same kind of infrastructure.
//
// var generators = require('yeoman-generators');
//
// var env = generators('angular:model')
// .run(function(err) {
// console.log('done!');
// });
//
// Generators are registered by namespace, where namespaces are mapping the
// structure of the file system with `:` being simply converted to `/`.
//
// Generators are standard node modules, they are simply required as usual, and
// they can be shipped into reusable npm packages.
//
// The lookup is done depending on the configured load path, which is by
// default `lib/generators` in every generators package installed (ie.
// node_modules/yeoman-backbone/lib/generators)
var Environment = require('./lib/env');
var generators = module.exports = function createEnv(args, opts) {
return new Environment(args, opts);
};
// hoist up top level class the generator extend
generators.Base = require('./lib/base');
generators.NamedBase = require('./lib/named-base');
// expose test helpers for generators.
generators.test = require('./lib/test/helpers');
// backward compat, make them available as generators.generators.Base &
// NamedBase (as most of generators use yeoman.generators.Stuff)
generators.generators = {};
generators.generators.Base = generators.Base;
generators.generators.NamedBase = generators.NamedBase;