Skip to content

Commit f056d3e

Browse files
committed
Upgrade to grunt-jquery-content 0.2.0, replace remaining build tasks; fix code sample in Types page
1 parent 231343a commit f056d3e

File tree

3 files changed

+10
-43
lines changed

3 files changed

+10
-43
lines changed

grunt.js

+3-36
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ grunt.initConfig({
2828
xmltidy: {
2929
all: [].concat( entryFiles, noteFiles, "categories.xml" )
3030
},
31+
"build-pages": {
32+
all: grunt.file.expandFiles( "pages/*" )
33+
},
3134
"build-xml-entries": {
3235
all: entryFiles
3336
},
@@ -39,42 +42,6 @@ grunt.initConfig({
3942
}, grunt.file.readJSON( "config.json" ) )
4043
});
4144

42-
grunt.registerTask( "build-pages", function() {
43-
var task = this,
44-
taskDone = task.async(),
45-
targetDir = grunt.config( "wordpress.dir" ) + "/posts/page/";
46-
47-
grunt.file.mkdir( targetDir );
48-
49-
grunt.utils.async.forEachSeries( pageFiles, function( fileName, fileDone ) {
50-
var targetFileName = targetDir + path.basename( fileName );
51-
grunt.verbose.write( "Reading " + fileName + "..." );
52-
grunt.verbose.ok();
53-
grunt.verbose.write( "Pygmentizing " + targetFileName + "..." );
54-
pygmentize.file( fileName, function( error, data ) {
55-
if ( error ) {
56-
grunt.verbose.error();
57-
grunt.log.error( error );
58-
fileDone();
59-
return;
60-
}
61-
grunt.verbose.ok();
62-
63-
grunt.file.write( targetFileName, data );
64-
65-
fileDone();
66-
});
67-
}, function() {
68-
if ( task.errorCount ) {
69-
grunt.warn( "Task \"" + task.name + "\" failed." );
70-
taskDone();
71-
return;
72-
}
73-
grunt.log.writeln( "Built " + pageFiles.length + " pages." );
74-
taskDone();
75-
});
76-
});
77-
7845
grunt.registerTask( "default", "build-wordpress" );
7946
grunt.registerTask( "build-wordpress", "clean lint xmllint build-pages build-xml-entries build-xml-categories build-resources" );
8047
grunt.registerTask( "tidy", "xmllint xmltidy" );

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
"grunt": "0.3.x",
2525
"grunt-clean": "0.1.0",
2626
"grunt-wordpress": "1.0.0",
27-
"grunt-jquery-content": "0.1.0",
28-
"pygmentize": "0.5.2"
27+
"grunt-jquery-content": "0.2.0"
2928
},
3029
"devDependencies": {},
3130
"keywords": []

pages/Types.html

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
</p><p>You should be able to try out most of the examples below by just copying them to the <a href="http://www.getfirebug.com/" class="external text" title="http://www.getfirebug.com/">Firebug</a> console (note: Firebug requires <a href="http://www.getfirefox.com" class="external text" title="http://www.getfirefox.com">Firefox</a>).
1414
</p><p>Whenever an example mentions that a type defaults to a boolean value, the result is good to know when using that type in a boolean context:
1515
</p>
16-
<pre><code data-lang="javascript">var x = ""
17-
if ( x )
18-
console.log( "x defaulted to true" )
19-
else
20-
console.log( "x defaulted to false" )
16+
<pre><code>var x = "";
17+
if ( x ) {
18+
console.log( "x defaulted to true" );
19+
} else {
20+
console.log( "x defaulted to false" );
21+
}
2122
</code></pre>
2223
<p>In this case, <code>"x defaulted to false"</code> is printed.
2324
</p><p>To keep the examples short, the invert-operator is used to show a boolean context:

0 commit comments

Comments
 (0)