nav tabs on admin dashboard
This commit is contained in:
3
node_modules/jsonfile/.npmignore
generated
vendored
3
node_modules/jsonfile/.npmignore
generated
vendored
@@ -1,3 +0,0 @@
|
||||
test/
|
||||
.travis.yml
|
||||
appveyor.yml
|
||||
11
node_modules/jsonfile/CHANGELOG.md
generated
vendored
11
node_modules/jsonfile/CHANGELOG.md
generated
vendored
@@ -1,3 +1,11 @@
|
||||
4.0.0 / 2017-07-12
|
||||
------------------
|
||||
|
||||
- **BREAKING:** Remove global `spaces` option.
|
||||
- **BREAKING:** Drop support for Node 0.10, 0.12, and io.js.
|
||||
- Remove undocumented `passParsingErrors` option.
|
||||
- Added `EOL` override option to `writeFile` when using `spaces`. [#89]
|
||||
|
||||
3.0.1 / 2017-07-05
|
||||
------------------
|
||||
|
||||
@@ -89,12 +97,13 @@ changes it according to docs. [#12][#12]
|
||||
------------------
|
||||
* Initial release.
|
||||
|
||||
[#89]: https://github.com/jprichardson/node-jsonfile/pull/89
|
||||
[#45]: https://github.com/jprichardson/node-jsonfile/issues/45 "Reading of UTF8-encoded (w/ BOM) files fails"
|
||||
[#44]: https://github.com/jprichardson/node-jsonfile/issues/44 "Extra characters in written file"
|
||||
[#43]: https://github.com/jprichardson/node-jsonfile/issues/43 "Prettyfy json when written to file"
|
||||
[#42]: https://github.com/jprichardson/node-jsonfile/pull/42 "Moved fs.readFileSync within the try/catch"
|
||||
[#41]: https://github.com/jprichardson/node-jsonfile/issues/41 "Linux: Hidden file not working"
|
||||
[#40]: https://github.com/jprichardson/node-jsonfile/issues/40 "autocreate folder doesnt work from Path-value"
|
||||
[#40]: https://github.com/jprichardson/node-jsonfile/issues/40 "autocreate folder doesn't work from Path-value"
|
||||
[#39]: https://github.com/jprichardson/node-jsonfile/pull/39 "Add `throws` option for readFile (async)"
|
||||
[#38]: https://github.com/jprichardson/node-jsonfile/pull/38 "Update README.md writeFile[Sync] signature"
|
||||
[#37]: https://github.com/jprichardson/node-jsonfile/pull/37 "support append file"
|
||||
|
||||
70
node_modules/jsonfile/README.md
generated
vendored
70
node_modules/jsonfile/README.md
generated
vendored
@@ -57,7 +57,7 @@ console.dir(jsonfile.readFileSync(file))
|
||||
|
||||
### writeFile(filename, obj, [options], callback)
|
||||
|
||||
`options`: Pass in any `fs.writeFile` options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`.
|
||||
`options`: Pass in any `fs.writeFile` options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces` and override `EOL` string.
|
||||
|
||||
|
||||
```js
|
||||
@@ -84,6 +84,19 @@ jsonfile.writeFile(file, obj, {spaces: 2}, function(err) {
|
||||
})
|
||||
```
|
||||
|
||||
**overriding EOL:**
|
||||
|
||||
```js
|
||||
var jsonfile = require('jsonfile')
|
||||
|
||||
var file = '/tmp/data.json'
|
||||
var obj = {name: 'JP'}
|
||||
|
||||
jsonfile.writeFile(file, obj, {spaces: 2, EOL: '\r\n'}, function(err) {
|
||||
console.error(err)
|
||||
})
|
||||
```
|
||||
|
||||
**appending to an existing JSON file:**
|
||||
|
||||
You can use `fs.writeFile` option `{flag: 'a'}` to achieve this.
|
||||
@@ -101,7 +114,7 @@ jsonfile.writeFile(file, obj, {flag: 'a'}, function (err) {
|
||||
|
||||
### writeFileSync(filename, obj, [options])
|
||||
|
||||
`options`: Pass in any `fs.writeFileSync` options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`.
|
||||
`options`: Pass in any `fs.writeFileSync` options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces` and override `EOL` string.
|
||||
|
||||
```js
|
||||
var jsonfile = require('jsonfile')
|
||||
@@ -123,6 +136,17 @@ var obj = {name: 'JP'}
|
||||
jsonfile.writeFileSync(file, obj, {spaces: 2})
|
||||
```
|
||||
|
||||
**overriding EOL:**
|
||||
|
||||
```js
|
||||
var jsonfile = require('jsonfile')
|
||||
|
||||
var file = '/tmp/data.json'
|
||||
var obj = {name: 'JP'}
|
||||
|
||||
jsonfile.writeFileSync(file, obj, {spaces: 2, EOL: '\r\n'})
|
||||
```
|
||||
|
||||
**appending to an existing JSON file:**
|
||||
|
||||
You can use `fs.writeFileSync` option `{flag: 'a'}` to achieve this.
|
||||
@@ -136,48 +160,6 @@ var obj = {name: 'JP'}
|
||||
jsonfile.writeFileSync(file, obj, {flag: 'a'})
|
||||
```
|
||||
|
||||
### spaces
|
||||
|
||||
Global configuration to set spaces to indent JSON files.
|
||||
|
||||
**default:** `null`
|
||||
|
||||
```js
|
||||
var jsonfile = require('jsonfile')
|
||||
|
||||
jsonfile.spaces = 4
|
||||
|
||||
var file = '/tmp/data.json'
|
||||
var obj = {name: 'JP'}
|
||||
|
||||
// json file has four space indenting now
|
||||
jsonfile.writeFile(file, obj, function (err) {
|
||||
console.error(err)
|
||||
})
|
||||
```
|
||||
|
||||
Note, it's bound to `this.spaces`. So, if you do this:
|
||||
|
||||
```js
|
||||
var myObj = {}
|
||||
myObj.writeJsonSync = jsonfile.writeFileSync
|
||||
// => this.spaces = null
|
||||
```
|
||||
|
||||
Could do the following:
|
||||
|
||||
```js
|
||||
var jsonfile = require('jsonfile')
|
||||
jsonfile.spaces = 4
|
||||
jsonfile.writeFileSync(file, obj) // will have 4 spaces indentation
|
||||
|
||||
var myCrazyObj = {spaces: 32}
|
||||
myCrazyObj.writeJsonSync = jsonfile.writeFileSync
|
||||
myCrazyObj.writeJsonSync(file, obj) // will have 32 space indentation
|
||||
myCrazyObj.writeJsonSync(file, obj, {spaces: 2}) // will have only 2
|
||||
```
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
|
||||
42
node_modules/jsonfile/index.js
generated
vendored
42
node_modules/jsonfile/index.js
generated
vendored
@@ -19,10 +19,7 @@ function readFile (file, options, callback) {
|
||||
var fs = options.fs || _fs
|
||||
|
||||
var shouldThrow = true
|
||||
// DO NOT USE 'passParsingErrors' THE NAME WILL CHANGE!!!, use 'throws' instead
|
||||
if ('passParsingErrors' in options) {
|
||||
shouldThrow = options.passParsingErrors
|
||||
} else if ('throws' in options) {
|
||||
if ('throws' in options) {
|
||||
shouldThrow = options.throws
|
||||
}
|
||||
|
||||
@@ -56,10 +53,7 @@ function readFileSync (file, options) {
|
||||
var fs = options.fs || _fs
|
||||
|
||||
var shouldThrow = true
|
||||
// DO NOT USE 'passParsingErrors' THE NAME WILL CHANGE!!!, use 'throws' instead
|
||||
if ('passParsingErrors' in options) {
|
||||
shouldThrow = options.passParsingErrors
|
||||
} else if ('throws' in options) {
|
||||
if ('throws' in options) {
|
||||
shouldThrow = options.throws
|
||||
}
|
||||
|
||||
@@ -77,6 +71,23 @@ function readFileSync (file, options) {
|
||||
}
|
||||
}
|
||||
|
||||
function stringify (obj, options) {
|
||||
var spaces
|
||||
var EOL = '\n'
|
||||
if (typeof options === 'object' && options !== null) {
|
||||
if (options.spaces) {
|
||||
spaces = options.spaces
|
||||
}
|
||||
if (options.EOL) {
|
||||
EOL = options.EOL
|
||||
}
|
||||
}
|
||||
|
||||
var str = JSON.stringify(obj, options ? options.replacer : null, spaces)
|
||||
|
||||
return str.replace(/\n/g, EOL) + EOL
|
||||
}
|
||||
|
||||
function writeFile (file, obj, options, callback) {
|
||||
if (callback == null) {
|
||||
callback = options
|
||||
@@ -85,14 +96,9 @@ function writeFile (file, obj, options, callback) {
|
||||
options = options || {}
|
||||
var fs = options.fs || _fs
|
||||
|
||||
var spaces = typeof options === 'object' && options !== null
|
||||
? 'spaces' in options
|
||||
? options.spaces : this.spaces
|
||||
: this.spaces
|
||||
|
||||
var str = ''
|
||||
try {
|
||||
str = JSON.stringify(obj, options ? options.replacer : null, spaces) + '\n'
|
||||
str = stringify(obj, options)
|
||||
} catch (err) {
|
||||
// Need to return whether a callback was passed or not
|
||||
if (callback) callback(err, null)
|
||||
@@ -106,12 +112,7 @@ function writeFileSync (file, obj, options) {
|
||||
options = options || {}
|
||||
var fs = options.fs || _fs
|
||||
|
||||
var spaces = typeof options === 'object' && options !== null
|
||||
? 'spaces' in options
|
||||
? options.spaces : this.spaces
|
||||
: this.spaces
|
||||
|
||||
var str = JSON.stringify(obj, options.replacer, spaces) + '\n'
|
||||
var str = stringify(obj, options)
|
||||
// not sure if fs.writeFileSync returns anything, but just in case
|
||||
return fs.writeFileSync(file, str, options)
|
||||
}
|
||||
@@ -124,7 +125,6 @@ function stripBom (content) {
|
||||
}
|
||||
|
||||
var jsonfile = {
|
||||
spaces: null,
|
||||
readFile: readFile,
|
||||
readFileSync: readFileSync,
|
||||
writeFile: writeFile,
|
||||
|
||||
25
node_modules/jsonfile/package.json
generated
vendored
25
node_modules/jsonfile/package.json
generated
vendored
@@ -1,26 +1,26 @@
|
||||
{
|
||||
"_from": "jsonfile@^3.0.0",
|
||||
"_id": "jsonfile@3.0.1",
|
||||
"_from": "jsonfile@^4.0.0",
|
||||
"_id": "jsonfile@4.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-pezG9l9T9mLEQVx2daAzHQmS7GY=",
|
||||
"_integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
|
||||
"_location": "/jsonfile",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "jsonfile@^3.0.0",
|
||||
"raw": "jsonfile@^4.0.0",
|
||||
"name": "jsonfile",
|
||||
"escapedName": "jsonfile",
|
||||
"rawSpec": "^3.0.0",
|
||||
"rawSpec": "^4.0.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^3.0.0"
|
||||
"fetchSpec": "^4.0.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/fs-extra"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-3.0.1.tgz",
|
||||
"_shasum": "a5ecc6f65f53f662c4415c7675a0331d0992ec66",
|
||||
"_spec": "jsonfile@^3.0.0",
|
||||
"_resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
||||
"_shasum": "8771aae0799b64076b76640fca058f9c10e33ecb",
|
||||
"_spec": "jsonfile@^4.0.0",
|
||||
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\fs-extra",
|
||||
"author": {
|
||||
"name": "JP Richardson",
|
||||
@@ -38,8 +38,11 @@
|
||||
"devDependencies": {
|
||||
"mocha": "2.x",
|
||||
"rimraf": "^2.4.0",
|
||||
"standard": "^6.0.8"
|
||||
"standard": "^10.0.3"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/jprichardson/node-jsonfile#readme",
|
||||
"keywords": [
|
||||
"read",
|
||||
@@ -64,5 +67,5 @@
|
||||
"test": "npm run lint && npm run unit",
|
||||
"unit": "mocha"
|
||||
},
|
||||
"version": "3.0.1"
|
||||
"version": "4.0.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user