@takeshape/util 11.78.0 → 11.79.3

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,14 +1,2 @@
1
- import 'prismjs/components/prism-javascript.js';
2
- import 'prismjs/components/prism-markup.js';
3
- import 'prismjs/components/prism-markup-templating.js';
4
- import 'prismjs/components/prism-css.js';
5
- import 'prismjs/components/prism-bash.js';
6
- import 'prismjs/components/prism-django.js';
7
- import 'prismjs/components/prism-twig.js';
8
- import 'prismjs/components/prism-yaml.js';
9
- import 'prismjs/components/prism-graphql.js';
10
- import 'prismjs/components/prism-sass.js';
11
- import 'prismjs/components/prism-scss.js';
12
- import 'prismjs/components/prism-markdown.js';
13
- import 'prismjs/components/prism-json.js';
14
- export declare const highlightCode: (code: string, lang?: string) => string;
1
+ import { highlightCode } from '@takeshape/prism';
2
+ export { highlightCode };
@@ -1,26 +1,2 @@
1
- /*
2
- * The intention is to move all this to the client package in the end, but right now it's here
3
- * to be shared between the draftjs / mdx implementations, which span the client / server differently.
4
- */
5
- import Prism from 'prismjs';
6
- import 'prismjs/components/prism-javascript.js';
7
- import 'prismjs/components/prism-markup.js';
8
- import 'prismjs/components/prism-markup-templating.js';
9
- import 'prismjs/components/prism-css.js';
10
- import 'prismjs/components/prism-bash.js';
11
- import 'prismjs/components/prism-django.js';
12
- import 'prismjs/components/prism-twig.js';
13
- import 'prismjs/components/prism-yaml.js';
14
- import 'prismjs/components/prism-graphql.js';
15
- import 'prismjs/components/prism-sass.js';
16
- import 'prismjs/components/prism-scss.js';
17
- import 'prismjs/components/prism-markdown.js';
18
- import 'prismjs/components/prism-json.js';
19
- import _escape from 'lodash/escape.js';
20
- export const highlightCode = (code, lang) => {
21
- if (lang) {
22
- const syntax = Prism.languages[lang];
23
- return Prism.highlight(code, syntax, lang);
24
- }
25
- return _escape(code);
26
- };
1
+ import { highlightCode } from '@takeshape/prism';
2
+ export { highlightCode };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takeshape/util",
3
- "version": "11.78.0",
3
+ "version": "11.79.3",
4
4
  "description": "Shared utilities",
5
5
  "homepage": "https://www.takeshape.io",
6
6
  "repository": {
@@ -41,12 +41,12 @@
41
41
  "lodash": "^4.17.21",
42
42
  "markdown-draft-js": "github:incompl/markdown-draft-js#deterministic-entity-keys-with-lib",
43
43
  "mime-types": "^2.1.27",
44
- "prismjs": "^1.25.0",
45
44
  "shortid": "^2.2.16",
46
45
  "tiny-invariant": "^1.2.0",
47
46
  "uint8array-extras": "^1.4.0",
48
47
  "url-parse": "^1.5.3",
49
- "@takeshape/routing": "11.78.0"
48
+ "@takeshape/routing": "11.79.3",
49
+ "@takeshape/prism": "11.79.3"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/classnames": "^2.2.9",
@@ -55,7 +55,6 @@
55
55
  "@types/lodash": "^4.14.165",
56
56
  "@types/markdown-draft-js": "^2.2.4",
57
57
  "@types/mime-types": "^2.1.0",
58
- "@types/prismjs": "^1.16.2",
59
58
  "@types/shortid": "^0.0.29",
60
59
  "domhandler": "^5.0.3",
61
60
  "stripe": "13.8.0"