0.1.0 • Published 11 years ago

grunt-snockets v0.1.0

Weekly downloads
1
License
-
Repository
github
Last release
11 years ago

grunt-snockets

Snockets for grunt.js

Getting Started

Install this grunt plugin next to your project's grunt.js gruntfile with: npm install grunt-snockets

Then add this line to your project's grunt.js gruntfile:

grunt.loadNpmTasks('grunt-snockets');

Documentation (Basic Usage)

coffee/components/ctabs.coffee

class CTabs
	constructor: (tabs) ->
		tabs.each (k, v) ->
			console.log k, v

coffee/app.coffee

#= require_tree components
$ ->
	console.log 'Hello my friend ^^'

grunt conifg

grunt.initConfig({
	snockets: {
		compile: {
			src: 'coffee/app.coffee',
			dest: 'public/js/app.js'
		}
	}
})

Finally public/js/app.js become:

(function() {
  var CTabs;

  CTabs = (function() {

    function CTabs(tabs) {
      tabs.each(function(k, v) {
        return console.log(k, v);
      });
    }

    return CTabs;

  })();

}).call(this);

(function() {

  $(function() {
    return console.log('Hello my friend ^^');
  });

}).call(this);

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using grunt.

Release History

(Nothing yet)

License

Copyright (c) 2013 Umur Gedik
Licensed under the MIT license.

0.1.5

11 years ago

0.1.4

11 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago