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,23 @@
Usage:
```js
var isNode = require('detect-node');
if (isNode) {
console.log("Running under Node.JS");
} else {
alert("Hello from browser (or whatever not-a-node env)");
}
```
The check is performed as:
```js
module.exports = false;
// Only Node.JS has a process variable that is of [[Class]] process
try {
module.exports = Object.prototype.toString.call(global.process) === '[object process]'
} catch(e) {}
```
Thanks to Ingvar Stepanyan for the initial idea. This check is both **the most reliable I could find** and it does not use `process` env directly, which would cause browserify to include it into the build.

View File

@@ -0,0 +1,6 @@
module.exports = false;
// Only Node.JS has a process variable that is of [[Class]] process
try {
module.exports = Object.prototype.toString.call(global.process) === '[object process]'
} catch(e) {}

View File

@@ -0,0 +1,53 @@
{
"_args": [
[
"detect-node@2.0.3",
"C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project"
]
],
"_from": "detect-node@2.0.3",
"_id": "detect-node@2.0.3",
"_inBundle": false,
"_integrity": "sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc=",
"_location": "/react-scripts/detect-node",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "detect-node@2.0.3",
"name": "detect-node",
"escapedName": "detect-node",
"rawSpec": "2.0.3",
"saveSpec": null,
"fetchSpec": "2.0.3"
},
"_requiredBy": [
"/react-scripts/spdy-transport"
],
"_resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.0.3.tgz",
"_spec": "2.0.3",
"_where": "C:\\Users\\deranjer\\GoglandProjects\\torrent-project\\torrent-project",
"author": {
"name": "Ilya Kantor"
},
"bugs": {
"url": "https://github.com/iliakan/detect-node/issues"
},
"description": "Detect Node.JS (as opposite to browser environment) (reliable)",
"homepage": "https://github.com/iliakan/detect-node",
"keywords": [
"detect",
"node"
],
"license": "ISC",
"main": "index.js",
"name": "detect-node",
"repository": {
"type": "git",
"url": "git+https://github.com/iliakan/detect-node.git"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "2.0.3"
}