Skip to content
This repository was archived by the owner on Apr 24, 2019. It is now read-only.

Commit f000982

Browse files
author
Kahlil Lechelt
committed
The jQuery plugin genrator now adds in the plugin name.
1 parent 2daf8de commit f000982

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

jqueryplugin/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ var JquerypluginGenerator = module.exports = function JquerypluginGenerator() {
99
util.inherits(JquerypluginGenerator, yeoman.generators.NamedBase);
1010

1111
JquerypluginGenerator.prototype.boilerplate = function boilerplate() {
12-
this.copy('jquery.plugin.js', 'js/plugins/jquery.' + this.name + '.js');
12+
this.template('jquery.plugin.js', 'js/plugins/jquery.' + this.name + '.js');
1313
};

jqueryplugin/templates/jquery.plugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
// regularly referenced in your plugin).
2525

2626
// Create the defaults once
27-
var pluginName = 'defaultPluginName';
27+
var pluginName = '<%= name %>';
2828
var defaults = {
2929
propertyName: "value"
3030
};

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generator-init",
3-
"version": "0.0.2",
3+
"version": "0.1.0",
44
"description": "A generator for INIT.",
55
"keywords": [
66
"yeoman-generator",

0 commit comments

Comments
 (0)