rn-shiki 0.0.23 → 0.0.24
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/index.js +5 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/vendor/shiki/index.d.js +20 -0
- package/lib/commonjs/vendor/shiki/index.d.js.map +1 -0
- package/lib/commonjs/vendor/shiki/index.js +10 -0
- package/lib/commonjs/vendor/shiki/index.js.map +1 -0
- package/lib/commonjs/vendor/shiki/manifest.json +365 -365
- package/lib/typescript/index.d.ts +3 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/scripts/build.js +29 -0
- package/src/vendor/shiki/index.d.ts +7 -0
- package/src/vendor/shiki/index.js +8 -0
- package/src/vendor/shiki/manifest.json +365 -365
@@ -1,3 +1,5 @@
|
|
1
|
-
|
1
|
+
import SyntaxHighlighter from './components/syntax/SyntaxHighlighter';
|
2
|
+
import SyntaxLine from './components/syntax/SyntaxLine';
|
2
3
|
export * from './types/shiki';
|
4
|
+
export { SyntaxHighlighter, SyntaxLine };
|
3
5
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,uCAAuC,CAAA;AACrE,OAAO,UAAU,MAAM,gCAAgC,CAAA;AAEvD,cAAc,eAAe,CAAA;AAE7B,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAA"}
|
package/package.json
CHANGED
package/scripts/build.js
CHANGED
@@ -170,6 +170,33 @@ const modules = [
|
|
170
170
|
...themeFiles,
|
171
171
|
]
|
172
172
|
|
173
|
+
function createVendorIndex() {
|
174
|
+
const vendorIndexPath = path.join(VENDOR_DIR, 'index.js')
|
175
|
+
const vendorIndexContent = `\
|
176
|
+
"use strict";
|
177
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
178
|
+
|
179
|
+
exports.createHighlighterCore = require('./core/core').createHighlighterCore;
|
180
|
+
exports.createJavaScriptRegexEngine = require('./core/engine-javascript').createJavaScriptRegexEngine;
|
181
|
+
|
182
|
+
exports.themes = {};
|
183
|
+
exports.languages = {};
|
184
|
+
`
|
185
|
+
fs.writeFileSync(vendorIndexPath, vendorIndexContent)
|
186
|
+
|
187
|
+
const vendorDtsPath = path.join(VENDOR_DIR, 'index.d.ts')
|
188
|
+
const vendorDtsContent = `\
|
189
|
+
import type { ThemeInput, LanguageInput } from 'shiki'
|
190
|
+
|
191
|
+
export { createHighlighterCore } from './core/core'
|
192
|
+
export { createJavaScriptRegexEngine } from './core/engine-javascript'
|
193
|
+
|
194
|
+
export declare const themes: Record<string, ThemeInput>
|
195
|
+
export declare const languages: Record<string, LanguageInput>
|
196
|
+
`
|
197
|
+
fs.writeFileSync(vendorDtsPath, vendorDtsContent)
|
198
|
+
}
|
199
|
+
|
173
200
|
// Initialize manifest
|
174
201
|
const manifest = {
|
175
202
|
version: JSON.parse(fs.readFileSync(path.join(__dirname, '../node_modules/shiki/package.json'), 'utf8')).version,
|
@@ -226,5 +253,7 @@ for (const module of modules) {
|
|
226
253
|
}
|
227
254
|
}
|
228
255
|
|
256
|
+
createVendorIndex()
|
257
|
+
|
229
258
|
// Write manifest
|
230
259
|
fs.writeFileSync(path.join(VENDOR_DIR, 'manifest.json'), JSON.stringify(manifest, null, 2))
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import type { ThemeInput, LanguageInput } from 'shiki'
|
2
|
+
|
3
|
+
export { createHighlighterCore } from './core/core'
|
4
|
+
export { createJavaScriptRegexEngine } from './core/engine-javascript'
|
5
|
+
|
6
|
+
export declare const themes: Record<string, ThemeInput>
|
7
|
+
export declare const languages: Record<string, LanguageInput>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
|
4
|
+
exports.createHighlighterCore = require('./core/core').createHighlighterCore;
|
5
|
+
exports.createJavaScriptRegexEngine = require('./core/engine-javascript').createJavaScriptRegexEngine;
|
6
|
+
|
7
|
+
exports.themes = {};
|
8
|
+
exports.languages = {};
|