@readme/syntax-highlighter 10.11.1 → 10.14.0

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.
@@ -1 +1 @@
1
- module.exports=function(e){var t={};function l(r){if(t[r])return t[r].exports;var s=t[r]={i:r,l:!1,exports:{}};return e[r].call(s.exports,s,s.exports,l),s.l=!0,s.exports}return l.m=e,l.c=t,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)l.d(r,s,function(t){return e[t]}.bind(null,s));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="",l(l.s=3)}([function(e,t){function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var l=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==l)return;var r,s,c=[],o=!0,a=!1;try{for(l=l.call(e);!(o=(r=l.next()).done)&&(c.push(r.value),!t||c.length!==t);o=!0);}catch(e){a=!0,s=e}finally{try{o||null==l.return||l.return()}finally{if(a)throw s}}return c}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var l=Object.prototype.toString.call(e).slice(8,-1);"Object"===l&&e.constructor&&(l=e.constructor.name);if("Map"===l||"Set"===l)return Array.from(e);if("Arguments"===l||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var l=0,r=new Array(t);l<t;l++)r[l]=e[l];return r}var s={asp:"clike",aspx:"clike",bash:"shell",c:"clike","c#":["clike","text/x-csharp"],"c++":["clike","text/x-c++src"],clj:"clojure",cljc:"clojure",cljx:"clojure",coffeescript:"javascript",cplusplus:["clike","text/x-c++src"],cpp:["clike","text/x-c++src"],cql:["sql","text/x-cassandra"],cs:["clike","text/x-csharp"],csharp:["clike","text/x-csharp"],curl:"shell",d:"d",diff:"diff",ecmascript:"javascript",erl:"erlang",go:["go","text/x-go"],gradle:"groovy",handlebars:"htmlmixed",hbs:"htmlmixed",html:"htmlmixed",java:["clike","text/x-java"],jl:"julia",js:"javascript",jsx:"jsx",json:["javascript","application/ld+json"],jruby:"ruby",kotlin:["clike","text/x-kotlin"],kt:["clike","text/x-kotlin"],less:"css",liquid:"htmlmixed",node:"javascript",macruby:"ruby",markdown:"gfm",ml:["mllike","text/x-ocaml"],mssql:["sql","text/x-mssql"],mysql:["sql","text/x-mysql"],objc:["clike","text/x-objectivec"],"objc++":["clike","text/x-objectivec++"],objcpp:["clike","text/x-objectivec++"],objectivec:["clike","text/x-objectivec"],objectivecpp:["clike","text/x-objectivec++"],objectivecplusplus:["clike","text/x-objectivec++"],ocaml:["mllike","text/x-ocaml"],php:["php","text/x-php"],pgsql:["sql","text/x-pgsql"],pl:"perl",plsql:["sql","text/x-plsql"],postgres:["sql","text/x-pgsql"],postgresql:["sql","text/x-pgsql"],ps1:"powershell",py:"python",r:"r",rake:"ruby",rb:"ruby",rbx:"ruby",rs:"rust",sass:"css",scala:["clike","text/x-scala"],scss:"css",sh:"shell",sql:["sql","text/x-sql"],sqlite:["sql","text/x-sqlite"],styl:"css",stylus:"css",text:["null","text/plain"],ts:["javascript","text/typescript"],typescript:["javascript","text/typescript"],xhtml:"htmlmixed",yml:"yaml",zsh:"shell"};e.exports={modes:s,getMode:function(e){var t=e;return t in s&&(t=s[t],Array.isArray(t)&&(t=l(t,2)[1])),t}}},function(e,t){var l={asp:"ASP.NET",aspx:"ASP.NET",bash:"Bash",c:"C","c#":"C#","c++":"C++",coffeescript:"CoffeeScript",clj:"Clojure",cljc:"Clojure",cljx:"Clojure",clojure:"Clojure",cplusplus:"C++",cpp:"C++",cql:"Cassandra",cs:"C#",csharp:"C#",css:"CSS",curl:"cURL",d:"D",dart:"Dart",diff:"Diff",dockerfile:"Dockerfile",ecmascript:"ECMAScript",erl:"Erlang",erlang:"Erlang",go:"Go",gradle:"Gradle",groovy:"Groovy",handlebars:"Handlebars",hbs:"Handlebars",haml:"HAML",haxe:"Haxe",html:"HTML",http:"HTTP",java:"Java",javascript:"JavaScript",jinja2:"Jinja2",jl:"Julia",jruby:"JRuby",js:"JavaScript",json:"JSON",jsx:"JSX",julia:"Julia",kotlin:"Kotlin",kt:"Kotlin",less:"LESS",liquid:"Liquid",lua:"Lua",macruby:"MacRuby",markdown:"Markdown",md:"Markdown",ml:"OCaml",mssql:"SQL Server",mysql:"MySQL",node:"Node",objc:"Objective-C","objc++":"Objective-C++",objcpp:"Objective-C++",objectivec:"Objective-C",objectivecpp:"Objective-C++",objectivecplusplus:"Objective-C++",ocaml:"OCaml",perl:"Perl",php:"PHP",pl:"Perl",pgsql:"PL/pgSQL",plsql:"PL/SQL",postgres:"PostgreSQL",postgresql:"PostgreSQL",powershell:"PowerShell",ps1:"PowerShell",python:"Python",py:"Python",r:"R",rake:"Rake",rb:"Ruby",rbx:"Rubinius",rs:"Rust",ruby:"Ruby",rust:"Rust",sass:"Sass",scala:"Scala",scss:"SCSS",sh:"Shell",shell:"Shell",smarty:"Smarty",sql:"SQL",sqlite:"SQLite",stylus:"Stylus",styl:"Stylus",swift:"Swift",text:"Text",toml:"TOML",twig:"Twig",typescript:"TypeScript",xhtml:"XHTML",xml:"XML",yaml:"YAML",yml:"YAML",zsh:"Zsh"};e.exports=function(e){return e in l?l[e]:e}},function(e,t){var l={aspx:"asp",bash:"shell","c++":"cplusplus","c#":"csharp",clj:"clojure",cljc:"clojure",cljx:"clojure",coffeescript:"javascript",cpp:"cplusplus",cql:"sql",cs:"csharp",docker:"dockerfile",ecmascript:"javascript",erl:"erlang",gradle:"groovy",handlebars:"html",hbs:"html",jl:"julia",jruby:"ruby",js:"javascript",kt:"kotlin",less:"css",macruby:"ruby",md:"markdown",ml:"ocaml",mssql:"sql",mysql:"sql",node:"javascript","obj-c":"objectivec","obj-c++":"objectivecplusplus","objc++":"objectivecplusplus",objc:"objectivec",objcpp:"objectivecplusplus",objectivecpp:"objectivecplusplus",pgsql:"sql",pl:"perl",plsql:"sql",postgres:"sql",postgresql:"sql",ps1:"powershell",py:"python",rake:"ruby",rb:"ruby",rbx:"ruby",rs:"rust",sass:"css",scss:"css",sh:"shell",sqlite:"sql",styl:"css",stylus:"css",xhtml:"html",yml:"yaml",zsh:"shell"};e.exports=function(e){return e in l?l[e]:e}},function(e,t,l){e.exports=l(4)},function(e,t,l){"use strict";l.r(t);var r=l(1),s=l.n(r);l.d(t,"uppercase",(function(){return s.a}));var c=l(2),o=l.n(c);l.d(t,"canonical",(function(){return o.a}));var a=l(0);l.d(t,"modes",(function(){return a.modes})),l.d(t,"getMode",(function(){return a.getMode}))}]);
1
+ (()=>{var e={559:e=>{var l={aspx:"asp",bash:"shell","c++":"cplusplus","c#":"csharp",clj:"clojure",cljc:"clojure",cljx:"clojure",coffeescript:"javascript",cpp:"cplusplus",cql:"sql",cs:"csharp",docker:"dockerfile",ecmascript:"javascript",erl:"erlang",gql:"graphql",gradle:"groovy",handlebars:"html",hbs:"html",jl:"julia",jruby:"ruby",js:"javascript",kt:"kotlin",less:"css",macruby:"ruby",md:"markdown",ml:"ocaml",mssql:"sql",mysql:"sql",node:"javascript","obj-c":"objectivec","obj-c++":"objectivecplusplus","objc++":"objectivecplusplus",objc:"objectivec",objcpp:"objectivecplusplus",objectivecpp:"objectivecplusplus",pgsql:"sql",pl:"perl",plsql:"sql",postgres:"sql",postgresql:"sql",ps1:"powershell",py:"python",rake:"ruby",rb:"ruby",rbx:"ruby",rs:"rust",sass:"css",scss:"css",sh:"shell",solidity:"sol",sqlite:"sql",styl:"css",stylus:"css",xhtml:"html",yml:"yaml",zsh:"shell"};e.exports=function(e){return e in l?l[e]:e}},476:e=>{function l(e,l){return function(e){if(Array.isArray(e))return e}(e)||function(e,l){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var s,r,c=[],a=!0,o=!1;try{for(t=t.call(e);!(a=(s=t.next()).done)&&(c.push(s.value),!l||c.length!==l);a=!0);}catch(e){o=!0,r=e}finally{try{a||null==t.return||t.return()}finally{if(o)throw r}}return c}(e,l)||function(e,l){if(!e)return;if("string"==typeof e)return t(e,l);var s=Object.prototype.toString.call(e).slice(8,-1);"Object"===s&&e.constructor&&(s=e.constructor.name);if("Map"===s||"Set"===s)return Array.from(e);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return t(e,l)}(e,l)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function t(e,l){(null==l||l>e.length)&&(l=e.length);for(var t=0,s=new Array(l);t<l;t++)s[t]=e[t];return s}var s={asp:"clike",aspx:"clike",bash:"shell",c:"clike","c#":["clike","text/x-csharp"],"c++":["clike","text/x-c++src"],clj:"clojure",cljc:"clojure",cljx:"clojure",coffeescript:"javascript",cplusplus:["clike","text/x-c++src"],cpp:["clike","text/x-c++src"],cql:["sql","text/x-cassandra"],cs:["clike","text/x-csharp"],csharp:["clike","text/x-csharp"],curl:"shell",d:"d",diff:"diff",ecmascript:"javascript",erl:"erlang",go:["go","text/x-go"],gradle:"groovy",gql:"graphql",handlebars:"htmlmixed",hbs:"htmlmixed",html:"htmlmixed",java:["clike","text/x-java"],jl:"julia",js:"javascript",jsx:"jsx",json:["javascript","application/ld+json"],jruby:"ruby",kotlin:["clike","text/x-kotlin"],kt:["clike","text/x-kotlin"],less:"css",liquid:"htmlmixed",lua:"lua",node:"javascript",macruby:"ruby",markdown:"gfm",ml:["mllike","text/x-ocaml"],mssql:["sql","text/x-mssql"],mysql:["sql","text/x-mysql"],objc:["clike","text/x-objectivec"],"objc++":["clike","text/x-objectivec++"],objcpp:["clike","text/x-objectivec++"],objectivec:["clike","text/x-objectivec"],objectivecpp:["clike","text/x-objectivec++"],objectivecplusplus:["clike","text/x-objectivec++"],ocaml:["mllike","text/x-ocaml"],php:["php","text/x-php"],pgsql:["sql","text/x-pgsql"],pl:"perl",plsql:["sql","text/x-plsql"],postgres:["sql","text/x-pgsql"],postgresql:["sql","text/x-pgsql"],ps1:"powershell",py:"python",r:"r",rake:"ruby",rb:"ruby",rbx:"ruby",rs:"rust",sass:"css",scala:["clike","text/x-scala"],scss:"css",sh:"shell",sol:"clike",solidity:"clike",sql:["sql","text/x-sql"],sqlite:["sql","text/x-sqlite"],styl:"css",stylus:"css",text:["null","text/plain"],ts:["javascript","text/typescript"],typescript:["javascript","text/typescript"],xhtml:"htmlmixed",yml:"yaml",zsh:"shell"};e.exports={modes:s,getMode:function(e){var t=e;return t in s&&(t=s[t],Array.isArray(t)&&(t=l(t,2)[1])),t}}},857:e=>{var l={asp:"ASP.NET",aspx:"ASP.NET",bash:"Bash",c:"C","c#":"C#","c++":"C++",coffeescript:"CoffeeScript",clj:"Clojure",cljc:"Clojure",cljx:"Clojure",clojure:"Clojure",cplusplus:"C++",cpp:"C++",cql:"Cassandra",cs:"C#",csharp:"C#",css:"CSS",curl:"cURL",d:"D",dart:"Dart",diff:"Diff",dockerfile:"Dockerfile",ecmascript:"ECMAScript",erl:"Erlang",erlang:"Erlang",go:"Go",gql:"GraphQL",gradle:"Gradle",graphql:"GraphQL",groovy:"Groovy",handlebars:"Handlebars",hbs:"Handlebars",haml:"HAML",haxe:"Haxe",html:"HTML",http:"HTTP",java:"Java",javascript:"JavaScript",jinja2:"Jinja2",jl:"Julia",jruby:"JRuby",js:"JavaScript",json:"JSON",jsx:"JSX",julia:"Julia",kotlin:"Kotlin",kt:"Kotlin",less:"LESS",liquid:"Liquid",lua:"Lua",macruby:"MacRuby",markdown:"Markdown",md:"Markdown",ml:"OCaml",mssql:"SQL Server",mysql:"MySQL",node:"Node",objc:"Objective-C","objc++":"Objective-C++",objcpp:"Objective-C++",objectivec:"Objective-C",objectivecpp:"Objective-C++",objectivecplusplus:"Objective-C++",ocaml:"OCaml",perl:"Perl",php:"PHP",pl:"Perl",pgsql:"PL/pgSQL",plsql:"PL/SQL",postgres:"PostgreSQL",postgresql:"PostgreSQL",powershell:"PowerShell",ps1:"PowerShell",python:"Python",py:"Python",r:"R",rake:"Rake",rb:"Ruby",rbx:"Rubinius",rs:"Rust",ruby:"Ruby",rust:"Rust",sass:"Sass",scala:"Scala",scss:"SCSS",sh:"Shell",shell:"Shell",smarty:"Smarty",solidity:"Solidity",sql:"SQL",sqlite:"SQLite",stylus:"Stylus",styl:"Stylus",swift:"Swift",text:"Text",toml:"TOML",twig:"Twig",typescript:"TypeScript",xhtml:"XHTML",xml:"XML",yaml:"YAML",yml:"YAML",zsh:"Zsh"};e.exports=function(e){return e in l?l[e]:e}}},l={};function t(s){var r=l[s];if(void 0!==r)return r.exports;var c=l[s]={exports:{}};return e[s](c,c.exports,t),c.exports}t.n=e=>{var l=e&&e.__esModule?()=>e.default:()=>e;return t.d(l,{a:l}),l},t.d=(e,l)=>{for(var s in l)t.o(l,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:l[s]})},t.o=(e,l)=>Object.prototype.hasOwnProperty.call(e,l),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};(()=>{"use strict";t.r(s),t.d(s,{uppercase:()=>l.a,canonical:()=>c.a,modes:()=>a.modes,getMode:()=>a.getMode});var e=t(857),l=t.n(e),r=t(559),c=t.n(r),a=t(476)})(),module.exports=s})();
package/lib/enzyme.js CHANGED
@@ -2,6 +2,7 @@
2
2
  const Adapter = require('enzyme-adapter-react-16');
