initial commit
This commit is contained in:
1
node_modules/mkdir/.npmignore
generated
vendored
Normal file
1
node_modules/mkdir/.npmignore
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
node_modules
|
||||
13
node_modules/mkdir/LICENSE
generated
vendored
Normal file
13
node_modules/mkdir/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
Copyright 2011 Joe Hewitt
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
26
node_modules/mkdir/README.md
generated
vendored
Normal file
26
node_modules/mkdir/README.md
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
mkdir
|
||||
========
|
||||
|
||||
Node.js utilities for directory creation.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
$ npm install mkdir (someday! not in registry yet)
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
Copyright 2011 Joe Hewitt
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
34
node_modules/mkdir/lib/mkdir.js
generated
vendored
Normal file
34
node_modules/mkdir/lib/mkdir.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
// This code courtesy of Rasmus Andersson via https://gist.github.com/319051
|
||||
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
// mkdirsSync(path, [mode=(0777^umask)]) -> pathsCreated
|
||||
exports.mkdirsSync = function (dirname, mode) {
|
||||
if (mode === undefined) mode = 0x1ff ^ process.umask();
|
||||
var pathsCreated = [], pathsFound = [];
|
||||
var fn = dirname;
|
||||
while (true) {
|
||||
try {
|
||||
var stats = fs.statSync(fn);
|
||||
if (stats.isDirectory())
|
||||
break;
|
||||
throw new Error('Unable to create directory at '+fn);
|
||||
}
|
||||
catch (e) {
|
||||
if (e.code === 'ENOENT') {
|
||||
pathsFound.push(fn);
|
||||
fn = path.dirname(fn);
|
||||
}
|
||||
else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var i=pathsFound.length-1; i>-1; i--) {
|
||||
var fn = pathsFound[i];
|
||||
fs.mkdirSync(fn, mode);
|
||||
pathsCreated.push(fn);
|
||||
}
|
||||
return pathsCreated;
|
||||
};
|
||||
22
node_modules/mkdir/package.json
generated
vendored
Normal file
22
node_modules/mkdir/package.json
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "mkdir",
|
||||
"description": "Directory creation utilities",
|
||||
"version": "0.0.2",
|
||||
"homepage": "http://github.com/joehewitt/mkdir",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/joehewitt/mkdir.git"
|
||||
},
|
||||
"keywords": [
|
||||
"fs"
|
||||
],
|
||||
"author": "Joe Hewitt <joe@joehewitt.com>",
|
||||
"contributors": [],
|
||||
"dependencies": {},
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
},
|
||||
"main": "./lib/mkdir",
|
||||
"directories": {},
|
||||
"devDependencies": {}
|
||||
}
|
||||
Reference in New Issue
Block a user