forked from ember-cli/ember-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
34 lines (27 loc) · 809 Bytes
/
index.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
'use strict';
const stringUtil = require('ember-cli-string-utils');
const getURLFor = require('ember-source-channel-url');
module.exports = {
description: 'Generates an Ember application with a module unification layout.',
filesToRemove: [],
locals(options) {
let entity = options.entity;
let rawName = entity.name;
let name = stringUtil.dasherize(rawName);
let namespace = stringUtil.classify(rawName);
return getURLFor('canary').then(url => ({
name,
modulePrefix: name,
namespace,
emberCLIVersion: require('../../package').version,
emberCanaryVersion: url,
yarn: options.yarn,
welcome: options.welcome,
}));
},
fileMapTokens(options) {
return {
__component__() { return options.locals.component; },
};
},
};