3
3
  const enzyme = require('enzyme');
4
4
 
5
- require('babel-polyfill');
5
+ require('core-js/stable');
6
+ require('regenerator-runtime/runtime');
6
7
 
7
8
  enzyme.configure({ adapter: new Adapter() });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@readme/syntax-highlighter",
3
3
  "description": "ReadMe's React-based syntax highlighter",
4
- "version": "10.11.1",
4
+ "version": "10.14.0",
5
5
  "main": "dist/index.node.js",
6
6
  "browser": "dist/index.js",
7
7
  "license": "ISC",
@@ -11,19 +11,20 @@
11
11
  },
12
12
  "homepage": "https://readmeio.github.io/syntax-highlighter/",
13
13
  "scripts": {
14
- "build": "webpack",
14
+ "build": "webpack --progress",
15
15
  "lint": "eslint . --ext .jsx --ext .js",
16
+ "prepack": "npm run build",
16
17
  "prepare": "husky install",
17
- "prepublishOnly": "npm run build",
18
18
  "pretest": "npm run lint",
19
19
  "prettier": "prettier --list-different --write \"./**/**.{js,jsx}\"",
20
- "release": "conventional-changelog -i CHANGELOG.md -s && git add CHANGELOG.md",
21
- "start": "webpack-dev-server --open --config ./webpack.config.dev.js",
20
+ "release": "npx conventional-changelog-cli -i CHANGELOG.md -s && git add CHANGELOG.md",
21
+ "start": "webpack serve --open --config ./webpack.config.dev.js",
22
22
  "test": "jest --coverage --runInBand",
23
23
  "watch": "webpack -w --progress"
24
24
  },
