move from dart-sass to just sass
authorAJ ONeal <aj@therootcompany.com>
Thu, 11 Feb 2021 19:26:29 +0000 (19:26 +0000)
committerAJ ONeal <aj@therootcompany.com>
Thu, 11 Feb 2021 19:26:29 +0000 (19:26 +0000)
dart-sass/README.md [deleted file]
dart-sass/install.ps1 [deleted file]
dart-sass/install.sh [deleted file]
dart-sass/releases.js [deleted file]
sass/README.md [new file with mode: 0644]
sass/install.ps1 [new file with mode: 0644]
sass/install.sh [new file with mode: 0644]
sass/releases.js [new file with mode: 0644]

diff --git a/dart-sass/README.md b/dart-sass/README.md
deleted file mode 100644 (file)
index 1c1f74b..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
----
-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.                     |
\ No newline at end of file
diff --git a/dart-sass/install.ps1 b/dart-sass/install.ps1
deleted file mode 100644 (file)
index 434eede..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/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
diff --git a/dart-sass/install.sh b/dart-sass/install.sh
deleted file mode 100644 (file)
index 600c9ec..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/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"
-
-    # no ./bin dir here because of how the macOS version is packaged
-    pkg_src_cmd="$HOME/.local/opt/dart-sass-v$WEBI_VERSION/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() {
-        # moves everything, for macOS' sake
-        mkdir -p "$pkg_src_dir"
-        mv ./dart-sass/* "$pkg_src_dir"
-    }
-
-    pkg_get_current_version() {
-        echo $(dart-sass --version 2>/dev/null | head -n 1 | cut -d ' ' -f 2)
-    }
-
-}
-
-__init_dart-sass
diff --git a/dart-sass/releases.js b/dart-sass/releases.js
deleted file mode 100644 (file)
index da440a9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-'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));
-  });
-}
diff --git a/sass/README.md b/sass/README.md
new file mode 100644 (file)
index 0000000..1c1f74b
--- /dev/null
@@ -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.                     |
\ No newline at end of file
diff --git a/sass/install.ps1 b/sass/install.ps1
new file mode 100644 (file)
index 0000000..434eede
--- /dev/null
@@ -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
diff --git a/sass/install.sh b/sass/install.sh
new file mode 100644 (file)
index 0000000..600c9ec
--- /dev/null
@@ -0,0 +1,34 @@
+#!/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"
+
+    # no ./bin dir here because of how the macOS version is packaged
+    pkg_src_cmd="$HOME/.local/opt/dart-sass-v$WEBI_VERSION/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() {
+        # moves everything, for macOS' sake
+        mkdir -p "$pkg_src_dir"
+        mv ./dart-sass/* "$pkg_src_dir"
+    }
+
+    pkg_get_current_version() {
+        echo $(dart-sass --version 2>/dev/null | head -n 1 | cut -d ' ' -f 2)
+    }
+
+}
+
+__init_dart-sass
diff --git a/sass/releases.js b/sass/releases.js
new file mode 100644 (file)
index 0000000..da440a9
--- /dev/null
@@ -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));
+  });
+}