Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Basic stub out of functioning tasks, still decidedly v0.0.0

  • Loading branch information...
commit d9dc8faae47d0e6bbc0af3565ad708d8d84effaa 1 parent 3648570
@ajpiano ajpiano authored
Showing with 135 additions and 0 deletions.
  1. +22 −0 LICENSE-MIT
  2. +40 −0 grunt.js
  3. +34 −0 package.json
  4. +39 −0 tasks/wintersmith.js
View
22 LICENSE-MIT
@@ -0,0 +1,22 @@
+Copyright (c) 2012 adam j. sontag
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
View
40 grunt.js
@@ -0,0 +1,40 @@
+module.exports = function(grunt) {
+
+ // Project configuration.
+ grunt.initConfig({
+ test: {
+ files: ['test/**/*.js']
+ },
+ lint: {
+ files: ['grunt.js', 'tasks/**/*.js', 'test/**/*.js']
+ },
+ watch: {
+ files: '<config:lint.files>',
+ tasks: 'default'
+ },
+ jshint: {
+ options: {
+ curly: true,
+ eqeqeq: true,
+ immed: true,
+ latedef: true,
+ newcap: true,
+ noarg: true,
+ sub: true,
+ undef: true,
+ boss: true,
+ eqnull: true,
+ node: true,
+ es5: true
+ },
+ globals: {}
+ }
+ });
+
+ // Load local tasks.
+ grunt.loadTasks('tasks');
+
+ // Default task.
+ grunt.registerTask('default', 'lint');
+
+};
View
34 package.json
@@ -0,0 +1,34 @@
+{
+ "author": "adam j. sontag <ajpiano@ajpiano.com> (http://ajpiano.com)",
+ "name": "grunt-wintersmith",
+ "description": "A grunt task and helpers for invoking the Wintersmith static site generator",
+ "version": "0.0.0",
+ "homepage": "https://github.com/ajpiano/grunt-wintersmith",
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/ajpiano/grunt-wintersmith.git"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/ajpiano/grunt-wintersmith/blob/master/LICENSE-MIT"
+ }
+ ],
+ "main": "grunt.js",
+ "dependencies": {
+ "grunt": "0.3.x",
+ "wintersmith": "1.0.x",
+ "js-yaml": "1.0.x"
+ },
+ "devDependencies": {
+ "grunt": "~0.3.x",
+ "wintersmith": "1.0.x",
+ "js-yaml": "1.0.x"
+ },
+ "keywords": [
+ "gruntplugin"
+ ],
+ "engines": {
+ "node": "*"
+ }
+}
View
39 tasks/wintersmith.js
@@ -0,0 +1,39 @@
+module.exports = function(grunt) {
+
+ var wintersmith = require("wintersmith");
+
+ grunt.registerTask("wintersmith", "Use the wintersmith static site generator", function() {
+ var config = grunt.config("wintersmith"),
+ done = this.async();
+
+ grunt.helper("wintersmith", config, function(error) {
+ if ( error ) {
+ grunt.warn("Wintersmithing failed.");
+ } else {
+ done();
+ }
+ });
+ });
+
+ grunt.registerTask("wintersmith-ordered", "Use the wintersmith static site generator, respecting an order.yaml file", function(){
+ var config = grunt.config("wintersmith-ordered"),
+ done = this.async();
+
+ grunt.helper("wintersmith-tree", config, function(error, tree) {
+ if ( error ) {
+ grunt.warn("Wintersmithing failed.");
+ } else {
+ done();
+ }
+ });
+ });
+
+ grunt.registerHelper("wintersmith", function(options, callback) {
+ wintersmith( options, callback );
+ });
+
+ grunt.registerHelper("wintersmith-tree", function(options, callback) {
+ wintersmith.loadContents( options.contents, callback );
+ });
+
+};
Please sign in to comment.
Something went wrong with that request. Please try again.