Skip to content

Commit 4a89395

Browse files
committed
remove wrench add FIXED! ncp
1 parent ebd169f commit 4a89395

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

lib/generator.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ var fs = require('fs')
55
, Step = require('step')
66
, slugify = require('slug')
77
, _ = require('lodash')
8-
//, ncp = require('ncp').ncp
9-
, wrench = require('wrench')
8+
, ncp = require('ncp').ncp
109
, rmrf = require('rimraf')
1110
, yaml = require('js-yaml')
1211
, marked = require('marked')
@@ -21,6 +20,8 @@ var fs = require('fs')
2120
, config = {}
2221
;
2322

23+
ncp.limit = 3;
24+
2425
/**
2526
* docdoc generator
2627
* --
@@ -83,9 +84,10 @@ function prepareLayout(err, docroot , cb) {
8384
if (err) { return console.error(err); }
8485

8586
console.log('preparing layout:');
86-
wrench.copyDirSyncRecursive(docdocroot + 'theme/_assets', siteroot + '_assets');
87-
console.log('preparing layout: .. done!');
88-
cb();
87+
ncp(docdocroot + 'theme/_assets', siteroot + '_assets', function() {
88+
console.log('preparing layout: .. done!');
89+
cb();
90+
});
8991
}
9092

9193
function generate(_docdoc, _config) {

lib/theme.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var fs = require('fs')
22
, path = require('path')
33
, util = require('util')
44
// -- npm modules
5-
, wrench = require('wrench')
5+
, ncp = require('ncp')
66
// -- project requires
77
, libutil = require('./utils')
88

@@ -11,6 +11,8 @@ var fs = require('fs')
1111
, theme = null
1212
;
1313

14+
ncp.limit = 3;
15+
1416
function init(_docdoc) {
1517
docdoc = _docdoc;
1618
}
@@ -43,12 +45,12 @@ module.exports.prepare = function(cb) {
4345
// to let people manipulate them easily
4446
// not sure, when this should happen
4547
console.log('copying theme');
46-
wrench.copyDirSyncRecursive(theme.options.theme, docdoc.docdocroot + 'theme', {
47-
forceDelete: false,
48-
preserveFiles: true
48+
ncp(theme.options.theme, docdoc.docdocroot + 'theme', {
49+
clobber: false
50+
}, function(err){
51+
console.log('copying theme .. done');
52+
cb();
4953
});
50-
console.log('copying theme .. done');
51-
cb();
5254
}
5355

5456
module.exports.render = function(filename, vars, cb) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"js-yaml": "~2.1.0",
2626
"handlebars": "~1.0.12",
2727
"rimraf": "~2.2.2",
28-
"ncp": "~0.4.2",
28+
"ncp": "git+ssh://git@github.com:rockitbaby/ncp.git",
2929
"step": "0.0.5",
3030
"slug": "~0.3.3",
3131
"marked": "~0.2.9",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy