Skip to content

Commit

Permalink
Add grunt-contrib-less to compile less files
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlRaymond committed Aug 22, 2015
1 parent bad052e commit f706f8a
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 deletions.
18 changes: 15 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,32 @@ module.exports = function(grunt) {
options: {
port: 9001,
keepalive: true,
open: 'http://localhost:9001/demo.html'
open: 'http://localhost:9001/demo-events.html'
}
}
},

less: {
options: {
sourceMap: true,
},
dist: {
files: {
"demo-events.css": "demo-events.less"
}
}
},

demo: {

}
});

grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-less');

grunt.registerTask('default', ['clean', 'concat', 'uglify'])
grunt.registerTask('default', ['clean', 'concat', 'uglify', 'less'])
};
4 changes: 2 additions & 2 deletions demo-events.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 1 addition & 9 deletions demo-events.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/jquery.cardswipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
if (methods[method]) {
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
}
// If no argument, or an object passed, invoke init method.
// If no argument, or an object passed, invoke init method.
else if (typeof method === 'object' || !method) {
return methods.init.apply(this, arguments);
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"email": "[email protected]",
"url": "https://github.com/CarlRaymond"
},
"description": "jQuery pluging which allows a web application to read magnetic stripe cards using common card readers that simulate a keyboard.",
"description": "jQuery plugin which allows a web application to read magnetic stripe cards using common card readers that simulate a keyboard.",
"main": "jquery.cardswipe.js",
"scripts": {
"test": "grunt qunit"
Expand Down Expand Up @@ -35,6 +35,7 @@
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-connect": "^0.11.2",
"grunt-contrib-less": "^1.0.1",
"grunt-contrib-uglify": "^0.9.1"
}
}

0 comments on commit f706f8a

Please sign in to comment.