Skip to content

Commit

Permalink
Hot Fix for release 1.2 with updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Angus Perkerson committed Feb 27, 2014
1 parent 1f05797 commit f58e30c
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 12 deletions.
16 changes: 8 additions & 8 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

'use strict';

module.exports = function (grunt) {
module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({
Expand Down Expand Up @@ -44,12 +44,12 @@ module.exports = function (grunt) {
cacheDir: '',
},
files: [{
expand: true,
cwd: 'html',
src: ['**/*.html'],
dest: '.tmp/html',
ext: '.html',
}],
expand: true,
cwd: 'html',
src: ['**/*.html'],
dest: '.tmp/html',
ext: '.html',
}],
},
test_default: {
options: {},
Expand Down Expand Up @@ -85,4 +85,4 @@ module.exports = function (grunt) {
// By default, lint and run all tests.
grunt.registerTask('default', ['jshint', 'test']);

};
};
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ grunt.initConfig({

### Options

#### options.baseDir
Type: `String`
Default value: `'html'`

The Directory location where to locate Server Side Includes from.

#### options.cacheDir
Type: `String`
Default value: `'.tmp/.ssiCache'`
Expand Down Expand Up @@ -77,7 +83,7 @@ grunt.initConfig({
options: {},
files: [{
expand: true,
cwd: 'html',
cwd: 'html'
src: ['**/*.html'],
dest: '.tmp/html',
}],
Expand All @@ -93,7 +99,8 @@ grunt.initConfig({
ssi: {
options: {
cache: 'all',
ext: '.shtml'
ext: '.shtml',
baseDir: 'path/to/views',
},
files: [{
expand: true,
Expand Down
1 change: 1 addition & 0 deletions html/includes/deep/deeper/level3.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Level 3
2 changes: 2 additions & 0 deletions html/includes/deep/level2.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Level 2
<!--#include file="deeper/level3.inc" -->
2 changes: 2 additions & 0 deletions html/includes/deep/virtual0.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Virtual 0
<!--#include virtual="levels.html" -->
2 changes: 2 additions & 0 deletions html/includes/level1.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Level 1
<!--#include file="deep/level2.inc" -->
2 changes: 2 additions & 0 deletions html/level0.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Level 0
<!--#include file="includes/level1.inc" -->
2 changes: 2 additions & 0 deletions html/levels.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Start File
<!--#include file="level0.inc" -->
2 changes: 2 additions & 0 deletions html/virtual.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Virtual Start
<!--#include virtual="includes/deep/virtual0.inc" -->
5 changes: 3 additions & 2 deletions tasks/ssi.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ module.exports = function(grunt) {
cache: false,
ext: '.html',
encoding: 'utf8',
baseDir: 'html',
};

var options = this.options(defaults);

var ssi = new SSI(options);

if(!grunt.file.exists(options.cacheDir)) {
if (!grunt.file.exists(options.cacheDir)) {
grunt.file.mkdir(options.cacheDir);
}

Expand Down Expand Up @@ -59,7 +60,7 @@ module.exports = function(grunt) {
grunt.log.writeln('File "' + dest + '" created.');

});

});

});
Expand Down

0 comments on commit f58e30c

Please sign in to comment.