push all website files

This commit is contained in:
Jacob Levine
2019-01-06 13:14:45 -06:00
parent d7301e26c3
commit d2d5d4c04e
15662 changed files with 2166516 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
Copyright (c) 2017, Rebecca Turner <me@re-becca.org>
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,53 @@
# move-concurrently
Move files and directories.
```
const move = require('move-concurrently')
move('/path/to/thing', '/new/path/thing').then(() => {
// thing is now moved!
}).catch(err => {
// oh no!
})
```
Uses `rename` to move things as fast as possible.
If you `move` across devices or on filesystems that don't support renaming
large directories. That is, situations that result in `rename` returning
the `EXDEV` error, then `move` will fallback to copy + delete.
When recursively copying directories it will first try to rename the
contents before falling back to copying. While this will be slightly slower
in true cross-device scenarios, it is MUCH faster in cases where the
filesystem can't handle directory renames.
When copying ownership is maintained when running as root. Permissions are
always maintained. On Windows, if symlinks are unavailable then junctions
will be used.
## INTERFACE
### move(from, to, options) → Promise
Recursively moves `from` to `to` and resolves its promise when finished.
If `to` already exists then the promise will be rejected with an `EEXIST`
error.
Starts by trying to rename `from` to `to`.
Options are:
* maxConcurrency (Default: `1`) The maximum number of concurrent copies to do at once.
* isWindows - (Default: `process.platform === 'win32'`) If true enables Windows symlink semantics. This requires
an extra `stat` to determine if the destination of a symlink is a file or directory. If symlinking a directory
fails then we'll try making a junction instead.
Options can also include dependency injection:
* Promise - (Default: `global.Promise`) The promise implementation to use, defaults to Node's.
* fs - (Default: `require('fs')`) The filesystem module to use. Can be used
to use `graceful-fs` or to inject a mock.
* writeStreamAtomic - (Default: `require('fs-write-stream-atomic')`) The
implementation of `writeStreamAtomic` to use. Used to inject a mock.
* getuid - (Default: `process.getuid`) A function that returns the current UID. Used to inject a mock.

View File

@@ -0,0 +1,84 @@
'use strict'
module.exports = move
var nodeFs = require('fs')
var rimraf = require('rimraf')
var validate = require('aproba')
var copy = require('copy-concurrently')
var RunQueue = require('run-queue')
var extend = Object.assign || require('util')._extend
function promisify (Promise, fn) {
return function () {
var args = [].slice.call(arguments)
return new Promise(function (resolve, reject) {
return fn.apply(null, args.concat(function (err, value) {
if (err) {
reject(err)
} else {
resolve(value)
}
}))
})
}
}
function move (from, to, opts) {
validate('SSO|SS', arguments)
opts = extend({}, opts || {})
var Promise = opts.Promise || global.Promise
var fs = opts.fs || nodeFs
var rimrafAsync = promisify(Promise, rimraf)
var renameAsync = promisify(Promise, fs.rename)
opts.top = from
var queue = new RunQueue({
maxConcurrency: opts.maxConcurrency,
Promise: Promise
})
opts.queue = queue
opts.recurseWith = rename
queue.add(0, rename, [from, to, opts])
return queue.run().then(function () {
return remove(from)
}, function (err) {
// if the target already exists don't clobber it
if (err.code === 'EEXIST' || err.code === 'EPERM') {
return passThroughError()
} else {
return remove(to).then(passThroughError, passThroughError)
}
function passThroughError () {
return Promise.reject(err)
}
})
function remove (target) {
var opts = {
unlink: fs.unlink,
chmod: fs.chmod,
stat: fs.stat,
lstat: fs.lstat,
rmdir: fs.rmdir,
readdir: fs.readdir,
glob: false
}
return rimrafAsync(target, opts)
}
function rename (from, to, opts, done) {
return renameAsync(from, to).catch(function (err) {
if (err.code !== 'EXDEV') {
return Promise.reject(err)
} else {
return remove(to).then(function () {
return copy.item(from, to, opts)
})
}
})
}
}

View File

@@ -0,0 +1,76 @@
{
"_args": [
[
"move-concurrently@1.0.1",
"/Users/rebecca/code/npm"
]
],
"_from": "move-concurrently@1.0.1",
"_id": "move-concurrently@1.0.1",
"_inBundle": true,
"_integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=",
"_location": "/npm/move-concurrently",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "move-concurrently@1.0.1",
"name": "move-concurrently",
"escapedName": "move-concurrently",
"rawSpec": "1.0.1",
"saveSpec": null,
"fetchSpec": "1.0.1"
},
"_requiredBy": [
"/npm",
"/npm/cacache",
"/npm/npm-registry-fetch/cacache"
],
"_resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
"_spec": "1.0.1",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org",
"url": "http://re-becca.org/"
},
"bugs": {
"url": "https://github.com/npm/move-concurrently/issues"
},
"dependencies": {
"aproba": "^1.1.1",
"copy-concurrently": "^1.0.0",
"fs-write-stream-atomic": "^1.0.8",
"mkdirp": "^0.5.1",
"rimraf": "^2.5.4",
"run-queue": "^1.0.3"
},
"description": "Promises of moves of files or directories with rename, falling back to recursive rename/copy on EXDEV errors, with configurable concurrency and win32 junction support.",
"devDependencies": {
"standard": "^8.6.0",
"tacks": "^1.2.6",
"tap": "^10.1.1"
},
"directories": {
"test": "test"
},
"files": [
"move.js",
"is-windows.js"
],
"homepage": "https://www.npmjs.com/package/move-concurrently",
"keywords": [
"move"
],
"license": "ISC",
"main": "move.js",
"name": "move-concurrently",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/move-concurrently.git"
},
"scripts": {
"test": "standard && tap --coverage test"
},
"version": "1.0.1"
}