@readme/syntax-highlighter 15.0.3 → 16.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -47606
- package/dist/index.js.LICENSE.txt +66 -0
- package/dist/index.node.js +1 -394
- package/package.json +8 -5
- package/.babelrc +0 -13
- package/LICENSES +0 -23
- package/knip.ts +0 -22
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -7
- package/public/index.js +0 -170
- package/public/index.legacy.js +0 -169
- package/src/codeEditor/cm.options.ts +0 -11
- package/src/codeEditor/index.tsx +0 -55
- package/src/codeEditor/style.scss +0 -6
- package/src/codeMirror/index.jsx +0 -260
- package/src/codeMirror/style.scss +0 -104
- package/src/index.js +0 -68
- package/src/index.node.ts +0 -5
- package/src/utils/canonical.ts +0 -65
- package/src/utils/cm-mode-imports.js +0 -33
- package/src/utils/index.ts +0 -5
- package/src/utils/modes/solidity.js +0 -605
- package/src/utils/modes.ts +0 -104
- package/src/utils/uppercase.ts +0 -111
- package/tsconfig.json +0 -13
- package/webpack.config.dev.js +0 -45
- package/webpack.config.js +0 -80
package/src/utils/uppercase.ts
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
const codeTypes = {
|
|
2
|
-
asp: 'ASP.NET',
|
|
3
|
-
aspx: 'ASP.NET',
|
|
4
|
-
bash: 'Bash',
|
|
5
|
-
c: 'C',
|
|
6
|
-
'c#': 'C#',
|
|
7
|
-
'c++': 'C++',
|
|
8
|
-
coffeescript: 'CoffeeScript',
|
|
9
|
-
clj: 'Clojure',
|
|
10
|
-
cljc: 'Clojure',
|
|
11
|
-
cljx: 'Clojure',
|
|
12
|
-
clojure: 'Clojure',
|
|
13
|
-
cplusplus: 'C++',
|
|
14
|
-
cpp: 'C++',
|
|
15
|
-
cql: 'Cassandra',
|
|
16
|
-
cs: 'C#',
|
|
17
|
-
csharp: 'C#',
|
|
18
|
-
css: 'CSS',
|
|
19
|
-
curl: 'cURL',
|
|
20
|
-
d: 'D',
|
|
21
|
-
dart: 'Dart',
|
|
22
|
-
diff: 'Diff',
|
|
23
|
-
dockerfile: 'Dockerfile',
|
|
24
|
-
ecmascript: 'ECMAScript',
|
|
25
|
-
erl: 'Erlang',
|
|
26
|
-
erlang: 'Erlang',
|
|
27
|
-
go: 'Go',
|
|
28
|
-
gql: 'GraphQL',
|
|
29
|
-
gradle: 'Gradle',
|
|
30
|
-
graphql: 'GraphQL',
|
|
31
|
-
groovy: 'Groovy',
|
|
32
|
-
handlebars: 'Handlebars',
|
|
33
|
-
hbs: 'Handlebars',
|
|
34
|
-
haml: 'HAML',
|
|
35
|
-
haxe: 'Haxe',
|
|
36
|
-
html: 'HTML',
|
|
37
|
-
http: 'HTTP',
|
|
38
|
-
java: 'Java',
|
|
39
|
-
javascript: 'JavaScript',
|
|
40
|
-
jinja2: 'Jinja2',
|
|
41
|
-
jl: 'Julia',
|
|
42
|
-
jruby: 'JRuby',
|
|
43
|
-
js: 'JavaScript',
|
|
44
|
-
json: 'JSON',
|
|
45
|
-
jsx: 'JSX',
|
|
46
|
-
julia: 'Julia',
|
|
47
|
-
kotlin: 'Kotlin',
|
|
48
|
-
kt: 'Kotlin',
|
|
49
|
-
less: 'LESS',
|
|
50
|
-
liquid: 'Liquid',
|
|
51
|
-
lua: 'Lua',
|
|
52
|
-
macruby: 'MacRuby',
|
|
53
|
-
markdown: 'Markdown',
|
|
54
|
-
md: 'Markdown',
|
|
55
|
-
mermaid: 'Mermaid', // syntax highlighting not supported yet
|
|
56
|
-
ml: 'OCaml',
|
|
57
|
-
mssql: 'SQL Server',
|
|
58
|
-
mysql: 'MySQL',
|
|
59
|
-
node: 'Node',
|
|
60
|
-
objc: 'Objective-C',
|
|
61
|
-
'objc++': 'Objective-C++',
|
|
62
|
-
objcpp: 'Objective-C++',
|
|
63
|
-
objectivec: 'Objective-C',
|
|
64
|
-
objectivecpp: 'Objective-C++',
|
|
65
|
-
objectivecplusplus: 'Objective-C++',
|
|
66
|
-
ocaml: 'OCaml',
|
|
67
|
-
perl: 'Perl',
|
|
68
|
-
php: 'PHP',
|
|
69
|
-
pl: 'Perl',
|
|
70
|
-
pgsql: 'PL/pgSQL',
|
|
71
|
-
plsql: 'PL/SQL',
|
|
72
|
-
postgres: 'PostgreSQL',
|
|
73
|
-
postgresql: 'PostgreSQL',
|
|
74
|
-
powershell: 'PowerShell',
|
|
75
|
-
ps1: 'PowerShell',
|
|
76
|
-
python: 'Python',
|
|
77
|
-
py: 'Python',
|
|
78
|
-
r: 'R',
|
|
79
|
-
rake: 'Rake',
|
|
80
|
-
rb: 'Ruby',
|
|
81
|
-
rbx: 'Rubinius',
|
|
82
|
-
rs: 'Rust',
|
|
83
|
-
ruby: 'Ruby',
|
|
84
|
-
rust: 'Rust',
|
|
85
|
-
sass: 'Sass',
|
|
86
|
-
scala: 'Scala',
|
|
87
|
-
scss: 'SCSS',
|
|
88
|
-
sh: 'Shell',
|
|
89
|
-
shell: 'Shell',
|
|
90
|
-
smarty: 'Smarty',
|
|
91
|
-
solidity: 'Solidity',
|
|
92
|
-
sql: 'SQL',
|
|
93
|
-
sqlite: 'SQLite',
|
|
94
|
-
stylus: 'Stylus',
|
|
95
|
-
styl: 'Stylus',
|
|
96
|
-
swift: 'Swift',
|
|
97
|
-
text: 'Text',
|
|
98
|
-
toml: 'TOML',
|
|
99
|
-
twig: 'Twig',
|
|
100
|
-
typescript: 'TypeScript',
|
|
101
|
-
xhtml: 'XHTML',
|
|
102
|
-
xml: 'XML',
|
|
103
|
-
yaml: 'YAML',
|
|
104
|
-
yml: 'YAML',
|
|
105
|
-
zsh: 'Zsh',
|
|
106
|
-
} as const;
|
|
107
|
-
|
|
108
|
-
export default function uppercase(language: string) {
|
|
109
|
-
if (language in codeTypes) return codeTypes[language as keyof typeof codeTypes];
|
|
110
|
-
return language;
|
|
111
|
-
}
|
package/tsconfig.json
DELETED
package/webpack.config.dev.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// oxlint-disable typescript/no-require-imports
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const HtmlWebPackPlugin = require('html-webpack-plugin');
|
|
5
|
-
|
|
6
|
-
module.exports = {
|
|
7
|
-
mode: 'development',
|
|
8
|
-
entry: [['16', '18'].includes(process.env.REACT_VERSION) ? './public/index.legacy.js' : './public.index.js'],
|
|
9
|
-
module: {
|
|
10
|
-
rules: [
|
|
11
|
-
{
|
|
12
|
-
test: /\.js(x?)$/,
|
|
13
|
-
use: {
|
|
14
|
-
loader: 'babel-loader',
|
|
15
|
-
options: {
|
|
16
|
-
extends: './.babelrc',
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
test: /\.s?css$/,
|
|
22
|
-
use: ['style-loader', 'css-loader', 'sass-loader'],
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
},
|
|
26
|
-
output: {
|
|
27
|
-
path: path.resolve(__dirname, 'dist'),
|
|
28
|
-
filename: 'index.js',
|
|
29
|
-
publicPath: '/',
|
|
30
|
-
},
|
|
31
|
-
resolve: {
|
|
32
|
-
extensions: ['.js', '.jsx'],
|
|
33
|
-
},
|
|
34
|
-
plugins: [
|
|
35
|
-
new HtmlWebPackPlugin({
|
|
36
|
-
template: path.resolve(__dirname, 'public/index.html'),
|
|
37
|
-
filename: 'index.html',
|
|
38
|
-
}),
|
|
39
|
-
],
|
|
40
|
-
devServer: {
|
|
41
|
-
compress: true,
|
|
42
|
-
port: 3400,
|
|
43
|
-
hot: true,
|
|
44
|
-
},
|
|
45
|
-
};
|
package/webpack.config.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// oxlint-disable typescript/no-require-imports
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const base = {
|
|
5
|
-
mode: 'production',
|
|
6
|
-
module: {
|
|
7
|
-
rules: [
|
|
8
|
-
{
|
|
9
|
-
test: /\.(j|t)s(x?)$/,
|
|
10
|
-
use: {
|
|
11
|
-
loader: 'babel-loader',
|
|
12
|
-
options: {
|
|
13
|
-
extends: './.babelrc',
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
test: /\.tsx?$/,
|
|
19
|
-
use: {
|
|
20
|
-
loader: 'ts-loader',
|
|
21
|
-
options: {
|
|
22
|
-
transpileOnly: true,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
exclude: /node_modules/,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
test: /\.s?css$/,
|
|
29
|
-
use: ['style-loader', 'css-loader', 'sass-loader'],
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
optimization: {
|
|
34
|
-
minimize: false,
|
|
35
|
-
},
|
|
36
|
-
externals: {
|
|
37
|
-
react: {
|
|
38
|
-
root: 'React',
|
|
39
|
-
commonjs2: 'react',
|
|
40
|
-
commonjs: 'react',
|
|
41
|
-
amd: 'react',
|
|
42
|
-
umd: 'react',
|
|
43
|
-
},
|
|
44
|
-
'react-dom': {
|
|
45
|
-
root: 'ReactDOM',
|
|
46
|
-
commonjs2: 'react-dom',
|
|
47
|
-
commonjs: 'react-dom',
|
|
48
|
-
amd: 'react-dom',
|
|
49
|
-
umd: 'react-dom',
|
|
50
|
-
},
|
|
51
|
-
'@readme/variable': '@readme/variable',
|
|
52
|
-
},
|
|
53
|
-
resolve: {
|
|
54
|
-
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const serverConfig = {
|
|
59
|
-
...base,
|
|
60
|
-
target: 'node',
|
|
61
|
-
entry: ['./src/index.node.ts'],
|
|
62
|
-
output: {
|
|
63
|
-
path: path.resolve(__dirname, 'dist'),
|
|
64
|
-
filename: 'index.node.js',
|
|
65
|
-
libraryTarget: 'commonjs2',
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const clientConfig = {
|
|
70
|
-
...base,
|
|
71
|
-
target: 'web',
|
|
72
|
-
entry: ['./src/index.js'],
|
|
73
|
-
output: {
|
|
74
|
-
path: path.resolve(__dirname, 'dist'),
|
|
75
|
-
filename: 'index.js',
|
|
76
|
-
libraryTarget: 'commonjs2',
|
|
77
|
-
},
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
module.exports = [serverConfig, clientConfig];
|