This repository has been archived by the owner on Nov 20, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
8 changed files
with
199 additions
and
2 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,3 @@ | ||
# code-highlight | ||
|
||
repack Prismjs to make it compatible with esm |
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,12 @@ | ||
module.exports = { | ||
plugins: [ | ||
[ | ||
'prismjs', | ||
{ | ||
languages: ['javascript', 'css', 'markup', 'typescript', 'php', 'python'], | ||
theme: 'default', | ||
css: true, | ||
}, | ||
], | ||
], | ||
} |
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,27 @@ | ||
{ | ||
"name": "@storipress/code-highlight", | ||
"packageManager": "[email protected]", | ||
"exports": { | ||
".": { | ||
"types": "./dist/code-highlight.d.ts", | ||
"import": "./dist/code-highlight.mjs" | ||
} | ||
}, | ||
"scripts": { | ||
"build": "vite build", | ||
"prepack": "yarn build", | ||
"lint": "eslint .", | ||
"release": "yarn run lint && yarn run prepack && changelogen --release && yarn npm publish && git push --follow-tags" | ||
}, | ||
"dependencies": { | ||
"@types/prismjs": "^1.26.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.22.20", | ||
"babel-plugin-prismjs": "^2.1.0", | ||
"changelogen": "0.5.5", | ||
"eslint": "^8.49.0", | ||
"vite": "^4.4.9", | ||
"vite-plugin-babel": "^1.1.3" | ||
} | ||
} |
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 @@ | ||
export * from 'prismjs' |
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,3 @@ | ||
import Prism from 'prismjs' | ||
|
||
export default Prism |
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,21 @@ | ||
import { defineConfig } from 'vite' | ||
import Babel from 'vite-plugin-babel' | ||
|
||
export default defineConfig({ | ||
build: { | ||
lib: { | ||
entry: './src/index.js', | ||
formats: ['es'], | ||
}, | ||
rollupOptions: { | ||
output: { | ||
assetFileNames: 'code-highlight.css', | ||
}, | ||
}, | ||
}, | ||
plugins: [ | ||
Babel({ | ||
filter: /\.(js|jsx|ts|tsx)$/, | ||
}), | ||
], | ||
}) |
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 |
---|---|---|
|
@@ -228,4 +228,4 @@ | |
"access": "public" | ||
}, | ||
"gitHead": "8df1f4d5837a7e2ddbff6cc79f5fec256c34a394" | ||
} | ||
} |
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