nav tabs on admin dashboard

This commit is contained in:
2019-03-07 00:20:34 -06:00
parent f73d6ae228
commit e4f473f376
11661 changed files with 216240 additions and 1544253 deletions
+7 -9
View File
@@ -2,11 +2,9 @@
const path = require('path');
const locatePath = require('locate-path');
module.exports = (filename, opts) => {
opts = opts || {};
module.exports = (filename, opts = {}) => {
const startDir = path.resolve(opts.cwd || '');
const root = path.parse(startDir).root;
const {root} = path.parse(startDir);
const filenames = [].concat(filename);
@@ -25,11 +23,9 @@ module.exports = (filename, opts) => {
});
};
module.exports.sync = (filename, opts) => {
opts = opts || {};
module.exports.sync = (filename, opts = {}) => {
let dir = path.resolve(opts.cwd || '');
const root = path.parse(dir).root;
const {root} = path.parse(dir);
const filenames = [].concat(filename);
@@ -39,7 +35,9 @@ module.exports.sync = (filename, opts) => {
if (file) {
return path.join(dir, file);
} else if (dir === root) {
}
if (dir === root) {
return null;
}
+4 -16
View File
@@ -1,21 +1,9 @@
The MIT License (MIT)
MIT License
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+16 -18
View File
@@ -1,27 +1,28 @@
{
"_from": "find-up@^2.1.0",
"_id": "find-up@2.1.0",
"_from": "find-up@^3.0.0",
"_id": "find-up@3.0.0",
"_inBundle": false,
"_integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
"_integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
"_location": "/find-up",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "find-up@^2.1.0",
"raw": "find-up@^3.0.0",
"name": "find-up",
"escapedName": "find-up",
"rawSpec": "^2.1.0",
"rawSpec": "^3.0.0",
"saveSpec": null,
"fetchSpec": "^2.1.0"
"fetchSpec": "^3.0.0"
},
"_requiredBy": [
"/pkg-dir",
"/yargs/read-pkg-up"
"/webpack-dev-server/yargs",
"/yargs"
],
"_resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
"_shasum": "45d1b7e506c717ddd482775a2b77920a3c0c57a7",
"_spec": "find-up@^2.1.0",
"_resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
"_shasum": "49169f1d7993430646da61ecc5ae355c21c97b73",
"_spec": "find-up@^3.0.0",
"_where": "C:\\xampp\\htdocs\\w4rpservices\\node_modules\\pkg-dir",
"author": {
"name": "Sindre Sorhus",
@@ -33,17 +34,17 @@
},
"bundleDependencies": false,
"dependencies": {
"locate-path": "^2.0.0"
"locate-path": "^3.0.0"
},
"deprecated": false,
"description": "Find a file by walking up parent directories",
"description": "Find a file or directory by walking up parent directories",
"devDependencies": {
"ava": "*",
"tempfile": "^1.1.1",
"tempy": "^0.2.1",
"xo": "*"
},
"engines": {
"node": ">=4"
"node": ">=6"
},
"files": [
"index.js"
@@ -79,8 +80,5 @@
"scripts": {
"test": "xo && ava"
},
"version": "2.1.0",
"xo": {
"esnext": true
}
"version": "3.0.0"
}
+13 -11
View File
@@ -1,12 +1,12 @@
# find-up [![Build Status: Linux and macOS](https://travis-ci.org/sindresorhus/find-up.svg?branch=master)](https://travis-ci.org/sindresorhus/find-up) [![Build Status: Windows](https://ci.appveyor.com/api/projects/status/l0cyjmvh5lq72vq2/branch/master?svg=true)](https://ci.appveyor.com/project/sindresorhus/find-up/branch/master)
> Find a file by walking up parent directories
> Find a file or directory by walking up parent directories
## Install
```
$ npm install --save find-up
$ npm install find-up
```
@@ -23,19 +23,18 @@ $ npm install --save find-up
└── example.js
```
`example.js`
```js
// example.js
const findUp = require('find-up');
findUp('unicorn.png').then(filepath => {
console.log(filepath);
(async () => {
console.log(await findUp('unicorn.png'));
//=> '/Users/sindresorhus/unicorn.png'
});
findUp(['rainbow.png', 'unicorn.png']).then(filepath => {
console.log(filepath);
console.log(await findUp(['rainbow.png', 'unicorn.png']));
//=> '/Users/sindresorhus/unicorn.png'
});
})();
```
@@ -43,11 +42,11 @@ findUp(['rainbow.png', 'unicorn.png']).then(filepath => {
### findUp(filename, [options])
Returns a `Promise` for the filepath or `null`.
Returns a `Promise` for either the filepath or `null` if it couldn't be found.
### findUp([filenameA, filenameB], [options])
Returns a `Promise` for the first filepath found (by respecting the order) or `null`.
Returns a `Promise` for either the first filepath found (by respecting the order) or `null` if none could be found.
### findUp.sync(filename, [options])
@@ -65,6 +64,8 @@ Filename of the file to find.
#### options
Type: `Object`
##### cwd
Type: `string`<br>
@@ -78,6 +79,7 @@ Directory to start from.
- [find-up-cli](https://github.com/sindresorhus/find-up-cli) - CLI for this module
- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file
- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package
- [resolve-from](https://github.com/sindresorhus/resolve-from) - Resolve the path of a module like `require.resolve()` but from a given path
## License