Skip to content

Commit

Permalink
Merge pull request #6 from inkdropapp/remark-module
Browse files Browse the repository at this point in the history
Make it a remark module
  • Loading branch information
craftzdog authored Mar 6, 2024
2 parents 5030483 + 8df113f commit c90ae68
Show file tree
Hide file tree
Showing 27 changed files with 5,103 additions and 5,757 deletions.
11 changes: 0 additions & 11 deletions .editorconfig

This file was deleted.

1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
19 changes: 19 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
root: true
extends:
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
- prettier
parser: '@typescript-eslint/parser'
parserOptions:
ecmaVersion: 2022
sourceType: 'module'
rules:
no-useless-escape: 0
'@typescript-eslint/no-explicit-any': 0
'@typescript-eslint/no-unused-vars':
- 2
- argsIgnorePattern: ^_
varsIgnorePattern: ^_
'@typescript-eslint/ban-ts-comment': 0
'@typescript-eslint/no-this-alias': 0
'@typescript-eslint/no-var-requires': 0
45 changes: 19 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
name: Node.js CI

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x

- run: npm ci

- run: npm run lint

- run: npm run prettier-check
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
- run: npm install
- run: npm run format:check
- run: npm run lint
- run: npm run test
- name: Check ESM module resolution
run: npx @arethetypeswrong/cli --ignore-rules cjs-resolves-to-esm --pack
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
npm-debug.log
node_modules
node_modules
dist
137 changes: 137 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp
.cache

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# IDE
.idea/
.vscode/

# Lock files
pnpm-lock.yaml
10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"arrowParens": "avoid",
"singleQuote": true,
"bracketSpacing": true,
"endOfLine": "lf",
"semi": false,
"tabWidth": 2,
"trailingComma": "none",
"plugins": ["prettier-plugin-organize-imports"]
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# remark-gfm-blockquote-admonitions
# remark-github-beta-blockquote-admonitions

Based on [remark-github-beta-blockquote-admonitions](https://github.com/myl7/remark-github-beta-blockquote-admonitions/)

Changes made:

- Replaced the config with a new one that is compatible with this plugin.
- Admonitions cannot be nested.
- Added a icon to the title.


License:

```TEXT
Expand Down Expand Up @@ -213,5 +213,3 @@ License:
See the License for the specific language governing permissions and
limitations under the License.
```


22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ If you want to change the color of the admonitions, you can do so by adding the

```css
:root {
--gfm-blockquote-admonitions-note: #2f81f7;
--gfm-blockquote-admonitions-tip: #3fb950;
--gfm-blockquote-admonitions-important: #a371f7;
--gfm-blockquote-admonitions-warning: #d29922;
--gfm-blockquote-admonitions-caution: #f85149;
--gfm-alert-note: #2f81f7;
--gfm-alert-tip: #3fb950;
--gfm-alert-important: #a371f7;
--gfm-alert-warning: #d29922;
--gfm-alert-caution: #f85149;
}
```

Expand All @@ -52,7 +52,7 @@ In this example, the colors of the admonitions are changed to the colors of GitH
## Install

```bash
ipm install gfm-blockquote-admonitions
npm i @inkdropapp/remark-gfm-alerts
```

## Contact
Expand All @@ -65,17 +65,17 @@ If you find a bug, you can also submit it to me by opening an [issue on Github](

### v1.2.0 - New types

- Added support for `TIP` and `CAUTION` admonitions.
- Added support for `TIP` and `CAUTION` admonitions.

### v1.1.0 - Theme support

- Admonitions adjust their color based on the currently activated theme. (Thanks [@fus1ondev](https://github.com/fus1ondev))
- Admonitions adjust their color based on the currently activated theme. (Thanks [@fus1ondev](https://github.com/fus1ondev))

### v1.0.0 - Initial release

- Render admonitions in preview mode - [GitHub beta blockquote-based admonitions](https://github.com/orgs/community/discussions/16925)
- Render admonitions in preview mode - [GitHub beta blockquote-based admonitions](https://github.com/orgs/community/discussions/16925)

## Acknowledgements

- Remark Plugin based on [remark-github-beta-blockquote-admonitions](https://github.com/myl7/remark-github-beta-blockquote-admonitions/) - [see](./src/remark-gfm-blockquote-admonitions/README.md) (Apache-2.0 License)
- [primer/octicons](https://github.com/primer/octicons) (MIT License)
- Remark Plugin based on [remark-github-beta-blockquote-admonitions](https://github.com/myl7/remark-github-beta-blockquote-admonitions/) - [see](./src/remark-gfm-blockquote-admonitions/README.md) (Apache-2.0 License)
- [primer/octicons](https://github.com/primer/octicons) (MIT License)
Loading

0 comments on commit c90ae68

Please sign in to comment.