Removed GopherJS, basic frontend completed, need backend changes for

torrent storage
This commit is contained in:
2017-11-30 18:12:11 -05:00
parent 67fdef16b1
commit e98ad2cc88
69321 changed files with 5498914 additions and 337 deletions

View File

@@ -0,0 +1,4 @@
node_modules
.DS_Store
npm-debug.log
coverage

View File

@@ -0,0 +1,8 @@
language: node_js
node_js:
- "4"
- "iojs-v3"
- "iojs-v2"
- "iojs-v1"
- "0.12"
- "0.10"

View File

@@ -0,0 +1,15 @@
The ISC License
Copyright (c) 2015 Elan Shanker
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@@ -0,0 +1,43 @@
glob-parent [![Build Status](https://travis-ci.org/es128/glob-parent.svg)](https://travis-ci.org/es128/glob-parent) [![Coverage Status](https://img.shields.io/coveralls/es128/glob-parent.svg)](https://coveralls.io/r/es128/glob-parent?branch=master)
======
Javascript module to extract the non-magic parent path from a glob string.
[![NPM](https://nodei.co/npm/glob-parent.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/glob-parent/)
[![NPM](https://nodei.co/npm-dl/glob-parent.png?height=3&months=9)](https://nodei.co/npm-dl/glob-parent/)
Usage
-----
```sh
npm install glob-parent --save
```
```js
var globParent = require('glob-parent');
globParent('path/to/*.js'); // 'path/to'
globParent('/root/path/to/*.js'); // '/root/path/to'
globParent('/*.js'); // '/'
globParent('*.js'); // '.'
globParent('**/*.js'); // '.'
globParent('path/{to,from}'); // 'path'
globParent('path/!(to|from)'); // 'path'
globParent('path/?(to|from)'); // 'path'
globParent('path/+(to|from)'); // 'path'
globParent('path/*(to|from)'); // 'path'
globParent('path/@(to|from)'); // 'path'
globParent('path/**/*'); // 'path'
// if provided a non-glob path, returns the nearest dir
globParent('path/foo/bar.js'); // 'path/foo'
globParent('path/foo/'); // 'path/foo'
globParent('path/foo'); // 'path' (see issue #3 for details)
```
Change Log
----------
[See release notes page on GitHub](https://github.com/es128/glob-parent/releases)
License
-------
[ISC](https://raw.github.com/es128/glob-parent/master/LICENSE)

View File

@@ -0,0 +1,10 @@
'use strict';
var path = require('path');
var isglob = require('is-glob');
module.exports = function globParent(str) {
str += 'a'; // preserves full path in case of trailing path separator
do {str = path.dirname(str)} while (isglob(str));
return str;
};

View File

@@ -0,0 +1,66 @@
{
"_args": [
[
"glob-parent@2.0.0",
"C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project"
]
],
"_from": "glob-parent@2.0.0",
"_id": "glob-parent@2.0.0",
"_inBundle": false,
"_integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=",
"_location": "/webpack/glob-parent",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "glob-parent@2.0.0",
"name": "glob-parent",
"escapedName": "glob-parent",
"rawSpec": "2.0.0",
"saveSpec": null,
"fetchSpec": "2.0.0"
},
"_requiredBy": [
"/webpack/chokidar",
"/webpack/glob-base"
],
"_resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz",
"_spec": "2.0.0",
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project",
"author": {
"name": "Elan Shanker"
},
"bugs": {
"url": "https://github.com/es128/glob-parent/issues"
},
"dependencies": {
"is-glob": "^2.0.0"
},
"description": "Strips glob magic from a string to provide the parent path",
"devDependencies": {
"coveralls": "^2.11.2",
"istanbul": "^0.3.5",
"mocha": "^2.1.0"
},
"homepage": "https://github.com/es128/glob-parent",
"keywords": [
"glob",
"parent",
"strip",
"path",
"directory",
"base"
],
"license": "ISC",
"main": "index.js",
"name": "glob-parent",
"repository": {
"type": "git",
"url": "git+https://github.com/es128/glob-parent.git"
},
"scripts": {
"test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"
},
"version": "2.0.0"
}

View File

@@ -0,0 +1,28 @@
'use strict';
var gp = require('./');
var assert = require('assert');
describe('glob-parent', function() {
it('should strip glob magic to return parent path', function() {
assert.equal(gp('path/to/*.js'), 'path/to');
assert.equal(gp('/root/path/to/*.js'), '/root/path/to');
assert.equal(gp('/*.js'), '/');
assert.equal(gp('*.js'), '.');
assert.equal(gp('**/*.js'), '.');
assert.equal(gp('path/{to,from}'), 'path');
assert.equal(gp('path/!(to|from)'), 'path');
assert.equal(gp('path/?(to|from)'), 'path');
assert.equal(gp('path/+(to|from)'), 'path');
assert.equal(gp('path/*(to|from)'), 'path');
assert.equal(gp('path/@(to|from)'), 'path');
assert.equal(gp('path/**/*'), 'path');
assert.equal(gp('path/**/subdir/foo.*'), 'path');
});
it('should return parent dirname from non-glob paths', function() {
assert.equal(gp('path/foo/bar.js'), 'path/foo');
assert.equal(gp('path/foo/'), 'path/foo');
assert.equal(gp('path/foo'), 'path');
});
});