25
25
  "dependencies": {
26
26
  "codemirror": "^5.48.2",
27
+ "codemirror-graphql": "^1.0.2",
27
28
  "prop-types": "^15.7.2",
28
29
  "react-codemirror2": "^7.2.1"
29
30
  },
@@ -33,34 +34,34 @@
33
34
  "react-dom": "16.x"
34
35
  },
35
36
  "devDependencies": {
36
- "@babel/preset-env": "^7.14.9",
37
+ "@babel/preset-env": "^7.15.6",
37
38
  "@babel/preset-react": "^7.14.5",
38
- "@commitlint/cli": "^13.1.0",
39
- "@commitlint/config-conventional": "^13.1.0",
40
- "@readme/eslint-config": "^6.0.0",
41
- "babel-jest": "^27.0.6",
39
+ "@commitlint/cli": "^15.0.0",
40
+ "@commitlint/config-conventional": "^15.0.0",
41
+ "@readme/eslint-config": "^8.0.3",
42
+ "babel-jest": "^27.2.0",
42
43
  "babel-loader": "^8.1.0",
43
- "babel-polyfill": "^6.26.0",
44
- "conventional-changelog-cli": "^2.1.0",
45
- "css-loader": "^5.2.4",
44
+ "core-js": "^3.19.3",
45
+ "css-loader": "^6.2.0",
46
46
  "enzyme": "^3.11.0",
47
- "enzyme-adapter-react-16": "^1.15.4",
48
- "eslint": "^7.32.0",
47
+ "enzyme-adapter-react-16": "^1.15.6",
48
+ "eslint": "^8.4.1",
49
49
  "glob": "^7.1.6",
50
- "html-webpack-plugin": "^4.4.1",
50
+ "html-webpack-plugin": "^5.3.2",
51
51
  "husky": "^7.0.1",
52
52
  "identity-obj-proxy": "^3.0.0",
53
- "jest": "^26.0.1",
54
- "node-sass": "^4.14.1",
55
- "prettier": "^2.0.1",
53
+ "jest": "^27.2.0",
54
+ "node-sass": "^6.0.1",
55
+ "prettier": "^2.4.1",
56
56
  "react": "^16.14.0",
57
57
  "react-dom": "^16.14.0",
58
- "sass-loader": "^10.0.1",
59
- "style-loader": "^1.2.1",
60
- "terser-webpack-plugin": "^4.1.0",
61
- "webpack": "^4.44.1",
62
- "webpack-cli": "^3.3.12",
63
- "webpack-dev-server": "^4.0.0"
58
+ "regenerator-runtime": "^0.13.9",
59
+ "sass-loader": "^12.1.0",
60
+ "style-loader": "^3.2.1",
61
+ "terser-webpack-plugin": "^5.2.4",
62
+ "webpack": "^5.53.0",
63
+ "webpack-cli": "^4.8.0",
64
+ "webpack-dev-server": "^4.2.1"
64
65
  },
