Initial Commit

This commit is contained in:
Atlas 2020-03-27 21:37:07 +00:00
commit adfe37d3cc
6 changed files with 3206 additions and 0 deletions

86
.gitignore vendored Normal file
View File

@ -0,0 +1,86 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.pnp.*
# custom
*.swp

30
.npmignore Normal file
View File

@ -0,0 +1,30 @@
# https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package
#tests
test
coverage
#build tools
.travis.yml
.jenkins.yml
.codeclimate.yml
#linters
.jscsrc
.jshintrc
.eslintrc*
#editor settings
.idea
.editorconfig
#.gitignore help
node_modules
*.log*
.DS_Store
lib/
*.ls
*.tgz
*.swp
*~
\#*\#
.\#*
*.swo
gulpfile.js
#custom
*.swp

46
index.html Normal file
View File

@ -0,0 +1,46 @@
<!doctype html>
<html>
<head>
<title>Example Domain</title>
<meta charset="utf-8" />
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style type="text/css">
body {
background-color: #f0f0f2;
margin: 0;
padding: 0;
font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
div {
width: 600px;
margin: 5em auto;
padding: 2em;
background-color: #fdfdff;
border-radius: 0.5em;
box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);
}
a:link, a:visited {
color: #38488f;
text-decoration: none;
}
@media (max-width: 700px) {
div {
margin: 0 auto;
width: auto;
}
}
</style>
</head>
<body>
<div>
<h1>Example Domain</h1>
<p>This domain is for use in illustrative examples in documents. You may use this
domain in literature without prior coordination or asking for permission.</p>
<p><a href="https://www.iana.org/domains/example">More information...</a></p>
</div>
</body>
</html>

14
package.json Normal file
View File

@ -0,0 +1,14 @@
{
"name": "snarf",
"version": "0.0.0",
"description": "A simple, low-dependency file downloader",
"main": "index.js",
"author": "Atlas <AtlasJan@gmx.com>",
"license": "LGPL-3.0-or-later",
"devDependencies": {
"gulp": "^4.0.2",
"gulp-livescript": "^3.0.1",
"livescript": "^1.6.0",
"mocha": "^7.1.1"
}
}

14
snarf.ls Normal file
View File

@ -0,0 +1,14 @@
require! https
require! fs
module.exports = (url, location) ->
``var _location;
location =(_location=location)!==null&&_location!==void 0?_location : ``"#{process.cwd!}/#{fs.basename(url)}";
new Promise (resolve, reject) ->
f=fs.createWriteStream
f.on \error reject
https.get url, (res) ->
res.on \error, reject
res.on \success, resolve
res.pipe f

3016
yarn.lock Normal file

File diff suppressed because it is too large Load Diff