135 lines
12 KiB
JSON
135 lines
12 KiB
JSON
{
|
|
"_args": [
|
|
[
|
|
{
|
|
"raw": "fs-extra@^3.0.1",
|
|
"scope": null,
|
|
"escapedName": "fs-extra",
|
|
"name": "fs-extra",
|
|
"rawSpec": "^3.0.1",
|
|
"spec": ">=3.0.1 <4.0.0",
|
|
"type": "range"
|
|
},
|
|
"/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/react-native-scripts"
|
|
]
|
|
],
|
|
"_from": "fs-extra@>=3.0.1 <4.0.0",
|
|
"_id": "fs-extra@3.0.1",
|
|
"_inCache": true,
|
|
"_location": "/fs-extra",
|
|
"_nodeVersion": "7.8.0",
|
|
"_npmOperationalInternal": {
|
|
"host": "packages-12-west.internal.npmjs.com",
|
|
"tmp": "tmp/fs-extra-3.0.1.tgz_1493941722616_0.8922979582566768"
|
|
},
|
|
"_npmUser": {
|
|
"name": "ryanzim",
|
|
"email": "opensrc@ryanzim.com"
|
|
},
|
|
"_npmVersion": "4.2.0",
|
|
"_phantomChildren": {},
|
|
"_requested": {
|
|
"raw": "fs-extra@^3.0.1",
|
|
"scope": null,
|
|
"escapedName": "fs-extra",
|
|
"name": "fs-extra",
|
|
"rawSpec": "^3.0.1",
|
|
"spec": ">=3.0.1 <4.0.0",
|
|
"type": "range"
|
|
},
|
|
"_requiredBy": [
|
|
"/react-native-scripts"
|
|
],
|
|
"_resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz",
|
|
"_shasum": "3794f378c58b342ea7dbbb23095109c4b3b62291",
|
|
"_shrinkwrap": null,
|
|
"_spec": "fs-extra@^3.0.1",
|
|
"_where": "/Volumes/2009-SSD/GT2/GT2-iOS/node_modules/react-native-scripts",
|
|
"author": {
|
|
"name": "JP Richardson",
|
|
"email": "jprichardson@gmail.com"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/jprichardson/node-fs-extra/issues"
|
|
},
|
|
"dependencies": {
|
|
"graceful-fs": "^4.1.2",
|
|
"jsonfile": "^3.0.0",
|
|
"universalify": "^0.1.0"
|
|
},
|
|
"description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as mkdir -p, cp -r, and rm -rf.",
|
|
"devDependencies": {
|
|
"coveralls": "^2.11.2",
|
|
"istanbul": "^0.4.5",
|
|
"klaw": "^1.0.0",
|
|
"klaw-sync": "^1.1.2",
|
|
"minimist": "^1.1.1",
|
|
"mocha": "^3.1.2",
|
|
"proxyquire": "^1.7.10",
|
|
"read-dir-files": "^0.1.1",
|
|
"rimraf": "^2.2.8",
|
|
"secure-random": "^1.1.1",
|
|
"standard": "^10.0.2",
|
|
"standard-markdown": "^2.3.0"
|
|
},
|
|
"directories": {},
|
|
"dist": {
|
|
"shasum": "3794f378c58b342ea7dbbb23095109c4b3b62291",
|
|
"tarball": "https://registry.npmjs.org/fs-extra/-/fs-extra-3.0.1.tgz"
|
|
},
|
|
"gitHead": "44eb2c310a01108ee180a6f8d68b67289e9450e3",
|
|
"homepage": "https://github.com/jprichardson/node-fs-extra",
|
|
"keywords": [
|
|
"fs",
|
|
"file",
|
|
"file system",
|
|
"copy",
|
|
"directory",
|
|
"extra",
|
|
"mkdirp",
|
|
"mkdir",
|
|
"mkdirs",
|
|
"recursive",
|
|
"json",
|
|
"read",
|
|
"write",
|
|
"extra",
|
|
"delete",
|
|
"remove",
|
|
"touch",
|
|
"create",
|
|
"text",
|
|
"output",
|
|
"move"
|
|
],
|
|
"license": "MIT",
|
|
"main": "./lib/index",
|
|
"maintainers": [
|
|
{
|
|
"name": "jprichardson",
|
|
"email": "jprichardson@gmail.com"
|
|
},
|
|
{
|
|
"name": "ryanzim",
|
|
"email": "opensrc@ryanzim.com"
|
|
}
|
|
],
|
|
"name": "fs-extra",
|
|
"optionalDependencies": {},
|
|
"readme": "Node.js: fs-extra\n=================\n\n`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It should be a drop in replacement for `fs`.\n\n[![npm Package](https://img.shields.io/npm/v/fs-extra.svg?style=flat-square)](https://www.npmjs.org/package/fs-extra)\n[![build status](https://api.travis-ci.org/jprichardson/node-fs-extra.svg)](http://travis-ci.org/jprichardson/node-fs-extra)\n[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-fs-extra/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-fs-extra/branch/master)\n[![downloads per month](http://img.shields.io/npm/dm/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)\n[![Coverage Status](https://img.shields.io/coveralls/jprichardson/node-fs-extra.svg)](https://coveralls.io/r/jprichardson/node-fs-extra)\n\n<a href=\"https://github.com/feross/standard\"><img src=\"https://cdn.rawgit.com/feross/standard/master/sticker.svg\" alt=\"Standard JavaScript\" width=\"100\"></a>\n\n\nWhy?\n----\n\nI got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects.\n\n\n\n\nInstallation\n------------\n\n npm install --save fs-extra\n\n\n\nUsage\n-----\n\n`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.\n\nYou don't ever need to include the original `fs` module again:\n\n```js\nconst fs = require('fs') // this is no longer necessary\n```\n\nyou can now do this:\n\n```js\nconst fs = require('fs-extra')\n```\n\nor if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want\nto name your `fs` variable `fse` like so:\n\n```js\nconst fse = require('fs-extra')\n```\n\nyou can also keep both, but it's redundant:\n\n```js\nconst fs = require('fs')\nconst fse = require('fs-extra')\n```\n\nSync vs Async\n-------------\nMost methods are async by default. All async methods will return a promise if the callback isn't passed.\n\nSync methods on the other hand will throw if an error occurs.\n\nExample:\n\n```js\nconst fs = require('fs-extra')\n\n// Async with promises:\nfs.copy('/tmp/myfile', '/tmp/mynewfile')\n .then(() => console.log('success!'))\n .catch(err => console.error(err))\n\n// Async with callbacks:\nfs.copy('/tmp/myfile', '/tmp/mynewfile', err => {\n if (err) return console.error(err)\n console.log('success!')\n})\n\n// Sync:\ntry {\n fs.copySync('/tmp/myfile', '/tmp/mynewfile')\n console.log('success!')\n} catch (err) {\n console.error(err)\n}\n```\n\n\nMethods\n-------\n\n### Async\n\n- [copy](docs/copy.md)\n- [emptyDir](docs/emptyDir.md)\n- [ensureFile](docs/ensureFile.md)\n- [ensureDir](docs/ensureDir.md)\n- [ensureLink](docs/ensureLink.md)\n- [ensureSymlink](docs/ensureSymlink.md)\n- [mkdirs](docs/ensureDir.md)\n- [move](docs/move.md)\n- [outputFile](docs/outputFile.md)\n- [outputJson](docs/outputJson.md)\n- [pathExists](docs/pathExists.md)\n- [readJson](docs/readJson.md)\n- [remove](docs/remove.md)\n- [writeJson](docs/writeJson.md)\n\n### Sync\n\n- [copySync](docs/copy-sync.md)\n- [emptyDirSync](docs/emptyDir-sync.md)\n- [ensureFileSync](docs/ensureFile-sync.md)\n- [ensureDirSync](docs/ensureDir-sync.md)\n- [ensureLinkSync](docs/ensureLink-sync.md)\n- [ensureSymlinkSync](docs/ensureSymlink-sync.md)\n- [mkdirsSync](docs/ensureDir-sync.md)\n- [moveSync](docs/move-sync.md)\n- [outputFileSync](docs/outputFile-sync.md)\n- [outputJsonSync](docs/outputJson-sync.md)\n- [pathExistsSync](docs/pathExists-sync.md)\n- [readJsonSync](docs/readJson-sync.md)\n- [removeSync](docs/remove-sync.md)\n- [writeJsonSync](docs/writeJson-sync.md)\n\n\n**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`.\n\n### What happened to `walk()` and `walkSync()`?\n\nThey were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync).\n\n\nThird Party\n-----------\n\n\n### TypeScript\n\nIf you like TypeScript, you can use `fs-extra` with it: https://github.com/borisyankov/DefinitelyTyped/tree/master/fs-extra\n\n\n### File / Directory Watching\n\nIf you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar).\n\n\n### Misc.\n\n- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls.\n\n\n\nHacking on fs-extra\n-------------------\n\nWanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project\nuses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,\nyou're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`.\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\nWhat's needed?\n- First, take a look at existing issues. Those are probably going to be where the priority lies.\n- More tests for edge cases. Specifically on different platforms. There can never be enough tests.\n- Improve test coverage. See coveralls output for more info.\n\nNote: If you make any big changes, **you should definitely file an issue for discussion first.**\n\n### Running the Test Suite\n\nfs-extra contains hundreds of tests.\n\n- `npm run lint`: runs the linter ([standard](http://standardjs.com/))\n- `npm run unit`: runs the unit tests\n- `npm test`: runs both the linter and the tests\n\n\n### Windows\n\nIf you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's\nbecause on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's\naccount by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7\nHowever, I didn't have much luck doing this.\n\nSince I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows.\nI open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command:\n\n net use z: \"\\\\vmware-host\\Shared Folders\"\n\nI can then navigate to my `fs-extra` directory and run the tests.\n\n\nNaming\n------\n\nI put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:\n\n* https://github.com/jprichardson/node-fs-extra/issues/2\n* https://github.com/flatiron/utile/issues/11\n* https://github.com/ryanmcgrath/wrench-js/issues/29\n* https://github.com/substack/node-mkdirp/issues/17\n\nFirst, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.\n\nFor example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.\n\nWe have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?\n\nMy perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.\n\nSo, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.\n\n\nCredit\n------\n\n`fs-extra` wouldn't be possible without using the modules from the following authors:\n\n- [Isaac Shlueter](https://github.com/isaacs)\n- [Charlie McConnel](https://github.com/avianflu)\n- [James Halliday](https://github.com/substack)\n- [Andrew Kelley](https://github.com/andrewrk)\n\n\n\n\nLicense\n-------\n\nLicensed under MIT\n\nCopyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson)\n\n[1]: http://nodejs.org/docs/latest/api/fs.html\n\n\n[jsonfile]: https://github.com/jprichardson/node-jsonfile\n",
|
|
"readmeFilename": "README.md",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/jprichardson/node-fs-extra.git"
|
|
},
|
|
"scripts": {
|
|
"coverage": "istanbul cover -i 'lib/**' -x '**/__tests__/**' test.js",
|
|
"coveralls": "npm run coverage && coveralls < coverage/lcov.info",
|
|
"lint": "standard && standard-markdown",
|
|
"test": "npm run lint && npm run unit",
|
|
"test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha",
|
|
"unit": "node test.js"
|
|
},
|
|
"version": "3.0.1"
|
|
}
|