mirror of
https://github.com/webinstall/webi-installers.git
synced 2026-03-03 01:40:17 +00:00
Added sass
This commit is contained in:
33
dart-sass/README.md
Normal file
33
dart-sass/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
title: dart-sass
|
||||
homepage: https://github.com/webinstall/dart-sass
|
||||
tagline: |
|
||||
dart-sass: A Dart implementation of Sass. Sass makes CSS fun again.
|
||||
---
|
||||
|
||||
To update or switch versions, run `webi example@dart-sass` (or `@v2`, `@beta`,
|
||||
etc).
|
||||
|
||||
## Cheat Sheet
|
||||
|
||||
> Dart Sass has replaced Ruby Sass as the canonical implementation of the Sass language.
|
||||
|
||||
### Command format:
|
||||
```bash
|
||||
sass <input.scss> [output.css]
|
||||
```
|
||||
or
|
||||
```bash
|
||||
sass <input.scss>:<output.css> <input/>:<output/> <dir/>
|
||||
```
|
||||
|
||||
|
||||
| Input and Output | Functionality |
|
||||
|------------------|-----------------------------------------------------------|
|
||||
| --[no-]stdin | Read the stylesheet from stdin. |
|
||||
| --[no-]indented | Use the indented syntax for input from stdin. |
|
||||
| -I, --load-path= | A path to use when resolving imports. |
|
||||
| -s, --style= | Output style. |
|
||||
| --[no-]charset | Emit a @charset or BOM for CSS with non-ASCII characters. |
|
||||
| --[no-]error-css | When an error occurs, emit a stylesheet describing it. |
|
||||
| --update | Only compile out-of-date stylesheets. |
|
||||
50
dart-sass/install.ps1
Normal file
50
dart-sass/install.ps1
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
##################
|
||||
# Install dart-sass #
|
||||
##################
|
||||
|
||||
$pkg_cmd_name = "dart-sass"
|
||||
|
||||
$pkg_dst_cmd = "$Env:USERPROFILE\.local\bin\dart-sass.exe"
|
||||
$pkg_dst = "$pkg_dst_cmd"
|
||||
|
||||
$pkg_src_cmd = "$Env:USERPROFILE\.local\opt\dart-sass-v$Env:WEBI_VERSION\bin\dart-sass.exe"
|
||||
$pkg_src_bin = "$Env:USERPROFILE\.local\opt\dart-sass-v$Env:WEBI_VERSION\bin"
|
||||
$pkg_src_dir = "$Env:USERPROFILE\.local\opt\dart-sass-v$Env:WEBI_VERSION"
|
||||
$pkg_src = "$pkg_src_cmd"
|
||||
|
||||
$pkg_download = "$Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE"
|
||||
|
||||
IF (!(Test-Path -Path "$Env:USERPROFILE\Downloads\$Env:WEBI_PKG_FILE"))
|
||||
{
|
||||
# TODO: arch detection
|
||||
echo "Downloading dart-sass from $Env:WEBI_PKG_URL to $pkg_download"
|
||||
& curl.exe -A "$Env:WEBI_UA" -fsSL "$Env:WEBI_PKG_URL" -o "$pkg_download.part"
|
||||
& move "$pkg_download.part" "$pkg_download"
|
||||
}
|
||||
|
||||
IF (!(Test-Path -Path "$pkg_src_cmd"))
|
||||
{
|
||||
echo "Installing dart-sass"
|
||||
|
||||
pushd .local\tmp
|
||||
|
||||
# Remove any leftover tmp cruft
|
||||
Remove-Item -Path ".\dart-sass-v*" -Recurse -ErrorAction Ignore
|
||||
Remove-Item -Path ".\dart-sass.exe" -Recurse -ErrorAction Ignore
|
||||
|
||||
echo "Unpacking $pkg_download"
|
||||
& tar xf "$pkg_download"
|
||||
|
||||
echo "Install Location: $pkg_src_cmd"
|
||||
New-Item "$pkg_src_bin" -ItemType Directory -Force
|
||||
Move-Item -Path ".\dart-sass-*\dart-sass.exe" -Destination "$pkg_src_bin"
|
||||
|
||||
# Exit tmp
|
||||
popd
|
||||
}
|
||||
|
||||
echo "Copying into '$pkg_dst_cmd' from '$pkg_src_cmd'"
|
||||
Remove-Item -Path "$pkg_dst_cmd" -Recurse -ErrorAction Ignore
|
||||
Copy-Item -Path "$pkg_src" -Destination "$pkg_dst" -Recurse
|
||||
33
dart-sass/install.sh
Normal file
33
dart-sass/install.sh
Normal file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
function __init_dart-sass() {
|
||||
set -e
|
||||
set -u
|
||||
|
||||
##################
|
||||
# Install dart-sass #
|
||||
##################
|
||||
|
||||
pkg_cmd_name="dart-sass"
|
||||
|
||||
pkg_dst_cmd="$HOME/.local/bin/dart-sass"
|
||||
pkg_dst="$pkg_dst_cmd"
|
||||
|
||||
pkg_src_cmd="$HOME/.local/opt/dart-sass-v$WEBI_VERSION/bin/dart-sass"
|
||||
pkg_src_dir="$HOME/.local/opt/dart-sass-v$WEBI_VERSION"
|
||||
pkg_src="$pkg_src_cmd"
|
||||
|
||||
# pkg_install must be defined by every package
|
||||
pkg_install() {
|
||||
mkdir -p "$(dirname $pkg_src_cmd)"
|
||||
mv ./dart-sass-*/dart-sass "$pkg_src_cmd"
|
||||
pathman add ~/.local/bin/dart-sass
|
||||
}
|
||||
|
||||
pkg_get_current_version() {
|
||||
echo $(dart-sass --version 2>/dev/null | head -n 1 | cut -d ' ' -f 2)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
__init_dart-sass
|
||||
20
dart-sass/releases.js
Normal file
20
dart-sass/releases.js
Normal file
@@ -0,0 +1,20 @@
|
||||
'use strict';
|
||||
|
||||
var github = require('../_common/github.js');
|
||||
var owner = 'sass';
|
||||
var repo = 'dart-sass';
|
||||
|
||||
module.exports = function (request) {
|
||||
return github(request, owner, repo).then(function (all) {
|
||||
return all;
|
||||
});
|
||||
};
|
||||
|
||||
if (module === require.main) {
|
||||
module.exports(require('@root/request')).then(function (all) {
|
||||
all = require('../_webi/normalize.js')(all);
|
||||
// just select the first 5 for demonstration
|
||||
all.releases = all.releases.slice(0, 5);
|
||||
console.info(JSON.stringify(all, null, 2));
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user