Skip to content

Commit 0f16028

Browse files
committed
gruntfile corrected
1 parent 24022e4 commit 0f16028

8 files changed

Lines changed: 109 additions & 128 deletions

.jshintrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
// Details: https://github.com/victorporof/Sublime-JSHint#using-your-own-jshintrc-options
3+
// Example: https://github.com/jshint/jshint/blob/master/examples/.jshintrc
4+
// Documentation: http://www.jshint.com/docs/
5+
"browser": true,
6+
"jquery": true,
7+
"node": true,
8+
"esnext": false,
9+
"globals": {},
10+
"laxcomma": true,
11+
"globalstrict": false,
12+
"quotmark": "double",
13+
"curly": true,
14+
"indent": 2,
15+
"undef": true,
16+
"unused": true
17+
}

Gruntfile.js

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ module.exports = function(grunt) {
2323
banner: "<%= meta.banner %>"
2424
},
2525
dist: {
26-
src: ["src/jquery.boilerplate.js"],
27-
dest: "dist/jquery.boilerplate.js"
26+
src: ["src/jquery.emoticons.js"],
27+
dest: "dist/jquery.emoticons.js"
2828
}
2929
},
3030

3131
// Lint definitions
3232
jshint: {
33-
files: ["src/jquery.boilerplate.js"],
33+
files: ["src/jquery.emoticons.js"],
3434
options: {
3535
jshintrc: ".jshintrc"
3636
}
@@ -39,24 +39,15 @@ module.exports = function(grunt) {
3939
// Minify definitions
4040
uglify: {
4141
my_target: {
42-
src: ["dist/jquery.boilerplate.js"],
43-
dest: "dist/jquery.boilerplate.min.js"
42+
src: ["dist/jquery.emoticons.js"],
43+
dest: "dist/jquery.emoticons.min.js"
4444
},
4545
options: {
4646
banner: "<%= meta.banner %>"
4747
}
4848
},
4949

50-
// CoffeeScript compilation
51-
coffee: {
52-
compile: {
53-
files: {
54-
"dist/jquery.boilerplate.js": "src/jquery.boilerplate.coffee"
55-
}
56-
}
57-
},
58-
59-
// watch for changes to source
50+
// watch for changes to source
6051
// Better than calling grunt a million times
6152
// (call 'grunt watch')
6253
watch: {
@@ -69,11 +60,9 @@ module.exports = function(grunt) {
6960
grunt.loadNpmTasks("grunt-contrib-concat");
7061
grunt.loadNpmTasks("grunt-contrib-jshint");
7162
grunt.loadNpmTasks("grunt-contrib-uglify");
72-
grunt.loadNpmTasks("grunt-contrib-coffee");
7363
grunt.loadNpmTasks("grunt-contrib-watch");
7464

7565
grunt.registerTask("build", ["concat", "uglify"]);
7666
grunt.registerTask("default", ["jshint", "build"]);
77-
grunt.registerTask("travis", ["default"]);
7867

7968
};

dist/jquery.boilerplate.js

Lines changed: 4 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,8 @@
11
/*
2-
* jquery-boilerplate - v3.4.0
3-
* A jump-start for jQuery plugins development.
4-
* http://jqueryboilerplate.com
2+
* emoticons-js - v0.1.0
3+
* A jquery plugin to convert text into emoticons.
4+
*
55
*
6-
* Made by Zeno Rocha
6+
* Made by
77
* Under MIT License
88
*/
9-
// the semi-colon before function invocation is a safety net against concatenated
10-
// scripts and/or other plugins which may not be closed properly.
11-
;(function ( $, window, document, undefined ) {
12-
13-
"use strict";
14-
15-
// undefined is used here as the undefined global variable in ECMAScript 3 is
16-
// mutable (ie. it can be changed by someone else). undefined isn't really being
17-
// passed in so we can ensure the value of it is truly undefined. In ES5, undefined
18-
// can no longer be modified.
19-
20-
// window and document are passed through as local variable rather than global
21-
// as this (slightly) quickens the resolution process and can be more efficiently
22-
// minified (especially when both are regularly referenced in your plugin).
23-
24-
// Create the defaults once
25-
var pluginName = "defaultPluginName",
26-
defaults = {
27-
propertyName: "value"
28-
};
29-
30-
// The actual plugin constructor
31-
function Plugin ( element, options ) {
32-
this.element = element;
33-
// jQuery has an extend method which merges the contents of two or
34-
// more objects, storing the result in the first object. The first object
35-
// is generally empty as we don't want to alter the default options for
36-
// future instances of the plugin
37-
this.settings = $.extend( {}, defaults, options );
38-
this._defaults = defaults;
39-
this._name = pluginName;
40-
this.init();
41-
}
42-
43-
// Avoid Plugin.prototype conflicts
44-
$.extend(Plugin.prototype, {
45-
init: function () {
46-
// Place initialization logic here
47-
// You already have access to the DOM element and
48-
// the options via the instance, e.g. this.element
49-
// and this.settings
50-
// you can add more functions like the one below and
51-
// call them like so: this.yourOtherFunction(this.element, this.settings).
52-
console.log("xD");
53-
},
54-
yourOtherFunction: function () {
55-
// some logic
56-
}
57-
});
58-
59-
// A really lightweight plugin wrapper around the constructor,
60-
// preventing against multiple instantiations
61-
$.fn[ pluginName ] = function ( options ) {
62-
return this.each(function() {
63-
if ( !$.data( this, "plugin_" + pluginName ) ) {
64-
$.data( this, "plugin_" + pluginName, new Plugin( this, options ) );
65-
}
66-
});
67-
};
68-
69-
})( jQuery, window, document );

dist/jquery.boilerplate.min.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
/*
2-
* jquery-boilerplate - v3.4.0
3-
* A jump-start for jQuery plugins development.
4-
* http://jqueryboilerplate.com
2+
* emoticons-js - v0.1.0
3+
* A jquery plugin to convert text into emoticons.
4+
*
55
*
6-
* Made by Zeno Rocha
6+
* Made by
77
* Under MIT License
88
*/
9-
!function(a){"use strict";function b(b,e){this.element=b,this.settings=a.extend({},d,e),this._defaults=d,this._name=c,this.init()}var c="defaultPluginName",d={propertyName:"value"};a.extend(b.prototype,{init:function(){console.log("xD")},yourOtherFunction:function(){}}),a.fn[c]=function(d){return this.each(function(){a.data(this,"plugin_"+c)||a.data(this,"plugin_"+c,new b(this,d))})}}(jQuery,window,document);

dist/jquery.emoticons.js

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
* emoticons-js - v0.1.0
3+
* A jquery plugin to convert text into emoticons.
4+
*
5+
*
6+
* Made by
7+
* Under MIT License
8+
*/
9+
// the semi-colon before function invocation is a safety net against concatenated
10+
// scripts and/or other plugins which may not be closed properly.
11+
;(function ( $, window, document, undefined ) {
12+
13+
"use strict";
14+
15+
// undefined is used here as the undefined global variable in ECMAScript 3 is
16+
// mutable (ie. it can be changed by someone else). undefined isn't really being
17+
// passed in so we can ensure the value of it is truly undefined. In ES5, undefined
18+
// can no longer be modified.
19+
20+
// window and document are passed through as local variable rather than global
21+
// as this (slightly) quickens the resolution process and can be more efficiently
22+
// minified (especially when both are regularly referenced in your plugin).
23+
24+
// Create the defaults once
25+
var pluginName = "defaultPluginName",
26+
defaults = {
27+
propertyName: "value"
28+
};
29+
30+
// The actual plugin constructor
31+
function Plugin ( element, options ) {
32+
this.element = element;
33+
// jQuery has an extend method which merges the contents of two or
34+
// more objects, storing the result in the first object. The first object
35+
// is generally empty as we don't want to alter the default options for
36+
// future instances of the plugin
37+
this.settings = $.extend( {}, defaults, options );
38+
this._defaults = defaults;
39+
this._name = pluginName;
40+
this.init();
41+
}
42+
43+
// Avoid Plugin.prototype conflicts
44+
$.extend(Plugin.prototype, {
45+
init: function () {
46+
// Place initialization logic here
47+
// You already have access to the DOM element and
48+
// the options via the instance, e.g. this.element
49+
// and this.settings
50+
// you can add more functions like the one below and
51+
// call them like so: this.yourOtherFunction(this.element, this.settings).
52+
console.log("xD");
53+
},
54+
yourOtherFunction: function () {
55+
// some logic
56+
}
57+
});
58+
59+
// A really lightweight plugin wrapper around the constructor,
60+
// preventing against multiple instantiations
61+
$.fn[ pluginName ] = function ( options ) {
62+
return this.each(function() {
63+
if ( !$.data( this, "plugin_" + pluginName ) ) {
64+
$.data( this, "plugin_" + pluginName, new Plugin( this, options ) );
65+
}
66+
});
67+
};
68+
69+
})( jQuery, window, document );

dist/jquery.emoticons.min.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* emoticons-js - v0.1.0
3+
* A jquery plugin to convert text into emoticons.
4+
*
5+
*
6+
* Made by
7+
* Under MIT License
8+
*/
9+
!function(a){"use strict";function b(b,e){this.element=b,this.settings=a.extend({},d,e),this._defaults=d,this._name=c,this.init()}var c="defaultPluginName",d={propertyName:"value"};a.extend(b.prototype,{init:function(){console.log("xD")},yourOtherFunction:function(){}}),a.fn[c]=function(d){return this.each(function(){a.data(this,"plugin_"+c)||a.data(this,"plugin_"+c,new b(this,d))})}}(jQuery,window,document);

src/jquery.boilerplate.coffee

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)