🎉 initiate project *astro_rewrite*

This commit is contained in:
sindrekjelsrud 2023-07-19 21:31:30 +02:00
parent ffd4d5e86c
commit 2ba37bfbe3
8658 changed files with 2268794 additions and 2538 deletions

15
node_modules/remark-smartypants/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,15 @@
/**
* remark plugin to implement SmartyPants.
*
* @type {import('unified').Plugin<[Options?] | void[], Root>}
*/
import { Options } from "retext-smartypants";
import { Transformer } from "unified";
import { Root } from "mdast";
export { Options };
export default function remarkSmartypants(
options?: void | Options
): void | Transformer<Root, Root>;

23
node_modules/remark-smartypants/index.js generated vendored Normal file
View file

@ -0,0 +1,23 @@
/**
* @typedef {import('mdast').Root} Root
* @typedef {import('retext-smartypants').Options} Options
*/
import { retext } from 'retext'
import { visit } from 'unist-util-visit'
import smartypants from 'retext-smartypants'
/**
* remark plugin to implement SmartyPants.
*
* @type {import('unified').Plugin<[Options?] | void[], Root>}
*/
export default function remarkSmartypants(options) {
const processor = retext().use(smartypants, options)
const transformer = tree => {
visit(tree, 'text', node => {
node.value = String(processor.processSync(node.value))
})
}
return transformer
}

9
node_modules/remark-smartypants/license generated vendored Normal file
View file

@ -0,0 +1,9 @@
MIT License
Copyright (c) Matija Marohnić <matija.marohnic@gmail.com> (silvenon.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

56
node_modules/remark-smartypants/package.json generated vendored Normal file
View file

@ -0,0 +1,56 @@
{
"name": "remark-smartypants",
"description": "remark plugin to implement SmartyPants",
"version": "2.0.0",
"license": "MIT",
"files": [
"index.js",
"index.d.ts"
],
"exports": "./index.js",
"types": "./index.d.ts",
"type": "module",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/silvenon/remark-smartypants.git"
},
"author": {
"name": "Matija Marohnić",
"email": "matija.marohnic@gmail.com",
"url": "https://silvenon.com"
},
"homepage": "https://github.com/silvenon/remark-smartypants#readme",
"bugs": {
"url": "https://github.com/silvenon/remark-smartypants/issues",
"email": "matija.marohnic@gmail.com"
},
"keywords": [
"unified",
"remark",
"remark-plugin",
"smartypants",
"punctuation",
"typography",
"smart"
],
"scripts": {
"prepare": "husky install",
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules jest",
"prepublishOnly": "npm test"
},
"dependencies": {
"retext": "^8.1.0",
"retext-smartypants": "^5.1.0",
"unist-util-visit": "^4.1.0"
},
"devDependencies": {
"cross-env": "^7.0.3",
"husky": "^7.0.4",
"jest": "^27.3.1",
"prettier": "^2.4.1",
"remark": "^14.0.2"
}
}

44
node_modules/remark-smartypants/readme.md generated vendored Normal file
View file

@ -0,0 +1,44 @@
# remark-smartypants
[remark] plugin to implement [SmartyPants]. Now with 100% more ESM!
```sh
npm install remark-smartypants
```
```js
import remark from 'remark'
import smartypants from 'remakr-smartypants'
const result = await remark()
.use(smartypants)
.process('# <<Hello World!>>')
console.log(String(result))
// # «Hello World!»
```
I created this plugin because I wanted to add SmartyPants to [MDX]:
```js
import mdx from '@mdx-js/mdx'
import smartypants from 'remark-smartypants'
const result = await mdx('# <<Hello World!>>', {
remarkPlugins: [
smartypants,
],
})
```
This plugin uses [retext-smartypants](https://github.com/retextjs/retext-smartypants) under the hood, so it takes the same options:
```js
const result = await remark()
.use(smartypants, { dashes: 'oldschool' })
.process('en dash (--), em dash (---)')
```
[remark]: https://remark.js.org
[SmartyPants]: https://daringfireball.net/projects/smartypants
[MDX]: https://mdxjs.com