Skip to content

Commit

Permalink
Updated dep, changed perms of output
Browse files Browse the repository at this point in the history
  • Loading branch information
Nassim Zen committed Nov 7, 2022
1 parent 4cec5a0 commit 51b9d0a
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ jobs:
uses: actions/checkout@v2

- name: Setup Deno
# uses: denoland/setup-deno@v1

uses: denoland/setup-deno@004814556e37c54a2f6e31384c9e18e983317366
with:
deno-version: v1.x

# Uncomment this step to verify the use of 'deno fmt' on each commit.
- name: Verify formatting
run: deno fmt --check
run: deno fmt --check --unstable

- name: Run linter
run: deno lint
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ don't know how good it can handle things..
I know that there are some errors that might now be shown at compile time, but
no crash so far.

## > ⚠️ This module will soon be re-writen with a new external library called Rsass, it will also be using FFI for the Deno port and a smaller version in WebAssembly for browsers.

## Command line

```bash
Expand Down
8 changes: 4 additions & 4 deletions cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*/
import sass from "./mod.ts";
import { SassFormats } from "./src/types/module.types.ts";
import { parse as CMDParse } from "https://deno.land/std@0.125.0/flags/mod.ts";
import { readAll } from "https://deno.land/std/streams/conversion.ts ";
import { parse as CMDParse } from "https://deno.land/std@0.162.0/flags/mod.ts";
import { readAll } from "https://deno.land/std@0.162.0/streams/conversion.ts";
const readPerm = { name: "read" } as const;
const writePerm = { name: "write" } as const;
const envPerm = { name: "env" } as const;
Expand Down Expand Up @@ -57,7 +57,7 @@ if (import.meta.main) {
});

if (command === "compile") {
const format = parsed.f || parsed.format || undefined;
const format = <SassFormats>parsed.f || parsed.format || undefined;
const outdir = parsed.o || parsed.out || undefined;
const filename = parsed.n || parsed.name || undefined;
const paths = parsed.p || parsed.paths || undefined;
Expand All @@ -74,7 +74,7 @@ if (import.meta.main) {
const sass_result = sass(stdin, {
load_paths: include_paths,
quiet: true,
style: format,
style: format ?? "compressed",
});
if (outdir) {
sass_result.to_file({
Expand Down
47 changes: 47 additions & 0 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/deps.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export * as denosass from './wasm/grass.deno.js';
export * from 'https://deno.land/std@0.131.0/testing/asserts.ts';
export * from 'https://deno.land/std@0.162.0/testing/asserts.ts';
export {
emptyDirSync,
ensureDirSync,
walkSync,
} from 'https://deno.land/std@0.131.0/fs/mod.ts';
export * as path from 'https://deno.land/std@0.131.0/path/mod.ts';
} from 'https://deno.land/std@0.162.0/fs/mod.ts';
export * as path from 'https://deno.land/std@0.162.0/path/mod.ts';
8 changes: 4 additions & 4 deletions src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class Sass implements SassObject {
typeof ParsedCSs !== 'string'
? this.decoder.decode(ParsedCSs)
: ParsedCSs,
{ append: true, create: true, mode: 644 },
{ append: true, create: true, mode: 776 },
);
});
} else {
Expand All @@ -241,7 +241,7 @@ class Sass implements SassObject {
typeof this.output !== 'string'
? this.decoder.decode(this.output)
: this.output,
{ append: false, create: true, mode: 644 },
{ append: false, create: true, mode: 776 },
);
}
} else {
Expand All @@ -262,7 +262,7 @@ class Sass implements SassObject {
typeof ParsedCSs !== 'string'
? this.decoder.decode(ParsedCSs)
: ParsedCSs,
{ append: false, create: true, mode: 644 },
{ append: false, create: true, mode: 776 },
);
});
} else {
Expand All @@ -281,7 +281,7 @@ class Sass implements SassObject {
typeof this.output !== 'string'
? this.decoder.decode(this.output)
: this.output,
{ append: false, create: true, mode: 644 },
{ append: false, create: true, mode: 776 },
);
}
}
Expand Down

0 comments on commit 51b9d0a

Please sign in to comment.