Skip to content

Commit 790a388

Browse files
committed
Better bower.json and package.json
1 parent 57b798e commit 790a388

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

app/index.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,19 @@ module.exports = generators.Base.extend({
4141
message: 'What kind of form type do you want?',
4242
choices: ['Input' /*, 'Radio', 'Checkbox', 'Array'*/, 'Empty' ],
4343
default: 'Input'
44+
},
45+
{
46+
type : 'input',
47+
name : 'username',
48+
message : 'What\'s your Github username?',
49+
store : true
4450
}], function(answers) {
4551

4652
/* Nice, we now have the answers. let's put it in our config.
4753
*/
4854
this.addon.name = answers.name;
4955
this.addon.type = answers.type;
56+
this.addon.username = answers.username;
5057

5158
/* Changing cases
5259
*/
@@ -110,7 +117,8 @@ module.exports = generators.Base.extend({
110117
typeName: this.addon.typeName,
111118
paramName: this.addon.paramName,
112119
schema: schema,
113-
form: JSON.stringify(form)
120+
form: JSON.stringify(form),
121+
username: this.addon.username
114122
}
115123
);
116124
}.bind(this));

app/templates/base/bower.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
"name": "<%= paramName %>",
33
"version": "1.0.0",
44
"license": "MIT",
5+
"author": "<%= username %>",
6+
"main": [
7+
"dist/<%= paramName %>.min.js"
8+
],
59
"keywords": [
610
"angular-schema-form",
711
"schema-form",

app/templates/base/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "<%= paramName %>",
33
"version": "1.0.0",
4-
"description": "Angular Schema Form Add-On.",
5-
"author": "",
4+
"description": "<%= name %> add-on for Angular Schema Form.",
5+
"author": "<%= username %>",
66
"license": "MIT",
77
"devDependencies": {}
88
}

0 commit comments

Comments
 (0)