-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d349d5
commit 72cdd5f
Showing
22 changed files
with
202 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
'islandjs': patch | ||
'@islandjs/plugin-backtop': patch | ||
'@islandjs/plugin-check-links': patch | ||
'@islandjs/plugin-search': patch | ||
--- | ||
|
||
init check links plugin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export { routeService } from './plugin-routes'; | ||
export { isProduction } from './constants'; | ||
export { routeService, normalizeRoutePath } from './plugin-routes'; | ||
export { defineConfig } from './config'; | ||
export type { IslandPlugin } from 'shared/types/Plugin'; | ||
export * from '../shared/types/index'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
**/dist/** | ||
**/node_modules/** | ||
**/package.json | ||
*.d.ts | ||
.eslintrc.cjs | ||
**/tsconfig.json | ||
**/tsconfig.base.json | ||
turbo.json | ||
vendors | ||
**/__tests__/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# @islandjs/plugin-check-links | ||
|
||
[![npm version](https://badge.fury.io/js/%40islandjs%2Fplugin-check-links.svg)](https://badge.fury.io/js/%40islandjs%2Fplugin-check-links) | ||
|
||
A plugin for [Island.js](https://github.com/sanyuan0704/island.js) to check links in markdown files. | ||
|
||
## Install | ||
|
||
```bash | ||
# npm | ||
npm install @islandjs/plugin-check-links | ||
# yarn | ||
yarn add @islandjs/plugin-check-links | ||
# pnpm | ||
pnpm install @islandjs/plugin-check-links | ||
``` | ||
|
||
## Usage | ||
|
||
```js | ||
// .island/config.ts | ||
import { pluginCheckLinks } from '@islandjs/plugin-check-links'; | ||
import { defineConfig } from 'islandjs'; | ||
|
||
export default defineConfig({ | ||
plugins: [pluginCheckLinks()] | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"name": "@islandjs/plugin-check-links", | ||
"version": "0.6.3", | ||
"description": "Dead links check plugin for islandjs", | ||
"packageManager": "pnpm@7.9.2", | ||
"type": "module", | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs" | ||
}, | ||
"./dist/*": "./dist/*", | ||
"./package.json": "./package.json" | ||
}, | ||
"scripts": { | ||
"pnpm-install": "pnpm install", | ||
"dev": "tsup --watch --format=cjs,esm", | ||
"build": "cross-env NODE_ENV=production tsup --format=cjs,esm", | ||
"prepublishOnly": "pnpm build", | ||
"release": "release-it" | ||
}, | ||
"keywords": [ | ||
"vite", | ||
"ssg", | ||
"island architecture", | ||
"docs", | ||
"framework" | ||
], | ||
"author": "Sanyuan0704", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@types/lodash-es": "^4.17.6", | ||
"@types/node": "^18.11.7", | ||
"@types/react": "^18.0.17", | ||
"@types/react-dom": "^18.0.6", | ||
"@unocss/preset-attributify": "^0.45.26", | ||
"react": "^18.2.0" | ||
}, | ||
"peerDependencies": { | ||
"islandjs": "*" | ||
}, | ||
"files": [ | ||
"dist", | ||
"src", | ||
"README.md" | ||
], | ||
"lint-staged": { | ||
"**/*.{js,jsx,tsx,ts,json}": [ | ||
"eslint --fix" | ||
] | ||
}, | ||
"dependencies": { | ||
"check-links": "^1.1.8", | ||
"ora": "^6.1.2", | ||
"unified": "^10.1.2", | ||
"unist-util-visit": "^4.1.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { IslandPlugin } from 'islandjs/plugin'; | ||
import { remarkCheckDeadLinks } from './remarkPlugin'; | ||
|
||
export interface DeadLinkCheckOptions { | ||
exclude?: (string | RegExp)[]; | ||
timeout?: number; | ||
} | ||
|
||
export function pluginCheckLinks( | ||
options: DeadLinkCheckOptions = {} | ||
): IslandPlugin { | ||
return { | ||
name: 'island:plugin-check-links', | ||
markdown: { | ||
remarkPlugins: [[remarkCheckDeadLinks, options]] | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
declare module 'check-links'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": "../../tsconfig.base.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"baseUrl": "src", | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { defineConfig } from 'tsup'; | ||
|
||
export default defineConfig([ | ||
{ | ||
entry: ['src/index.ts'], | ||
minifyIdentifiers: false, | ||
bundle: true, | ||
dts: true, | ||
sourcemap: true, | ||
splitting: true, | ||
minify: process.env.NODE_ENV === 'production', | ||
skipNodeModulesBundle: true, | ||
outDir: 'dist', | ||
clean: true, | ||
shims: true | ||
} | ||
]); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
72cdd5f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
island – ./
island-git-master-sanyuan0704.vercel.app
island-vercel.sanyuan0704.top
island-navy.vercel.app
island-sanyuan0704.vercel.app