diff --git a/packages/editor/scripts/build.sh b/packages/editor/scripts/build.sh index 9a1072854..b3fb001af 100755 --- a/packages/editor/scripts/build.sh +++ b/packages/editor/scripts/build.sh @@ -1,7 +1,8 @@ cp ./node_modules/katex/dist/katex.min.css $(realpath ./styles/) cp -r ./node_modules/katex/dist/fonts/ $(realpath ./styles/) cp ./node_modules/prism-themes/themes/prism-dracula.min.css $(realpath ./styles/)/prism-theme.css - -ln -s $(realpath ./src/styles.css) $(realpath ./styles/) +cp ./node_modules/prism-themes/themes/prism-dracula.min.css $(realpath ./styles/)/prism-theme.css +cp $(realpath ./src/fonts.css) $(realpath ./styles/)/fonts.css +cp $(realpath ./src/styles.css) $(realpath ./styles/)/styles.css yarn tsc --watch \ No newline at end of file diff --git a/packages/editor/scripts/compile.sh b/packages/editor/scripts/compile.sh index 0d20a8397..3905aca0b 100755 --- a/packages/editor/scripts/compile.sh +++ b/packages/editor/scripts/compile.sh @@ -1,9 +1,11 @@ rm -rf dist/ + cp ./node_modules/katex/dist/katex.min.css $(realpath ./styles/) cp -r ./node_modules/katex/dist/fonts/ $(realpath ./styles/) cp ./node_modules/prism-themes/themes/prism-dracula.min.css $(realpath ./styles/)/prism-theme.css - -ln -s $(realpath ./src/styles.css) $(realpath ./styles/) +cp ./node_modules/prism-themes/themes/prism-dracula.min.css $(realpath ./styles/)/prism-theme.css +cp $(realpath ./src/fonts.css) $(realpath ./styles/)/fonts.css +cp $(realpath ./src/styles.css) $(realpath ./styles/)/styles.css yarn tsc --module commonjs --outDir ./dist/cjs --target es2015 yarn tsc --module esnext --outDir ./dist/es --target es6 diff --git a/packages/editor/src/fonts.css b/packages/editor/src/fonts.css new file mode 100644 index 000000000..11946a706 --- /dev/null +++ b/packages/editor/src/fonts.css @@ -0,0 +1,37 @@ +/*! + * Hack typeface https://github.com/source-foundry/Hack + * License: https://github.com/source-foundry/Hack/blob/master/LICENSE.md + */ +/* FONT PATHS + * -------------------------- */ +@font-face { + font-family: "Hack"; + src: url("fonts/hack-regular.woff2") format("woff2"), + url("fonts/hack-regular.woff") format("woff"); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: "Hack"; + src: url("fonts/hack-bold.woff2") format("woff2"), + url("fonts/hack-bold.woff") format("woff"); + font-weight: 700; + font-style: normal; +} + +@font-face { + font-family: "Hack"; + src: url("fonts/hack-italic.woff2") format("woff2"), + url("fonts/hack-italic.woff") format("woff"); + font-weight: 400; + font-style: italic; +} + +@font-face { + font-family: "Hack"; + src: url("fonts/hack-bolditalic.woff2") format("woff2"), + url("fonts/hack-bolditalic.woff") format("woff"); + font-weight: 700; + font-style: italic; +} diff --git a/packages/editor/styles/fonts.css b/packages/editor/styles/fonts.css new file mode 100644 index 000000000..11946a706 --- /dev/null +++ b/packages/editor/styles/fonts.css @@ -0,0 +1,37 @@ +/*! + * Hack typeface https://github.com/source-foundry/Hack + * License: https://github.com/source-foundry/Hack/blob/master/LICENSE.md + */ +/* FONT PATHS + * -------------------------- */ +@font-face { + font-family: "Hack"; + src: url("fonts/hack-regular.woff2") format("woff2"), + url("fonts/hack-regular.woff") format("woff"); + font-weight: 400; + font-style: normal; +} + +@font-face { + font-family: "Hack"; + src: url("fonts/hack-bold.woff2") format("woff2"), + url("fonts/hack-bold.woff") format("woff"); + font-weight: 700; + font-style: normal; +} + +@font-face { + font-family: "Hack"; + src: url("fonts/hack-italic.woff2") format("woff2"), + url("fonts/hack-italic.woff") format("woff"); + font-weight: 400; + font-style: italic; +} + +@font-face { + font-family: "Hack"; + src: url("fonts/hack-bolditalic.woff2") format("woff2"), + url("fonts/hack-bolditalic.woff") format("woff"); + font-weight: 700; + font-style: italic; +} diff --git a/packages/editor/styles/fonts/hack-bold.woff b/packages/editor/styles/fonts/hack-bold.woff new file mode 100644 index 000000000..368b913df Binary files /dev/null and b/packages/editor/styles/fonts/hack-bold.woff differ diff --git a/packages/editor/styles/fonts/hack-bold.woff2 b/packages/editor/styles/fonts/hack-bold.woff2 new file mode 100644 index 000000000..1155477e9 Binary files /dev/null and b/packages/editor/styles/fonts/hack-bold.woff2 differ diff --git a/packages/editor/styles/fonts/hack-bolditalic.woff b/packages/editor/styles/fonts/hack-bolditalic.woff new file mode 100644 index 000000000..ce87fe25b Binary files /dev/null and b/packages/editor/styles/fonts/hack-bolditalic.woff differ diff --git a/packages/editor/styles/fonts/hack-bolditalic.woff2 b/packages/editor/styles/fonts/hack-bolditalic.woff2 new file mode 100644 index 000000000..46ff1c425 Binary files /dev/null and b/packages/editor/styles/fonts/hack-bolditalic.woff2 differ diff --git a/packages/editor/styles/fonts/hack-italic.woff b/packages/editor/styles/fonts/hack-italic.woff new file mode 100644 index 000000000..bd545e45e Binary files /dev/null and b/packages/editor/styles/fonts/hack-italic.woff differ diff --git a/packages/editor/styles/fonts/hack-italic.woff2 b/packages/editor/styles/fonts/hack-italic.woff2 new file mode 100644 index 000000000..1e7630cef Binary files /dev/null and b/packages/editor/styles/fonts/hack-italic.woff2 differ diff --git a/packages/editor/styles/fonts/hack-regular.woff b/packages/editor/styles/fonts/hack-regular.woff new file mode 100644 index 000000000..e835381e1 Binary files /dev/null and b/packages/editor/styles/fonts/hack-regular.woff differ diff --git a/packages/editor/styles/fonts/hack-regular.woff2 b/packages/editor/styles/fonts/hack-regular.woff2 new file mode 100644 index 000000000..524465cf5 Binary files /dev/null and b/packages/editor/styles/fonts/hack-regular.woff2 differ