Skip to content

Commit

Permalink
feat: remark-nomnoml a remark plugin to create inline svg within mark…
Browse files Browse the repository at this point in the history
  • Loading branch information
airtonix committed Jun 20, 2024
1 parent 46df2fd commit 1a30caa
Show file tree
Hide file tree
Showing 37 changed files with 9,775 additions and 45 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true

# Matches multiple files with brace expansion notation
# Set default charset
[*.{ts,tsx,js}]
charset = utf-8
indent_style = space
indent_size = 2
81 changes: 81 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": [
"prettier",
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"plugins": ["@typescript-eslint", "import", "prettier"],
"ignorePatterns": [".yarn/cache/**/*", "node_modules/**/*", "dist/**"],
"overrides": [
{
"files": ["*.json"],
"parser": "jsonc-eslint-parser"
},
{
"files": ["*.ts"],
"rules": {
"no-nested-ternary": "error",
"import/no-default-export": "error",
"curly": "error",
"prefer-destructuring": [
"error",
{
"VariableDeclarator": {
"array": false,
"object": false
},
"AssignmentExpression": {
"array": false,
"object": false
}
}
],
"import/first": "error",
"import/group-exports": "error",
"import/order": [
"error",
{
"newlines-between": "always",
"groups": [
["builtin", "external"],
["parent", "internal", "sibling"],
"index",
"object"
]
}
]
}
},
{
"files": ["*.ts"],
"rules": {
"@typescript-eslint/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"fixStyle": "separate-type-imports"
}
]
}
},
{
"files": ["*.js"],
"rules": {}
},
{
"files": ["*.spec.ts"],
"env": {
"jest": true
},
"rules": {}
},
{
"files": ["tsup.config.ts", "vite.config.ts", "*.d.ts"],
"rules": {
"import/no-default-export": "off"
}
}
]
}
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
8 changes: 5 additions & 3 deletions .github/actions/setup-npm-publish/create-npmrc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ fi
domain="${1//http:\/\//}"
domain="${domain//https:\/\//}"

echo "//${domain}/:_authToken=\${NPM_AUTH_TOKEN}" >"$2"
echo "registry=${1}" >>"$2"
echo "always-auth=true" >>"$2"
echo """
//${domain}/:_authToken=\${NPM_AUTH_TOKEN}
registry=${1}
always-auth=true
""" >>"$2"
8 changes: 6 additions & 2 deletions .github/actions/setup-tooling/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ runs:
shell: bash
id: cache
run: |
if [ "${{ env.ACT }}" = "true" ]; then
if [ "${{ env.ACT }}" = "true" ]; then
echo "OFFLINE: no cache"
echo "cache-hit=false" >> $GITHUB_OUTPUT
elif [ "${{ steps.online-asdf-cache.outputs.cache-hit }}" = "true" ]; then
elif [ "${{ steps.online-asdf-cache.outputs.cache-hit }}" = "true" ]; then
echo "ONLINE: cache available"
echo "cache-hit=${{ steps.online-asdf-cache.outputs.cache-hit }}" >> $GITHUB_OUTPUT
fi
Expand All @@ -58,6 +58,10 @@ runs:
SETUP_COMMAND: ${{inputs.SetupCommand}}
run: ${SETUP_COMMAND}

- name: asdf BOM
shell: bash
run: asdf current

- name: set asdf path
shell: bash
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/setup-yarn/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ runs:
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
key: ${{ runner.os }}-${{ hashFiles('.tool-versions') }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-${{ hashFiles('.tool-versions') }}-yarn-
- name: yarn install
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
run: just lint

- name: test
run: just test
run: |
just unittest
just build
just integrationtest
- name: docs
run: just docs

- name: build
run: just build
13 changes: 4 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,20 @@ jobs:
- name: Yarn
uses: ./.github/actions/setup-yarn

- name: Configure Publishing
uses: ./.github/actions/setup-npm-publish
with:
NpmRegistryUrl: https://registry.npmjs.org/
NpmRcFile: .npmrc

- name: Preflight
run: |
just lint
just types
just test
just unittest
just build
just integrationtest
- if: ${{ needs.Process.outputs.releases_created == 'true' }}
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: just stage=production publish
run: just publish latest

- if: ${{ needs.Process.outputs.prs_created == 'true' }}
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: just stage=development publish
run: just publish next
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
dist
tmp
/out-tsc

# dependencies
node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
.yarn/cache

# System Files
.DS_Store
Thumbs.db
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
yarn lint-staged
2 changes: 2 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
yarn install --immutable
3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.ts": "eslint"
}
5 changes: 4 additions & 1 deletion .plugin-versions
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
act https://github.com/grimoh/asdf-act.git adf8e44
action-validator https://github.com/mpalmer/action-validator.git 8df3ccb
direnv https://github.com/asdf-community/asdf-direnv.git a2219c2
jq https://github.com/lsanwick/asdf-jq.git addae51
just https://github.com/olofvndrhr/asdf-just.git 93771e1
nodejs https://github.com/asdf-vm/asdf-nodejs.git c5b7c40
shellcheck https://github.com/luizm/asdf-shellcheck.git 780d78d
shfmt https://github.com/luizm/asdf-shfmt.git a42c5ff
yarn https://github.com/twuni/asdf-yarn.git 376c540
just https://github.com/olofvndrhr/asdf-just.git 93771e1
yq https://github.com/sudermanjr/asdf-yq.git 772992f
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"singleQuote": true,
"semi": true,
"singleAttributePerLine": true,
"printWidth": 80
}
120 changes: 120 additions & 0 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"version": "1.4.0",
"plugins_used": [
{
"name": "ArtifactoryDetector"
},
{
"name": "AWSKeyDetector"
},
{
"name": "AzureStorageKeyDetector"
},
{
"name": "Base64HighEntropyString",
"limit": 4.5
},
{
"name": "BasicAuthDetector"
},
{
"name": "CloudantDetector"
},
{
"name": "DiscordBotTokenDetector"
},
{
"name": "GitHubTokenDetector"
},
{
"name": "HexHighEntropyString",
"limit": 3.0
},
{
"name": "IbmCloudIamDetector"
},
{
"name": "IbmCosHmacDetector"
},
{
"name": "JwtTokenDetector"
},
{
"name": "KeywordDetector",
"keyword_exclude": ""
},
{
"name": "MailchimpDetector"
},
{
"name": "NpmDetector"
},
{
"name": "PrivateKeyDetector"
},
{
"name": "SendGridDetector"
},
{
"name": "SlackDetector"
},
{
"name": "SoftlayerDetector"
},
{
"name": "SquareOAuthDetector"
},
{
"name": "StripeDetector"
},
{
"name": "TwilioKeyDetector"
}
],
"filters_used": [
{
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
},
{
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
"min_level": 2
},
{
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
},
{
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
},
{
"path": "detect_secrets.filters.heuristic.is_lock_file"
},
{
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
},
{
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
},
{
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
},
{
"path": "detect_secrets.filters.heuristic.is_sequential_string"
},
{
"path": "detect_secrets.filters.heuristic.is_swagger_file"
},
{
"path": "detect_secrets.filters.heuristic.is_templated_secret"
},
{
"path": "detect_secrets.filters.regex.should_exclude_file",
"pattern": [
".yarn/cache",
"tsconfig.tsbuildinfo",
"release-please-config"
]
}
],
"results": {},
"generated_at": "2024-02-29T22:21:08Z"
}
Loading

0 comments on commit 1a30caa

Please sign in to comment.