Skip to content

Commit 4628276

Browse files
committed
Tasks: Add clean-dist task
1 parent ca2872d commit 4628276

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ This module builds on top of [grunt-wordpress](https://github.com/scottgonzalez/
66

77
## Tasks
88

9+
### clean-dist
10+
11+
This task removes all files in the `dist/` directory.
12+
913
### build-pages
1014

1115
This multi-task takes a list of html or markdown files, copies them to `[wordpress.dir]/posts/page/`, processes `@partial` entries and highlights the syntax in each.

tasks/build.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = function( grunt ) {
22

3-
var wordpress = require( "grunt-wordpress" ),
3+
var rimraf = require( "rimraf" ),
4+
wordpress = require( "grunt-wordpress" ),
45
util = require( "../lib/util" ),
56
syntaxHighlight = require( "../lib/highlight" ),
67
mainExports = require( "../" );
@@ -10,6 +11,10 @@ var wordpress = require( "grunt-wordpress" ),
1011
require( "grunt-wordpress/tasks/wordpress" )( grunt );
1112
require( "grunt-check-modules/tasks/check-modules" )( grunt );
1213

14+
grunt.registerTask( "clean-dist", function() {
15+
rimraf.sync( "dist" );
16+
});
17+
1318
grunt.registerMultiTask( "build-pages", "Process html and markdown files as pages, include @partials and syntax higlight code snippets", function() {
1419
var task = this,
1520
taskDone = task.async(),

0 commit comments

Comments
 (0)