Skip to content

Commit

Permalink
chore: add emoji and kmages remark plugins default
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jun 28, 2020
1 parent b861526 commit c87e3b5
Show file tree
Hide file tree
Showing 16 changed files with 360 additions and 32 deletions.
2 changes: 2 additions & 0 deletions core/instrument/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-images": "^2.0.0",
"remark-emoji": "^2.1.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3"
},
Expand Down
3 changes: 3 additions & 0 deletions core/instrument/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { ParserOptions } from '@babel/parser';
import { Document, StoriesStore } from '@component-controls/core';
import images from 'remark-images';
import emoji from 'remark-emoji';
import { SyncOpts as ResolveOptions } from 'resolve';
import {
Options,
Expand Down Expand Up @@ -42,6 +44,7 @@ import { mdx } from '@mdx-js/react';
export const defaultMDXOptions: MDXOptions = {
test: /\.(mdx|md)$/i,
renderer: DEFAULT_MDX_RENDERER,
mdPlugins: [images, emoji],
};

/**
Expand Down
2 changes: 2 additions & 0 deletions core/instrument/src/typings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ declare module '@hutson/parse-repository-url';
declare module 'hosted-git-info';
declare module '@mdx-js/mdx';
declare module 'js-string-escape';
declare module 'remark-emoji';
declare module 'remark-images';
6 changes: 6 additions & 0 deletions core/instrument/test/__snapshots__/csf-hoisted.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -122,6 +124,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -223,6 +227,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -112,6 +114,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -195,6 +199,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -124,6 +126,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -227,6 +231,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2492,6 +2492,8 @@ user setting can display only props table or only controls",
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down
28 changes: 28 additions & 0 deletions core/instrument/test/__snapshots__/csf-props-usage.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -144,6 +146,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -287,6 +291,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -412,6 +418,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -555,6 +563,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -704,6 +714,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -935,6 +947,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -1045,6 +1059,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -1185,6 +1201,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -1328,6 +1346,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -1479,6 +1499,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -1687,6 +1709,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -1811,6 +1835,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -1969,6 +1995,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down
18 changes: 18 additions & 0 deletions core/instrument/test/__snapshots__/csf-stories.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -92,6 +94,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -170,6 +174,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -231,6 +237,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -324,6 +332,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -475,6 +485,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -582,6 +594,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -704,6 +718,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -826,6 +842,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down
8 changes: 8 additions & 0 deletions core/instrument/test/__snapshots__/csf-story-doc.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -103,6 +105,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -184,6 +188,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down Expand Up @@ -255,6 +261,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down
2 changes: 2 additions & 0 deletions core/instrument/test/__snapshots__/csf-toggle.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Object {
"js-string-escape": "^1.0.1",
"prettier": "^1.19.1",
"read-package-json": "^2.1.1",
"remark-emoji": "^2.1.0",
"remark-images": "^2.0.0",
"resolve": "^1.15.1",
"typescript": "^3.8.3",
},
Expand Down
Loading

0 comments on commit c87e3b5

Please sign in to comment.