Skip to content

Commit

Permalink
Merge pull request #12 from wkillerud/dual-exports
Browse files Browse the repository at this point in the history
Dual exports
  • Loading branch information
wkillerud authored Feb 8, 2024
2 parents 717a59c + 1bec12b commit 1e3f32f
Show file tree
Hide file tree
Showing 45 changed files with 11,320 additions and 9,148 deletions.
46 changes: 23 additions & 23 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:prettier/recommended"
],
"plugins": ["@typescript-eslint", "prettier", "import"],
"rules": {
"import/no-unresolved": "off",
"import/order": [
"error",
{
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "never"
}
]
}
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:prettier/recommended"
],
"plugins": ["@typescript-eslint", "prettier", "import"],
"rules": {
"import/no-unresolved": "off",
"import/order": [
"error",
{
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "never"
}
]
}
}
6 changes: 3 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
version: [16, 18, 19]
version: [20]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}

Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Release
on:
push:
branches:
- main

permissions:
contents: read # for checkout

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: Install dependencies
run: npm clean-install

- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"trailingComma": "all"
"trailingComma": "all",
"useTabs": true
}
10 changes: 5 additions & 5 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"recommendations": [
"bierner.comment-tagged-templates",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
]
"recommendations": [
"bierner.comment-tagged-templates",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
]
}
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ import fs from "node:fs/promises";
import { parse } from "scss-sassdoc-parser";

export async function doParse(path: string | string[]): Promise<ParseResult[]> {
const paths = Array.isArray(path) ? path : [path];
const result = await Promise.all(
paths.map(async (src) => {
const code = await fs.readFile(src, "utf-8");
return await parse(code);
}),
);
return result.flat();
const paths = Array.isArray(path) ? path : [path];
const result = await Promise.all(
paths.map(async (src) => {
const code = await fs.readFile(src, "utf-8");
return await parse(code);
}),
);
return result.flat();
}

const singlePathResult = await doParse("_helpers.scss");
Expand Down
Loading

0 comments on commit 1e3f32f

Please sign in to comment.