Skip to content

Commit

Permalink
Fix async handling of multiple files
Browse files Browse the repository at this point in the history
  • Loading branch information
codepunkt committed Jun 6, 2014
1 parent e268d6f commit c2465e2
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 182 deletions.
161 changes: 0 additions & 161 deletions npm-debug.log

This file was deleted.

25 changes: 19 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
{
"name": "grunt-templater",
"description": "Universal template compiler task for Grunt.",
"version": "0.0.4-1",
"version": "0.0.6",
"homepage": "https://github.com/rockwood/grunt-templater",
"author": "Kevin Rockwood <kevin@rockwood.me>",
"author": {
"name": "Kevin Rockwood",
"email": "kevin@rockwood.me"
},
"repositories": [
{
"type": "git",
Expand Down Expand Up @@ -32,11 +35,13 @@
},
"dependencies": {
"grunt": ">=0.3.7",
"consolidate": ">=0.4.0"
"consolidate": ">=0.4.0",
"es6-promise": "~1.0.0"
},
"devDependencies": {
"grunt": "~0.3.7",
"consolidate": ">=0.4.0"
"consolidate": ">=0.4.0",
"es6-promise": "~1.0.0"
},
"keywords": [
"template",
Expand All @@ -46,5 +51,13 @@
"mustache",
"grunt",
"gruntplugin"
]
}
],
"readme": "# grunt-templater\n\nUniversal template compiler task for Grunt. It uses [Consolidate](https://github.com/visionmedia/consolidate.js) under the hood.\n\n## Supported template engines\n\n - [dust](https://github.com/akdubya/dustjs) [(website)](http://akdubya.github.com/dustjs/)\n - [eco](https://github.com/sstephenson/eco)\n - [ejs](https://github.com/visionmedia/ejs)\n - [haml](https://github.com/visionmedia/haml.js) [(website)](http://haml-lang.com/)\n - [haml-coffee](https://github.com/9elements/haml-coffee) [(website)](http://haml-lang.com/)\n - [handlebars](https://github.com/wycats/handlebars.js/) [(website)](http://handlebarsjs.com/)\n - [hogan](https://github.com/twitter/hogan.js) [(website)](http://twitter.github.com/hogan.js/)\n - [jade](https://github.com/visionmedia/jade) [(website)](http://jade-lang.com/)\n - [jazz](https://github.com/shinetech/jazz)\n - [jqtpl](https://github.com/kof/node-jqtpl) [(website)](http://api.jquery.com/category/plugins/templates/)\n - [liquor](https://github.com/chjj/liquor)\n - [mustache](https://github.com/janl/mustache.js)\n - [QEJS](https://github.com/jepso/QEJS)\n - [swig](https://github.com/paularmstrong/swig) [(website)](http://paularmstrong.github.com/swig/)\n - [underscore](https://github.com/documentcloud/underscore) [(website)](http://documentcloud.github.com/underscore/)\n - [walrus](https://github.com/jeremyruppel/walrus) [(website)](http://documentup.com/jeremyruppel/walrus/)\n - [whiskers](https://github.com/gsf/whiskers.js/tree/)\n\n## Getting Started\n\ninstall via npm\n\n npm install grunt-templater\n\ninstall the template engine you intend to use. For example, if using Jade:\n\n npm install jade\n\nand in your grunt.js file:\n\n grunt.loadNpmTasks('grunt-templater');\n\n## Usage\n\nCreate a `template` task in your grunt config. Templater will guess the intended template engine based on the `src` filename. Pass the `engine` option to force a specific engine.\n\nWhen using the [Grunt file format](http://gruntjs.com/configuring-tasks#files), `variables` is required:\n\n grunt.initConfig({\n template: {\n all: {\n files: [{\n expand: true,\n cwd: 'source',\n src: [ '**/*.hbs' ],\n dest: 'build',\n ext: '.html'\n }],\n variables: {\n env: environment\n }\n }\n }\n });\n\nTo remain backwards compatible, `src`, `dest` can be used to define files aswell:\n\n grunt.initConfig({\n template: {\n dev: {\n src: 'app/homepage.jade',\n dest: 'dev.html',\n variables: {\n css_url: 'app.css'\n title: 'Hello World'\n pretty: true\n }\n },\n dist: {\n src: 'app/homepage.jade',\n dest: 'dist/index.html',\n variables: {\n css_url: 'app.min.css'\n title: 'Hello Production'\n }\n },\n dynamicVariables: {\n src: 'app/homepage.jade',\n dest: 'dist/index.html',\n variables: function () {\n return {\n css: grunt.file.read('app.min.css'),\n now: new Date()\n }\n }\n }\n },\n ...\n });\n\nrun with:\n\n grunt template\n\nor for a specific target:\n\n grunt template:dev\n\nEngine specific options can also be passed through the `variables` option. In the case of Jade, `pretty: true` adds pretty-indentation whitespace to its output.",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git@github.com:rockwood/grunt-templater.git"
},
"_id": "grunt-templater@0.0.5",
"_from": "grunt-templater@"
}
Loading

0 comments on commit c2465e2

Please sign in to comment.