Zuckrig Closure
A Grunt task that reduces a verbose syntax for Google Closure Compiler to be more Pythonic/Rubistic.
What it does?
It reduces needed code for Google Closure Compiler (provide, require and annotation).
Automatically adds:
- provide for a class
- require for super class
- constructor annotation
- extends annotation
See examples:
appEmployee = { ; /** @param */ { Employee__super__constructor; thisname = name; } return Employee; }appModel;
Compiles to:
goog; goog; appEmployee = { ; /** @constructor @extends @param */ { Employee__super__constructor; thisname = name; } return Employee; }appModel;
Usage
Modify Grunfile.coffee like that:
= gruntinitConfig zuckrig: all: options: : not /_test.js$/testfile files: expand: true src: 'path/to/**/*.js' ext: '.js' esteWatch: options: dirs: 'path/to/**/' : files = expand: true src: filepath ext: '.js' ; gruntconfig 'coffee''all''files'files gruntconfig 'zuckrig''all''files'files gruntconfig 'coffee2closure''all''files'files 'coffee''zuckrig''coffee2closure' gruntloadNpmTasks 'grunt-zuckrig-closure' gruntregisterTask 'build''Build app.' -> tasks = "clean" "coffee" 'zuckrig' "coffee2closure" "esteDeps" "esteWatch" grunttaskrun tasks
Tests
grunt test
Development Stack
grunt -f
License
Copyright (c) 2013 Lukas Rychtecky
Licensed under the MIT license.