gilded-wordpress
Advanced tools
Comparing version 1.0.6 to 1.0.7
26
index.js
@@ -0,1 +1,2 @@ | ||
var fs = require( "fs" ); | ||
var path = require( "path" ); | ||
@@ -6,3 +7,2 @@ var util = require( "util" ); | ||
var async = require( "async" ); | ||
var glob = require( "glob" ); | ||
var version = require( "./package" ).version; | ||
@@ -81,3 +81,12 @@ | ||
glob( rootdir + "/*", { mark: true }, function( error, entries ) { | ||
try { | ||
fs.statSync( rootdir ); | ||
} catch ( e ) { | ||
// Directories are considered optional, especially if inherited | ||
// from default setttings. Treat non-existant dir as empty dir. | ||
complete(); | ||
return; | ||
} | ||
fs.readdir( rootdir, { withFileTypes: true }, function( error, entries ) { | ||
if ( error ) { | ||
@@ -88,9 +97,10 @@ return complete( error ); | ||
var directories = []; | ||
var files = entries.filter(function( entry ) { | ||
if ( /\/$/.test( entry ) ) { | ||
directories.push( entry ); | ||
return false; | ||
var files = []; | ||
entries.forEach(function( entry ) { | ||
var fullPath = path.join( rootdir, entry.name ); | ||
if ( entry.isDirectory() ) { | ||
directories.push( fullPath ); | ||
} else { | ||
files.push( fullPath ); | ||
} | ||
return true; | ||
}); | ||
@@ -97,0 +107,0 @@ |
{ | ||
"name": "gilded-wordpress", | ||
"description": "Easily synchronize content between the file system and WordPress", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"homepage": "https://github.com/scottgonzalez/gilded-wordpress", | ||
@@ -24,3 +24,2 @@ "author": { | ||
"async": "^0.9.0", | ||
"glob": "^4.0.6", | ||
"wordpress": "^1.4.2" | ||
@@ -27,0 +26,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43936
2
892
8
- Removedglob@^4.0.6
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedglob@4.5.3(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedminimatch@2.0.10(transitive)
- Removedonce@1.4.0(transitive)
- Removedwrappy@1.0.2(transitive)