65
66
  "prettier": "@readme/eslint-config/prettier",
66
67
  "husky": {
package/public/index.js CHANGED
@@ -34,7 +34,7 @@ const exampleJson = `{
34
34
  `;
35
35
 
36
36
  ReactDOM.render(
37
- <div>
37
+ <div style={{ margin: '20px' }}>
38
38
  <h1>Core Syntax Highlighter</h1>
39
39
 
40
40
  <h2>Dark Theme</h2>
@@ -99,37 +99,6 @@ ReactDOM.render(
99
99
  </cmVariableContext.Provider>
100
100
  </pre>
101
101
 
102
- <h2>Custom Theme: tomorrow-night</h2>
103
- <pre id="hub-reference">
104
- <cmVariableContext.Provider
105
- value={{
106
- user: {},
107
- defaults: [
108
- {
109
- name: 'url',
110
- default: 'GET',
111
- },
112
- ],
113
- }}
114
- >
115
- {syntaxHighlighter(exampleCode, 'curl', {
116
- customTheme: 'tomorrow-night',
117
- highlightMode: true,
118
- tokenizeVariables: true,
119
- ranges: [
120
- [
121
- { ch: 0, line: 0 },
122
- { ch: 0, line: 1 },
123
- ],
124
- [
125
- { ch: 0, line: 4 },
126
- { ch: 0, line: 5 },
127
- ],
128
- ],
129
- })}
130
- </cmVariableContext.Provider>
131
- </pre>
132
-
133
102
  <hr />
134
103
  <h1>Code Editor</h1>
135
104
  <h2>Dark Theme</h2>
@@ -138,11 +107,6 @@ ReactDOM.render(
138
107
  <h2>Light Theme</h2>
139
108
  <pre id="hub-reference">{syntaxHighlighter(exampleCode, 'curl', { editable: true, dark: false })}</pre>
140
109
 
141
- <h2>Custom Theme: tomorrow-night</h2>
142
- <pre id="hub-reference">
143
- {syntaxHighlighter(exampleCode, 'curl', { editable: true, customTheme: 'tomorrow-night' })}
144
- </pre>
145
-
146
110
  <hr />
147
111
  <h1>Code Folding</h1>
148
112
  <h2>Dark Theme</h2>
@@ -154,11 +118,6 @@ ReactDOM.render(
154
118
  <pre id="hub-reference">
155
119
  {syntaxHighlighter(exampleJson, 'json', { foldGutter: true, readOnly: true, dark: false })}
156
120
  </pre>
157
-
158
- <h2>Custom Theme: tomorrow-night</h2>
159
- <pre id="hub-reference">
160
- {syntaxHighlighter(exampleJson, 'json', { foldGutter: true, readOnly: true, customTheme: 'tomorrow-night' })}
161
- </pre>
162
121
  </div>,
163
122
  document.getElementById('root')
164
123
  );
@@ -13,6 +13,7 @@ const modeAliases = {
13
13
  docker: 'dockerfile',
14
14
  ecmascript: 'javascript',
15
15
  erl: 'erlang',
16
+ gql: 'graphql',
16
17
  gradle: 'groovy',
17
18
  handlebars: 'html',
18
19
  hbs: 'html',
@@ -47,6 +48,7 @@ const modeAliases = {
47
48
  sass: 'css',
48
49
  scss: 'css',
49
50
  sh: 'shell',
51
+ solidity: 'sol',
50
52
  sqlite: 'sql',
51
53
  styl: 'css',
52
54
  stylus: 'css',
@@ -13,6 +13,7 @@ require('codemirror/mode/http/http');
13
13
  require('codemirror/mode/javascript/javascript');
14
14
  require('codemirror/mode/jsx/jsx');
15
15
  require('codemirror/mode/julia/julia');
16
+ require('codemirror/mode/lua/lua');
16
17
  require('codemirror/mode/mllike/mllike');
17
18
  require('codemirror/mode/perl/perl');
18
19
  require('codemirror/mode/php/php');
@@ -26,3 +27,4 @@ require('codemirror/mode/sql/sql');
26
27
  require('codemirror/mode/swift/swift');
27
28
  require('codemirror/mode/toml/toml');
28
29
  require('codemirror/mode/yaml/yaml');
30
+ require('codemirror-graphql/mode');
@@ -31,6 +31,7 @@ const modes = {
31
31
  erl: 'erlang',
32
32
  go: ['go', 'text/x-go'],
33
33
  gradle: 'groovy',
34
+ gql: 'graphql',
34
35
  handlebars: 'htmlmixed',
35
36
  hbs: 'htmlmixed',
36
37
  html: 'htmlmixed',
@@ -44,6 +45,7 @@ const modes = {
44
45
  kt: ['clike', 'text/x-kotlin'],
45
46
  less: 'css',
46
47
  liquid: 'htmlmixed',
48
+ lua: 'lua',
47
49
  node: 'javascript',
48
50
  macruby: 'ruby',
49
51
  markdown: 'gfm',
@@ -74,6 +76,8 @@ const modes = {
74
76
  scala: ['clike', 'text/x-scala'],
75
77
  scss: 'css',
76
78
  sh: 'shell',
79
+ sol: 'clike',
80
+ solidity: 'clike',
77
81
  sql: ['sql', 'text/x-sql'],
78
82
  sqlite: ['sql', 'text/x-sqlite'],
79
83
  styl: 'css',
@@ -25,7 +25,9 @@ const codeTypes = {
25
25
  erl: 'Erlang',
26
26
  erlang: 'Erlang',
27
27
  go: 'Go',
28
+ gql: 'GraphQL',
28
29
  gradle: 'Gradle',
30
+ graphql: 'GraphQL',
29
31
  groovy: 'Groovy',
30
32
  handlebars: 'Handlebars',
31
33
  hbs: 'Handlebars',
@@ -85,6 +87,7 @@ const codeTypes = {
85
87
  sh: 'Shell',
86
88
  shell: 'Shell',
87
89
  smarty: 'Smarty',
90
+ solidity: 'Solidity',
88
91
  sql: 'SQL',
89
92
  sqlite: 'SQLite',
90
93
  stylus: 'Stylus',
@@ -2,6 +2,7 @@ const HtmlWebPackPlugin = require('html-webpack-plugin');
2
2
  const path = require('path');
3
3
 
4
4
  module.exports = {
5
+ mode: 'development',
5
6
  entry: ['./public/index.js'],
6
7
  module: {
7
8
  rules: [
@@ -35,10 +36,8 @@ module.exports = {
35
36
  }),
36
37
  ],
37
38
  devServer: {
38
- contentBase: path.join(__dirname, 'dist'),
39
39
  compress: true,
40
40
  port: 3400,
41
41
  hot: true,
42
- watchContentBase: true,
43
42
  },
44
43
  };
@@ -1,5 +0,0 @@
1
- /*!
2
- Copyright (c) 2017 Jed Watson.
3
- Licensed under the MIT License (MIT), see
4
- http://jedwatson.github.io/classnames
5
- */