This commit is contained in:
AJ ONeal
2020-06-17 08:37:42 +00:00
parent 2a63b1c6f8
commit a0c9f74394
3 changed files with 101 additions and 0 deletions

42
deno/install.sh Normal file
View File

@@ -0,0 +1,42 @@
#!/bin/bash
# The custom functions for Deno are here.
# For the generic functions - version checks, download, extract, etc:
# See https://github.com/webinstall/packages/branches/master/webi/template.bash
set -e
set -u
pkg_cmd_name="deno"
# IMPORTANT: this let's other functions know to expect this to be a single file
WEBI_SINGLE=true
pkg_get_current_version() {
# 'deno --version' has output in this format:
# deno 1.1.0
# v8 8.4.300
# typescript 3.9.2
# This trims it down to just the version number:
# 1.1.1
echo "$(deno --version 2>/dev/null | head -n 1 | cut -d' ' -f2)"
}
pkg_install() {
# $HOME/.local/xbin
mkdir -p "$pkg_src_bin"
# mv ./deno* "$HOME/.local/xbin/deno-v1.1.0"
mv ./"$pkg_cmd_name"* "$pkg_src_cmd"
# chmod a+x "$HOME/.local/xbin/deno-v1.1.0"
chmod a+x "$pkg_src_cmd"
}
pkg_link() {
# rm -f "$HOME/.local/bin/deno"
rm -f "$pkg_dst_cmd"
# ln -s "$HOME/.local/xbin/deno-v1.1.0" "$HOME/.local/bin/deno"
ln -s "$pkg_src_cmd" "$pkg_dst_cmd"
}

37
deno/package.yash Normal file
View File

@@ -0,0 +1,37 @@
# title: Deno
# homepage: https://github.com/denoland/deno
# tagline: |
# Deno: A secure runtime for JavaScript and TypeScript.
# description: |
# Deno proves that lightning does strike twice. It's the ease of use of node, the intentional tooling of Go, and built in Rust.
# examples: |
# The obligatory Hello World
#
# ```bash
# deno run https://deno.land/std/examples/welcome.ts
# ```
#
# Run a local file
#
# ```bash
# deno run ./hello.ts
# ```
#
# Enable [permissions](https://deno.land/manual/getting_started/permissions)
#
# ```bash
# deno run --allow-read=./data,./public --allow-write=./data \
# --allow-net=example.com,example.net ./hello.ts
# ```
#
# Format source code, recursively
#
# ```bash
# deno fmt ./my-project
# ```
#
This is a comment... because... poor choices I made.
Don't worry, this will be yaml or markdown in the... sometime... future

22
deno/releases.js Normal file
View File

@@ -0,0 +1,22 @@
'use strict';
var github = require('../_common/github.js');
var owner = 'denoland';
var repo = 'deno';
module.exports = function (request) {
return github(request, owner, repo).then(function (all) {
// remove checksums and .deb
all.releases = all.releases.filter(function (rel) {
return !/(\.txt)|(\.deb)$/i.test(rel.name);
});
return all;
});
};
if (module === require.main) {
module.exports(require('@root/request')).then(function (all) {
all = require('../_webi/normalize.js')(all);
console.info(JSON.stringify(all));
});
}