summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--docs/dev/webpack.md26
-rw-r--r--lib/csp.js2
-rw-r--r--locales/en.json5
-rw-r--r--locales/fr.json217
-rw-r--r--locales/pl.json217
-rw-r--r--package.json10
-rw-r--r--public/css/github-extract.css37
-rw-r--r--public/docs/features.md2
-rw-r--r--public/js/extra.js2
-rw-r--r--public/js/index.js3
-rw-r--r--public/views/codimd/head.ejs1
-rw-r--r--public/views/html.hbs1
-rw-r--r--public/views/includes/header.ejs2
-rw-r--r--public/views/includes/scripts.ejs2
-rw-r--r--public/views/pretty.ejs1
-rw-r--r--public/views/shared/help-modal.ejs2
-rw-r--r--public/views/slide.ejs1
-rw-r--r--webpack.common.js (renamed from webpackBaseConfig.js)40
-rw-r--r--webpack.config.js41
-rw-r--r--webpack.dev.js14
-rw-r--r--webpack.htmlexport.js25
-rw-r--r--webpack.prod.js23
-rw-r--r--webpack.production.js75
-rw-r--r--yarn.lock126
25 files changed, 444 insertions, 434 deletions
diff --git a/README.md b/README.md
index 7aab06fe..78c4fc78 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,6 @@ CodiMD
[![Standard - JavaScript Style Guide][standardjs-image]][standardjs-url]
-[![Join the chat at https://gitter.im/hackmdio/hackmd][gitter-image]][gitter-url]
[![#CodiMD on matrix.org][matrix.org-image]][matrix.org-url]
[![build status][travis-image]][travis-url]
[![version][github-version-badge]][github-release-page]
@@ -364,8 +363,6 @@ See more at [http://operational-transformation.github.io/](http://operational-tr
**License under AGPL.**
-[gitter-image]: https://badges.gitter.im/Join%20Chat.svg
-[gitter-url]: https://gitter.im/hackmdio/hackmd?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
[matrix.org-image]: https://img.shields.io/badge/Matrix.org-%23CodiMD@matrix.org-green.svg
[matrix.org-url]: https://riot.im/app/#/room/#codimd:matrix.org
[travis-image]: https://travis-ci.org/hackmdio/codimd.svg?branch=master
diff --git a/docs/dev/webpack.md b/docs/dev/webpack.md
new file mode 100644
index 00000000..7b391f3a
--- /dev/null
+++ b/docs/dev/webpack.md
@@ -0,0 +1,26 @@
+# Webpack Docs
+## `webpack.common.js`
+This file contains all common definition for chunks and plugins, that are needed by the whole app.
+
+**TODO:** Document which entry points are used for what.
+
+## `webpack.htmlexport.js`
+Separate config for the "save as html" feature.
+Packs all CSS from `public/js/htmlExport.js` to `build/html.min.css`.
+This file is then downloaded by client-side JS and used to create the HTML.
+See `exportToHTML()` in `public/js/extra.js`.
+
+
+## `webpack.dev.js`
+The development config uses both common configs, enables development mode and enables "cheap" source maps (lines only).
+If you need more detailed source maps while developing, you might want to use the `source-maps` option.
+See https://webpack.js.org/configuration/devtool/ for details.
+
+## `webpack.prod.js`
+The production config uses both common configs and enables production mode.
+This automatically enables various optimizations (e.g. UglifyJS). See https://webpack.js.org/concepts/mode/ for details.
+
+For the global app config, the name of the emitted chunks is changed to include the content hash.
+See https://webpack.js.org/guides/caching/ on why this is a good idea.
+
+For the HTML export config, CSS minification is enabled.
diff --git a/lib/csp.js b/lib/csp.js
index 0987df85..96be533a 100644
--- a/lib/csp.js
+++ b/lib/csp.js
@@ -9,7 +9,7 @@ var defaultDirectives = {
// ^ TODO: Remove unsafe-eval - webpack script-loader issues https://github.com/hackmdio/codimd/issues/594
imgSrc: ['*'],
styleSrc: ['\'self\'', '\'unsafe-inline\'', 'https://assets-cdn.github.com'], // unsafe-inline is required for some libs, plus used in views
- fontSrc: ['\'self\'', 'https://public.slidesharecdn.com'],
+ fontSrc: ['\'self\'', 'data:', 'https://public.slidesharecdn.com'],
objectSrc: ['*'], // Chrome PDF viewer treats PDFs as objects :/
mediaSrc: ['*'],
childSrc: ['*'],
diff --git a/locales/en.json b/locales/en.json
index f9c29b53..100f4f54 100644
--- a/locales/en.json
+++ b/locales/en.json
@@ -111,5 +111,6 @@
"Do you really want to delete your user account?": "Do you really want to delete your user account?",
"This will delete your account, all notes that are owned by you and remove all references to your account from other notes.": "This will delete your account, all notes that are owned by you and remove all references to your account from other notes.",
"Delete user": "Delete user",
- "Export user data": "Export user data"
-}
+ "Export user data": "Export user data",
+ "Help us translating on %s": "Help us translating on %s"
+} \ No newline at end of file
diff --git a/locales/fr.json b/locales/fr.json
index 8fd2b5b2..0784daa5 100644
--- a/locales/fr.json
+++ b/locales/fr.json
@@ -1,104 +1,115 @@
{
- "Collaborative markdown notes": "Notes collaboratives en markdown",
- "Realtime collaborative markdown notes on all platforms.": "Notes en markdown collaboratives en temps réel sur toutes les plateformes.",
- "Best way to write and share your knowledge in markdown.": "Le meilleur moyen d'écrire et partager votre savoir en markdown.",
- "Intro": "Intro",
- "History": "Historique",
- "New guest note": "Nouvelle note invité",
- "Collaborate with URL": "Collaborez avec l'URL",
- "Support charts and MathJax": "Supporte les graphiques et MathJax",
- "Support slide mode": "Supporte le mode présentation",
- "Sign In": "Se connecter",
- "Below is the history from browser": "Ci-dessous, l'historique du navigateur",
- "Welcome!": "Bienvenue !",
- "New note": "Nouvelle note",
- "or": "ou",
- "Sign Out": "Se déconnecter",
- "Explore all features": "Explorer toutes les fonctionnalités",
- "Select tags...": "Selectionner les tags...",
- "Search keyword...": "Chercher un mot-clef...",
- "Sort by title": "Trier par titre",
- "Title": "Titre",
- "Sort by time": "Trier par date",
- "Time": "Date",
- "Export history": "Exporter l'historique",
- "Import history": "Importer l'historique",
- "Clear history": "Supprimer l'historique",
- "Refresh history": "Actualiser l'historique",
- "No history": "Pas d'historique",
- "Import from browser": "Importer depuis le navigateur",
- "Releases": "Versions",
- "Are you sure?": "Ëtes-vous sûr ?",
- "Cancel": "Annuler",
- "Yes, do it!": "Oui, je suis sûr !",
- "Choose method": "Choisir la méthode",
- "Sign in via %s": "Se connecter depuis %s",
- "New": "Nouvelle",
- "Publish": "Publier",
- "Extra": "Extra",
- "Revision": "Historique",
- "Slide Mode": "Mode présentation",
- "Export": "Exporter",
- "Import": "Importer",
- "Clipboard": "Presse-papier",
- "Download": "Télécharger",
- "Raw HTML": "HTML brut",
- "Edit": "Éditer",
- "View": "Voir",
- "Both": "Les deux",
- "Help": "Aide",
- "Upload Image": "Uploader une image",
- "Menu": "Menu",
- "This page need refresh": "Cette page doit être rechargée",
- "You have an incompatible client version.": "Vous avez une version client incompatible.",
- "Refresh to update.": "Recharger pour mettre à jour.",
- "New version available!": "Nouvelle version disponible !",
- "See releases notes here": "Voir les commentaires de version ici",
- "Refresh to enjoy new features.": "Recharger pour bénéficier des nouvelles fonctionnalités.",
- "Your user state has changed.": "Votre statut utilisateur a changé.",
- "Refresh to load new user state.": "Recharger pour avoir le nouveau statut utilisateur.",
- "Refresh": "Recharger",
- "Contacts": "Contacts",
- "Report an issue": "Signaler un problème",
- "Send us email": "Envoyez-nous un mail",
- "Documents": "Documents",
- "Features": "Fonctionnalités",
- "YAML Metadata": "Métadonnées YAML",
- "Slide Example": "Exemple de présentation",
- "Cheatsheet": "Pense-bête",
- "Example": "Exemple",
- "Syntax": "Syntaxe",
- "Header": "En-tête",
- "Unordered List": "Liste à puce",
- "Ordered List": "List numérotée",
- "Todo List": "Liste de tâches",
- "Blockquote": "Citation",
- "Bold font": "Gras",
- "Italics font": "Italique",
- "Strikethrough": "Barré",
- "Inserted text": "Souligné",
- "Marked text": "Surligné",
- "Link": "Lien",
- "Image": "Image",
- "Code": "Code",
- "Externals": "Externes",
- "This is a alert area.": "Ceci est un texte d'alerte.",
- "Revert": "Revenir en arrière",
- "Import from clipboard": "Importer depuis le presse-papier",
- "Paste your markdown or webpage here...": "Coller votre markdown ou votre page web ici...",
- "Clear": "Vider",
- "This note is locked": "Cette note est verrouillée",
- "Sorry, only owner can edit this note.": "Désolé, seulement le propriétaire peut éditer cette note.",
- "OK": "OK",
- "Reach the limit": "Atteindre la limite",
- "Sorry, you've reached the max length this note can be.": "Désolé, vous avez atteint la longueur maximale que cette note peut avoir.",
- "Please reduce the content or divide it to more notes, thank you!": "Merci de réduire le contenu ou de le diviser en plusieurs notes!",
- "Import from Gist": "Importer depuis Gist",
- "Paste your gist url here...": "Coller l'URL de votre Gist ici...",
- "Import from Snippet": "Importer depuis Snippet",
- "Select From Available Projects": "Sélectionner depuis les projets disponibles",
- "Select From Available Snippets": "Sélectionner depuis les Snippets disponibles",
- "OR": "OU",
- "Export to Snippet": "Exporter vers Snippet",
- "Select Visibility Level": "Sélectionner le niveau de visibilité"
-}
+ "Collaborative markdown notes": "Notes collaboratives en markdown",
+ "Realtime collaborative markdown notes on all platforms.": "Notes en markdown collaboratives en temps réel sur toutes les plateformes.",
+ "Best way to write and share your knowledge in markdown.": "Le meilleur moyen d'écrire et partager votre savoir en markdown.",
+ "Intro": "Intro",
+ "History": "Historique",
+ "New guest note": "Nouvelle note invité",
+ "Collaborate with URL": "Collaborez avec l'URL",
+ "Support charts and MathJax": "Supporte les graphiques et MathJax",
+ "Support slide mode": "Supporte le mode présentation",
+ "Sign In": "Se connecter",
+ "Below is the history from browser": "Ci-dessous, l'historique du navigateur",
+ "Welcome!": "Bienvenue !",
+ "New note": "Nouvelle note",
+ "or": "ou",
+ "Sign Out": "Se déconnecter",
+ "Explore all features": "Explorer toutes les fonctionnalités",
+ "Select tags...": "Selectionner les tags...",
+ "Search keyword...": "Chercher un mot-clef...",
+ "Sort by title": "Trier par titre",
+ "Title": "Titre",
+ "Sort by time": "Trier par date",
+ "Time": "Date",
+ "Export history": "Exporter l'historique",
+ "Import history": "Importer l'historique",
+ "Clear history": "Supprimer l'historique",
+ "Refresh history": "Actualiser l'historique",
+ "No history": "Pas d'historique",
+ "Import from browser": "Importer depuis le navigateur",
+ "Releases": "Versions",
+ "Are you sure?": "Ëtes-vous sûr ?",
+ "Do you really want to delete this note?": "Voulez-vous vraiment supprimer cette note?",
+ "All users will lose their connection.": "All users will lose their connection.",
+ "Cancel": "Annuler",
+ "Yes, do it!": "Oui, je suis sûr !",
+ "Choose method": "Choisir la méthode",
+ "Sign in via %s": "Se connecter depuis %s",
+ "New": "Nouvelle",
+ "Publish": "Publier",
+ "Extra": "Extra",
+ "Revision": "Historique",
+ "Slide Mode": "Mode présentation",
+ "Export": "Exporter",
+ "Import": "Importer",
+ "Clipboard": "Presse-papier",
+ "Download": "Télécharger",
+ "Raw HTML": "HTML brut",
+ "Edit": "Éditer",
+ "View": "Voir",
+ "Both": "Les deux",
+ "Help": "Aide",
+ "Upload Image": "Uploader une image",
+ "Menu": "Menu",
+ "This page need refresh": "Cette page doit être rechargée",
+ "You have an incompatible client version.": "Vous avez une version client incompatible.",
+ "Refresh to update.": "Recharger pour mettre à jour.",
+ "New version available!": "Nouvelle version disponible !",
+ "See releases notes here": "Voir les commentaires de version ici",
+ "Refresh to enjoy new features.": "Recharger pour bénéficier des nouvelles fonctionnalités.",
+ "Your user state has changed.": "Votre statut utilisateur a changé.",
+ "Refresh to load new user state.": "Recharger pour avoir le nouveau statut utilisateur.",
+ "Refresh": "Recharger",
+ "Contacts": "Contacts",
+ "Report an issue": "Signaler un problème",
+ "Meet us on %s": "Rencontrez-nous sur %s",
+ "Send us email": "Envoyez-nous un mail",
+ "Documents": "Documents",
+ "Features": "Fonctionnalités",
+ "YAML Metadata": "Métadonnées YAML",
+ "Slide Example": "Exemple de présentation",
+ "Cheatsheet": "Pense-bête",
+ "Example": "Exemple",
+ "Syntax": "Syntaxe",
+ "Header": "En-tête",
+ "Unordered List": "Liste à puce",
+ "Ordered List": "List numérotée",
+ "Todo List": "Liste de tâches",
+ "Blockquote": "Citation",
+ "Bold font": "Gras",
+ "Italics font": "Italique",
+ "Strikethrough": "Barré",
+ "Inserted text": "Souligné",
+ "Marked text": "Surligné",
+ "Link": "Lien",
+ "Image": "Image",
+ "Code": "Code",
+ "Externals": "Externes",
+ "This is a alert area.": "Ceci est un texte d'alerte.",
+ "Revert": "Revenir en arrière",
+ "Import from clipboard": "Importer depuis le presse-papier",
+ "Paste your markdown or webpage here...": "Coller votre markdown ou votre page web ici...",
+ "Clear": "Vider",
+ "This note is locked": "Cette note est verrouillée",
+ "Sorry, only owner can edit this note.": "Désolé, seulement le propriétaire peut éditer cette note.",
+ "OK": "OK",
+ "Reach the limit": "Atteindre la limite",
+ "Sorry, you've reached the max length this note can be.": "Désolé, vous avez atteint la longueur maximale que cette note peut avoir.",
+ "Please reduce the content or divide it to more notes, thank you!": "Merci de réduire le contenu ou de le diviser en plusieurs notes!",
+ "Import from Gist": "Importer depuis Gist",
+ "Paste your gist url here...": "Coller l'URL de votre Gist ici...",
+ "Import from Snippet": "Importer depuis Snippet",
+ "Select From Available Projects": "Sélectionner depuis les projets disponibles",
+ "Select From Available Snippets": "Sélectionner depuis les Snippets disponibles",
+ "OR": "OU",
+ "Export to Snippet": "Exporter vers Snippet",
+ "Select Visibility Level": "Sélectionner le niveau de visibilité",
+ "Night Theme": "Theme Nuit",
+ "Follow us on %s and %s.": "Suivez-nous sur %s, et %s.",
+ "Privacy": "Confidentialité",
+ "Terms of Use": "Conditions d'utilisation",
+ "Do you really want to delete your user account?": "Voulez-vous vraiment supprimer votre compte utilisateur",
+ "This will delete your account, all notes that are owned by you and remove all references to your account from other notes.": "This will delete your account, all notes that are owned by you and remove all references to your account from other notes.",
+ "Delete user": "Suprrimez l'utilisteur",
+ "Export user data": "Exportez les données utilisateur"
+} \ No newline at end of file
diff --git a/locales/pl.json b/locales/pl.json
index 70450bfb..2036f7ae 100644
--- a/locales/pl.json
+++ b/locales/pl.json
@@ -1,104 +1,115 @@
{
- "Collaborative markdown notes": "Wspólne markdown notatki",
- "Realtime collaborative markdown notes on all platforms.": "Rzeczywiste wspólne markdown notatki dla wszystkich platform",
- "Best way to write and share your knowledge in markdown.": "Najlepszy sposób na pisanie i dzielenie się swoją wiedzą w markdown.",
- "Intro": "Intro",
- "History": "Historia",
- "New guest note": "Nowa notatka gościa",
- "Collaborate with URL": "Wspólnie z URL",
- "Support charts and MathJax": "Support charts and MathJax",
- "Support slide mode": "Support slide mode",
- "Sign In": "Zaloguj się",
- "Below is the history from browser": "Historia z przeglądarki poniżej",
- "Welcome!": "Witam!",
- "New note": "Nowa notatka",
- "or": "lub",
- "Sign Out": "Wyloguj się",
- "Explore all features": "Przeglądaj wszystkie funkcje",
- "Select tags...": "Wybierz tagi...",
- "Search keyword...": "Znajdź kluczowe słowo...",
- "Sort by title": "Sortuj według tytułu",
- "Title": "Tytuł",
- "Sort by time": "Sortuj według czasu",
- "Time": "Czas",
- "Export history": "Eksportuj historię",
- "Import history": "Importuj historię",
- "Clear history": "Wyczyść historię",
- "Refresh history": "Odśwież historię",
- "No history": "Brak historii",
- "Import from browser": "Importuj z przeglądarki",
- "Releases": "Wydania",
- "Are you sure?": "Jesteś pewny?",
- "Cancel": "Anuluj",
- "Yes, do it!": "Tak, zrób to!",
- "Choose method": "Wybierz metodę",
- "Sign in via %s": "Zaloguj się poprzez %s",
- "New": "Nowy",
- "Publish": "Publikuj",
- "Extra": "Ekstra",
- "Revision": "Korekta",
- "Slide Mode": "Tryb slajdów",
- "Export": "Eksport",
- "Import": "Import",
- "Clipboard": "Schowek",
- "Download": "Pobierz",
- "Raw HTML": "Raw HTML",
- "Edit": "Edytuj",
- "View": "Pogląd",
- "Both": "Both",
- "Help": "Pomoc",
- "Upload Image": "Prześlij zdjęcie",
- "Menu": "Menu",
- "This page need refresh": "Strona wymaga odświeżenia",
- "You have an incompatible client version.": "Posiadasz niezgodną wersję kliencką.",
- "Refresh to update.": "Odświerz aby zaktualizować.",
- "New version available!": "Nowa wersja dostępna!",
- "See releases notes here": "Zobacz informacje o wydaniach tutaj",
- "Refresh to enjoy new features.": "Odśwież, aby korzystać z nowych funkcji.",
- "Your user state has changed.": "Stan twojego użytkownika się zmienił.",
- "Refresh to load new user state.": "Odśwież aby załadować nowy stan użytkownika.",
- "Refresh": "Odśwież",
- "Contacts": "Kontakty",
- "Report an issue": "Zgłoś błąd",
- "Send us email": "Wyślij nam email",
- "Documents": "Dokumenty",
- "Features": "Funkcje",
- "YAML Metadata": "YAML Meta dane",
- "Slide Example": "Przykład slajdu",
- "Cheatsheet": "Ściągawka",
- "Example": "Przykład",
- "Syntax": "Składnia",
- "Header": "Nagłówek",
- "Unordered List": "Nie posortowana lista",
- "Ordered List": "Posortowana lista",
- "Todo List": "Todo lista",
- "Blockquote": "Cytat blokowy",
- "Bold font": "Czcionka pogrubiona",
- "Italics font": "Czcionka pochylona",
- "Strikethrough": "Przekreślenie",
- "Inserted text": "Wstawiony tekst",
- "Marked text": "Zaznaczony tekst",
- "Link": "Odnośnik",
- "Image": "Zdjęcie",
- "Code": "Kod",
- "Externals": "Zewnętrzne",
- "This is a alert area.": "This is a alert area.",
- "Revert": "Cofnij",
- "Import from clipboard": "Importuj ze schowka",
- "Paste your markdown or webpage here...": "Wklej markdown lub stronę tutaj...",
- "Clear": "Wyczyść",
- "This note is locked": "Notatka jest zablokowana",
- "Sorry, only owner can edit this note.": "Tylko właściciel może edytować tą notatkę.",
- "OK": "OK",
- "Reach the limit": "Osiągnięto limit",
- "Sorry, you've reached the max length this note can be.": "Niestety, osiągnięto maksymalną długość notatki.",
- "Please reduce the content or divide it to more notes, thank you!": "Proszę zmniejszyć zawartość notatki lub podzielić ją na kilka notatek, dziękuję!",
- "Import from Gist": "Importuj z Gist",
- "Paste your gist url here...": "Wklej gist url tutaj...",
- "Import from Snippet": "Importuj z Snippet",
- "Select From Available Projects": "Wybierz z dostępnych projektów",
- "Select From Available Snippets": "Wybierz z dostępnych Snippets",
- "OR": "LUB",
- "Export to Snippet": "Eksportuj do Snippet",
- "Select Visibility Level": "Wybierz poziom widoczności"
-}
+ "Collaborative markdown notes": "Wspólne markdown notatki",
+ "Realtime collaborative markdown notes on all platforms.": "Rzeczywiste wspólne markdown notatki dla wszystkich platform",
+ "Best way to write and share your knowledge in markdown.": "Najlepszy sposób na pisanie i dzielenie się swoją wiedzą w markdown.",
+ "Intro": "Intro",
+ "History": "Historia",
+ "New guest note": "Nowa notatka gościa",
+ "Collaborate with URL": "Kolaboracja w czasie rzeczywistym",
+ "Support charts and MathJax": "Kompatybilne z wykresami oraz MathJax",
+ "Support slide mode": "Obsługuje tryb slajdów",
+ "Sign In": "Zaloguj się",
+ "Below is the history from browser": "Historia z przeglądarki poniżej",
+ "Welcome!": "Witam!",
+ "New note": "Nowa notatka",
+ "or": "lub",
+ "Sign Out": "Wyloguj się",
+ "Explore all features": "Przeglądaj wszystkie funkcje",
+ "Select tags...": "Wybierz tagi...",
+ "Search keyword...": "Znajdź kluczowe słowo...",
+ "Sort by title": "Sortuj według tytułu",
+ "Title": "Tytuł",
+ "Sort by time": "Sortuj według czasu",
+ "Time": "Czas",
+ "Export history": "Eksportuj historię",
+ "Import history": "Importuj historię",
+ "Clear history": "Wyczyść historię",
+ "Refresh history": "Odśwież historię",
+ "No history": "Brak historii",
+ "Import from browser": "Importuj z przeglądarki",
+ "Releases": "Wydania",
+ "Are you sure?": "Jesteś pewny?",
+ "Do you really want to delete this note?": "Do you really want to delete this note?",
+ "All users will lose their connection.": "All users will lose their connection.",
+ "Cancel": "Anuluj",
+ "Yes, do it!": "Tak, zrób to!",
+ "Choose method": "Wybierz metodę",
+ "Sign in via %s": "Zaloguj się poprzez %s",
+ "New": "Nowy",
+ "Publish": "Publikuj",
+ "Extra": "Ekstra",
+ "Revision": "Korekta",
+ "Slide Mode": "Tryb slajdów",
+ "Export": "Eksport",
+ "Import": "Import",
+ "Clipboard": "Schowek",
+ "Download": "Pobierz",
+ "Raw HTML": "Raw HTML",
+ "Edit": "Edytuj",
+ "View": "Pogląd",
+ "Both": "Both",
+ "Help": "Pomoc",
+ "Upload Image": "Prześlij zdjęcie",
+ "Menu": "Menu",
+ "This page need refresh": "Strona wymaga odświeżenia",
+ "You have an incompatible client version.": "Posiadasz niezgodną wersję kliencką.",
+ "Refresh to update.": "Odświerz aby zaktualizować.",
+ "New version available!": "Nowa wersja dostępna!",
+ "See releases notes here": "Zobacz informacje o wydaniach tutaj",
+ "Refresh to enjoy new features.": "Odśwież, aby korzystać z nowych funkcji.",
+ "Your user state has changed.": "Stan twojego użytkownika się zmienił.",
+ "Refresh to load new user state.": "Odśwież aby załadować nowy stan użytkownika.",
+ "Refresh": "Odśwież",
+ "Contacts": "Kontakty",
+ "Report an issue": "Zgłoś błąd",
+ "Meet us on %s": "Meet us on %s",
+ "Send us email": "Wyślij nam email",
+ "Documents": "Dokumenty",
+ "Features": "Funkcje",
+ "YAML Metadata": "YAML Meta dane",
+ "Slide Example": "Przykład slajdu",
+ "Cheatsheet": "Ściągawka",
+ "Example": "Przykład",
+ "Syntax": "Składnia",
+ "Header": "Nagłówek",
+ "Unordered List": "Nie posortowana lista",
+ "Ordered List": "Posortowana lista",
+ "Todo List": "Todo lista",
+ "Blockquote": "Cytat blokowy",
+ "Bold font": "Czcionka pogrubiona",
+ "Italics font": "Czcionka pochylona",
+ "Strikethrough": "Przekreślenie",
+ "Inserted text": "Wstawiony tekst",
+ "Marked text": "Zaznaczony tekst",
+ "Link": "Odnośnik",
+ "Image": "Zdjęcie",
+ "Code": "Kod",
+ "Externals": "Zewnętrzne",
+ "This is a alert area.": "This is a alert area.",
+ "Revert": "Cofnij",
+ "Import from clipboard": "Importuj ze schowka",
+ "Paste your markdown or webpage here...": "Wklej markdown lub stronę tutaj...",
+ "Clear": "Wyczyść",
+ "This note is locked": "Notatka jest zablokowana",
+ "Sorry, only owner can edit this note.": "Tylko właściciel może edytować tą notatkę.",
+ "OK": "OK",
+ "Reach the limit": "Osiągnięto limit",
+ "Sorry, you've reached the max length this note can be.": "Niestety, osiągnięto maksymalną długość notatki.",
+ "Please reduce the content or divide it to more notes, thank you!": "Proszę zmniejszyć zawartość notatki lub podzielić ją na kilka notatek, dziękuję!",
+ "Import from Gist": "Importuj z Gist",
+ "Paste your gist url here...": "Wklej gist url tutaj...",
+ "Import from Snippet": "Importuj z Snippet",
+ "Select From Available Projects": "Wybierz z dostępnych projektów",
+ "Select From Available Snippets": "Wybierz z dostępnych Snippets",
+ "OR": "LUB",
+ "Export to Snippet": "Eksportuj do Snippet",
+ "Select Visibility Level": "Wybierz poziom widoczności",
+ "Night Theme": "Night Theme",
+ "Follow us on %s and %s.": "Follow us on %s, and %s.",
+ "Privacy": "Privacy",
+ "Terms of Use": "Terms of Use",
+ "Do you really want to delete your user account?": "Do you really want to delete your user account?",
+ "This will delete your account, all notes that are owned by you and remove all references to your account from other notes.": "This will delete your account, all notes that are owned by you and remove all references to your account from other notes.",
+ "Delete user": "Delete user",
+ "Export user data": "Export user data"
+} \ No newline at end of file
diff --git a/package.json b/package.json
index 08e39b26..524f87e9 100644
--- a/package.json
+++ b/package.json
@@ -8,8 +8,8 @@
"test": "npm run-script standard && npm run-script jsonlint",
"jsonlint": "find . -not -path './node_modules/*' -type f -name '*.json' -o -type f -name '*.json.example' | while read json; do echo $json ; jq . $json; done",
"standard": "node ./node_modules/standard/bin/cmd.js",
- "dev": "webpack --config webpack.config.js --mode=production --progress --colors --watch",
- "build": "webpack --config webpack.production.js --progress --colors --bail",
+ "dev": "webpack --config webpack.dev.js --progress --colors --watch",
+ "build": "webpack --config webpack.prod.js --progress --colors --bail",
"postinstall": "bin/heroku",
"start": "node app.js",
"doctoc": "doctoc --title='# Table of Contents' README.md"
@@ -47,7 +47,7 @@
"gist-embed": "~2.6.0",
"graceful-fs": "^4.1.11",
"handlebars": "^4.0.6",
- "helmet": "^3.3.0",
+ "helmet": "^3.13.0",
"highlight.js": "~9.12.0",
"i18n": "^0.8.3",
"imgur": "git+https://github.com/hackmdio/node-imgur.git",
@@ -89,7 +89,6 @@
"morgan": "^1.7.0",
"mysql": "^2.12.0",
"node-uuid": "^1.4.7",
- "octicons": "~4.4.0",
"passport": "^0.4.0",
"passport-dropbox-oauth2": "^1.1.0",
"passport-facebook": "^2.1.1",
@@ -173,7 +172,7 @@
"exports-loader": "^0.7.0",
"expose-loader": "^0.7.5",
"file-loader": "^2.0.0",
- "html-webpack-plugin": "^4.0.0-alpha",
+ "html-webpack-plugin": "4.0.0-beta.2",
"imports-loader": "^0.8.0",
"jsonlint": "^1.6.2",
"less": "^2.7.1",
@@ -188,6 +187,7 @@
"url-loader": "^1.0.1",
"webpack": "^4.14.0",
"webpack-cli": "^3.1.0",
+ "webpack-merge": "^4.1.4",
"webpack-parallel-uglify-plugin": "^1.1.0"
},
"standard": {
diff --git a/public/css/github-extract.css b/public/css/github-extract.css
index 7f7058a0..f7b15445 100644
--- a/public/css/github-extract.css
+++ b/public/css/github-extract.css
@@ -119,23 +119,24 @@
color: #ddd;
}
-.markdown-body h1 .octicon-link,
-.markdown-body h2 .octicon-link,
-.markdown-body h3 .octicon-link,
-.markdown-body h4 .octicon-link,
-.markdown-body h5 .octicon-link,
-.markdown-body h6 .octicon-link {
+.markdown-body h1 .fa-link,
+.markdown-body h2 .fa-link,
+.markdown-body h3 .fa-link,
+.markdown-body h4 .fa-link,
+.markdown-body h5 .fa-link,
+.markdown-body h6 .fa-link {
color: #000;
vertical-align: middle;
visibility: hidden;
+ font-size: 16px;
}
-.night .markdown-body h1 .octicon-link,
-.night .markdown-body h2 .octicon-link,
-.night .markdown-body h3 .octicon-link,
-.night .markdown-body h4 .octicon-link,
-.night .markdown-body h5 .octicon-link,
-.night .markdown-body h6 .octicon-link {
+.night .markdown-body h1 .fa-link,
+.night .markdown-body h2 .fa-link,
+.night .markdown-body h3 .fa-link,
+.night .markdown-body h4 .fa-link,
+.night .markdown-body h5 .fa-link,
+.night .markdown-body h6 .fa-link {
color: #fff;
}
@@ -148,12 +149,12 @@
text-decoration: none;
}
-.markdown-body h1:hover .anchor .octicon-link,
-.markdown-body h2:hover .anchor .octicon-link,
-.markdown-body h3:hover .anchor .octicon-link,
-.markdown-body h4:hover .anchor .octicon-link,
-.markdown-body h5:hover .anchor .octicon-link,
-.markdown-body h6:hover .anchor .octicon-link {
+.markdown-body h1:hover .anchor .fa-link,
+.markdown-body h2:hover .anchor .fa-link,
+.markdown-body h3:hover .anchor .fa-link,
+.markdown-body h4:hover .anchor .fa-link,
+.markdown-body h5:hover .anchor .fa-link,
+.markdown-body h6:hover .anchor .fa-link {
visibility: visible;
}
diff --git a/public/docs/features.md b/public/docs/features.md
index 1915f0ef..3d790039 100644
--- a/public/docs/features.md
+++ b/public/docs/features.md
@@ -8,7 +8,7 @@ This means that you can write notes with other people on your **desktop**, **tab
You can sign-in via multiple auth providers like **Facebook**, **Twitter**, **GitHub** and many more on the [_homepage_](/).
If you experience any _issues_, feel free to report it on [**GitHub**](https://github.com/hackmdio/codimd/issues).
-Or meet us on [**Matrix.org**](https://riot.im/app/#/room/#codimd:matrix.org) or [**Gitter**](https://gitter.im/hackmdio/hackmd) for dev-talk and interactive help.
+Or meet us on [**Matrix.org**](https://riot.im/app/#/room/#codimd:matrix.org) for dev-talk and interactive help.
**Thank you very much!**
Workspace
diff --git a/public/js/extra.js b/public/js/extra.js
index fd9b3689..ddec31a8 100644
--- a/public/js/extra.js
+++ b/public/js/extra.js
@@ -834,7 +834,7 @@ const anchorForId = id => {
const anchor = document.createElement('a')
anchor.className = 'anchor hidden-xs'
anchor.href = `#${id}`
- anchor.innerHTML = '<span class="octicon octicon-link"></span>'
+ anchor.innerHTML = '<i class="fa fa-link"></i>'
anchor.title = id
return anchor
}
diff --git a/public/js/index.js b/public/js/index.js
index 3dd25fa6..98c3b6d2 100644
--- a/public/js/index.js
+++ b/public/js/index.js
@@ -17,6 +17,7 @@ import toMarkdown from 'to-markdown'
import { saveAs } from 'file-saver'
import randomColor from 'randomcolor'
import store from 'store'
+import hljs from 'highlight.js'
import _ from 'lodash'
@@ -92,7 +93,7 @@ var cursorMenuThrottle = 50
var cursorActivityDebounce = 50
var cursorAnimatePeriod = 100
var supportContainers = ['success', 'info', 'warning', 'danger']
-var supportCodeModes = ['javascript', 'typescript', 'jsx', 'htmlmixed', 'htmlembedded', 'css', 'xml', 'clike', 'clojure', 'ruby', 'python', 'shell', 'php', 'sql', 'haskell', 'coffeescript', 'yaml', 'pug', 'lua', 'cmake', 'nginx', 'perl', 'sass', 'r', 'dockerfile', 'tiddlywiki', 'mediawiki', 'go', 'gherkin']
+var supportCodeModes = ['javascript', 'typescript', 'jsx', 'htmlmixed', 'htmlembedded', 'css', 'xml', 'clike', 'clojure', 'ruby', 'python', 'shell', 'php', 'sql', 'haskell', 'coffeescript', 'yaml', 'pug', 'lua', 'cmake', 'nginx', 'perl', 'sass', 'r', 'dockerfile', 'tiddlywiki', 'mediawiki', 'go', 'gherkin'].concat(hljs.listLanguages())
var supportCharts = ['sequence', 'flow', 'graphviz', 'mermaid', 'abc']
var supportHeaders = [
{
diff --git a/public/views/codimd/head.ejs b/public/views/codimd/head.ejs
index b76eb706..356ded6d 100644
--- a/public/views/codimd/head.ejs
+++ b/public/views/codimd/head.ejs
@@ -12,7 +12,6 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fork-awesome/1.1.3/css/fork-awesome.min.css" integrity="sha256-ZhApazu+kejqTYhMF+1DzNKjIzP7KXu6AzyXcC1gMus=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-social/4.9.0/bootstrap-social.min.css" integrity="sha256-02JtFTurpwBjQJ6q13iJe82/NF0RbZlJroDegK5g87Y=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
-<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/4.4.0/octicons.min.css" integrity="sha256-4eCms8tUm+iL29tUvmRhNRnz/7lNI4oTtQzqa/uM2dI=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/emojify.js/1.1.0/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
<%- include ../build/index-header %>
<%- include ../shared/polyfill %>
diff --git a/public/views/html.hbs b/public/views/html.hbs
index cc08b6fe..490d31a4 100644
--- a/public/views/html.hbs
+++ b/public/views/html.hbs
@@ -18,7 +18,6 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fork-awesome/1.1.3/css/fork-awesome.min.css" integrity="sha256-ZhApazu+kejqTYhMF+1DzNKjIzP7KXu6AzyXcC1gMus=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/4.4.0/octicons.min.css" integrity="sha256-4eCms8tUm+iL29tUvmRhNRnz/7lNI4oTtQzqa/uM2dI=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.5.1/themes/prism.min.css" integrity="sha256-vtR0hSWRc3Tb26iuN2oZHt3KRUomwTufNIf5/4oeCyg=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github-gist.min.css" integrity="sha256-tAflq+ymku3Khs+I/WcAneIlafYgDiOQ9stIHH985Wo=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/emojify.js/1.1.0/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
diff --git a/public/views/includes/header.ejs b/public/views/includes/header.ejs
index 1e2e8988..942a89f9 100644
--- a/public/views/includes/header.ejs
+++ b/public/views/includes/header.ejs
@@ -1,3 +1,3 @@
<% for (var css in htmlWebpackPlugin.files.css) { %>
-<link href="<%= webpackConfig.output.baseUrl %><%= htmlWebpackPlugin.files.css[css].path %>" rel="stylesheet">
+<link href="<%= webpackConfig.output.baseUrl %><%= htmlWebpackPlugin.files.css[css] %>" rel="stylesheet">
<% } %>
diff --git a/public/views/includes/scripts.ejs b/public/views/includes/scripts.ejs
index 519bd86b..c4f5aa5a 100644
--- a/public/views/includes/scripts.ejs
+++ b/public/views/includes/scripts.ejs
@@ -1,4 +1,4 @@
<script src="<%= webpackConfig.output.baseUrl %>/config"></script>
<% for (var js in htmlWebpackPlugin.files.js) { %>
-<script src="<%= webpackConfig.output.baseUrl %><%= htmlWebpackPlugin.files.js[js].path %>" defer></script>
+<script src="<%= webpackConfig.output.baseUrl %><%= htmlWebpackPlugin.files.js[js] %>" defer></script>
<% } %>
diff --git a/public/views/pretty.ejs b/public/views/pretty.ejs
index a20f2296..a087be7f 100644
--- a/public/views/pretty.ejs
+++ b/public/views/pretty.ejs
@@ -21,7 +21,6 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fork-awesome/1.1.3/css/fork-awesome.min.css" integrity="sha256-ZhApazu+kejqTYhMF+1DzNKjIzP7KXu6AzyXcC1gMus=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/4.4.0/octicons.min.css" integrity="sha256-4eCms8tUm+iL29tUvmRhNRnz/7lNI4oTtQzqa/uM2dI=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/emojify.js/1.1.0/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
<%- include build/pretty-header %>
<%- include shared/polyfill %>
diff --git a/public/views/shared/help-modal.ejs b/public/views/shared/help-modal.ejs
index 7d6576df..ec35b0e9 100644
--- a/public/views/shared/help-modal.ejs
+++ b/public/views/shared/help-modal.ejs
@@ -19,7 +19,7 @@
<br>
<a href="https://riot.im/app/#/room/#codimd:matrix.org" target="_blank"><i class="fa fa-hashtag fa-fw"></i> <%= __('Meet us on %s', 'Matrix') %></a>
<br>
- <a href="https://gitter.im/hackmdio/hackmd" target="_blank"><i class="fa fa-comments fa-fw"></i> <%= __('Meet us on %s', 'Gitter') %></a>
+ <a href="https://translate.codimd.org" target="_blank"><i class="fa fa-language fa-fw"></i> <%= __('Help us translating on %s', 'POEditor') %></a>
</div>
</div>
<div class="panel panel-default">
diff --git a/public/views/slide.ejs b/public/views/slide.ejs
index 2b069f2d..42fb5199 100644
--- a/public/views/slide.ejs
+++ b/public/views/slide.ejs
@@ -18,7 +18,6 @@
<% if(useCDN) { %>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fork-awesome/1.1.3/css/fork-awesome.min.css" integrity="sha256-ZhApazu+kejqTYhMF+1DzNKjIzP7KXu6AzyXcC1gMus=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/css/ionicons.min.css" integrity="sha256-3iu9jgsy9TpTwXKb7bNQzqWekRX7pPK+2OLj3R922fo=" crossorigin="anonymous" />
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/4.4.0/octicons.min.css" integrity="sha256-4eCms8tUm+iL29tUvmRhNRnz/7lNI4oTtQzqa/uM2dI=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.6.0/css/reveal.min.css" integrity="sha256-ol2N5Xr80jdDqxK0lte3orKGb9Ja3sOnpAUV7TTADmg=" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/emojify.js/1.1.0/css/basic/emojify.min.css" integrity="sha256-UOrvMOsSDSrW6szVLe8ZDZezBxh5IoIfgTwdNDgTjiU=" crossorigin="anonymous" />
<%- include build/slide-header %>
diff --git a/webpackBaseConfig.js b/webpack.common.js
index 8df19b71..1fbf247d 100644
--- a/webpackBaseConfig.js
+++ b/webpack.common.js
@@ -1,15 +1,16 @@
-var webpack = require('webpack')
-var path = require('path')
-var HtmlWebpackPlugin = require('html-webpack-plugin')
-var CopyWebpackPlugin = require('copy-webpack-plugin')
+const webpack = require('webpack')
+const path = require('path')
+const HtmlWebpackPlugin = require('html-webpack-plugin')
+const CopyWebpackPlugin = require('copy-webpack-plugin')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
// Fix possible nofile-issues
-var fs = require('fs')
-var gracefulFs = require('graceful-fs')
+const fs = require('fs')
+const gracefulFs = require('graceful-fs')
gracefulFs.gracefulify(fs)
module.exports = {
+ name: 'app',
plugins: [
new webpack.ProvidePlugin({
Visibility: 'visibilityjs',
@@ -238,8 +239,7 @@ module.exports = {
path.join(__dirname, 'node_modules/bootstrap/dist/css/bootstrap.min.css'),
path.join(__dirname, 'node_modules/fork-awesome/css/fork-awesome.min.css'),
path.join(__dirname, 'public/css/bootstrap-social.css'),
- path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css'),
- path.join(__dirname, 'node_modules/octicons/build/octicons.css')
+ path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css')
],
'index-pack': [
'babel-polyfill',
@@ -288,8 +288,7 @@ module.exports = {
'pretty-styles-pack': [
path.join(__dirname, 'node_modules/bootstrap/dist/css/bootstrap.min.css'),
path.join(__dirname, 'node_modules/fork-awesome/css/fork-awesome.min.css'),
- path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css'),
- path.join(__dirname, 'node_modules/octicons/build/octicons.css')
+ path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css')
],
'pretty-pack': [
'babel-polyfill',
@@ -325,8 +324,7 @@ module.exports = {
],
'slide-styles-pack': [
path.join(__dirname, 'node_modules/fork-awesome/css/fork-awesome.min.css'),
- path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css'),
- path.join(__dirname, 'node_modules/octicons/build/octicons.css')
+ path.join(__dirname, 'node_modules/ionicons/css/ionicons.min.css')
],
'slide-pack': [
'babel-polyfill',
@@ -394,7 +392,7 @@ module.exports = {
module: {
rules: [{
test: /\.js$/,
- use: [{loader: 'babel-loader'}],
+ use: [{ loader: 'babel-loader' }],
exclude: [/node_modules/, /public\/vendor/]
}, {
test: /\.css$/,
@@ -430,43 +428,43 @@ module.exports = {
test: require.resolve('js-sequence-diagrams'),
use: [{
loader: 'imports-loader',
- options: {_: 'lodash', Raphael: 'raphael', eve: 'eve'}
+ options: { _: 'lodash', Raphael: 'raphael', eve: 'eve' }
}]
}, {
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
- use: [{loader: 'file-loader'}]
+ use: [{ loader: 'file-loader' }]
}, {
test: /\.html$/,
- use: [{loader: 'string-loader'}]
+ use: [{ loader: 'string-loader' }]
}, {
test: /\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'url-loader',
- options: {prefix: 'font/', limit: '5000'}
+ options: { prefix: 'font/', limit: '5000' }
}]
}, {
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'url-loader',
- options: {limit: '5000', mimetype: 'application/octet-stream'}
+ options: { limit: '5000', mimetype: 'application/octet-stream' }
}]
}, {
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'url-loader',
- options: {limit: '10000', mimetype: 'svg+xml'}
+ options: { limit: '10000', mimetype: 'svg+xml' }
}]
}, {
test: /\.png(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'url-loader',
- options: {limit: '10000', mimetype: 'image/png'}
+ options: { limit: '10000', mimetype: 'image/png' }
}]
}, {
test: /\.gif(\?v=\d+\.\d+\.\d+)?$/,
use: [{
loader: 'url-loader',
- options: {limit: '10000', mimetype: 'image/gif'}
+ options: { limit: '10000', mimetype: 'image/gif' }
}]
}]
},
diff --git a/webpack.config.js b/webpack.config.js
deleted file mode 100644
index 3c7c727e..00000000
--- a/webpack.config.js
+++ /dev/null
@@ -1,41 +0,0 @@
-var baseConfig = require('./webpackBaseConfig')
-const MiniCssExtractPlugin = require('mini-css-extract-plugin')
-var path = require('path')
-
-module.exports = [Object.assign({}, baseConfig, {
- plugins: baseConfig.plugins.concat([
- new MiniCssExtractPlugin({
- filename: '[name].css',
- chunkFilename: '[id].css'
- })
-
- ]),
- devtool: 'source-map'
-}), {
- devtool: 'source-map',
- entry: {
- htmlExport: path.join(__dirname, 'public/js/htmlExport.js')
- },
- module: {
- rules: [{
- test: /\.css$/,
- use: ['style-loader', 'css-loader']
- }, {
- test: /\.scss$/,
- use: ['style-loader', 'sass-loader']
- }, {
- test: /\.less$/,
- use: ['style-loader', 'less-loader']
- }]
- },
- output: {
- path: path.join(__dirname, 'public/build'),
- publicPath: '/build/',
- filename: '[name].js'
- },
- plugins: [
- new MiniCssExtractPlugin({
- filename: 'html.min.css'
- })
- ]
-}]
diff --git a/webpack.dev.js b/webpack.dev.js
new file mode 100644
index 00000000..b1ed3612
--- /dev/null
+++ b/webpack.dev.js
@@ -0,0 +1,14 @@
+const common = require('./webpack.common.js')
+const htmlexport = require('./webpack.htmlexport')
+const merge = require('webpack-merge')
+
+module.exports = [
+ // merge common config
+ merge(common, {
+ mode: 'development',
+ devtool: 'cheap-module-eval-source-map'
+ }),
+ merge(htmlexport, {
+ mode: 'development',
+ devtool: 'cheap-module-eval-source-map'
+ })]
diff --git a/webpack.htmlexport.js b/webpack.htmlexport.js
new file mode 100644
index 00000000..dd6f4c01
--- /dev/null
+++ b/webpack.htmlexport.js
@@ -0,0 +1,25 @@
+const MiniCssExtractPlugin = require('mini-css-extract-plugin')
+const path = require('path')
+
+module.exports = {
+ name: 'save-as-html',
+ entry: {
+ htmlExport: path.join(__dirname, 'public/js/htmlExport.js')
+ },
+ module: {
+ rules: [{
+ test: /\.css$/,
+ use: [MiniCssExtractPlugin.loader, 'css-loader']
+ }]
+ },
+ output: {
+ path: path.join(__dirname, 'public/build'),
+ publicPath: '/build/',
+ filename: '[name].js'
+ },
+ plugins: [
+ new MiniCssExtractPlugin({
+ filename: 'html.min.css'
+ })
+ ]
+}
diff --git a/webpack.prod.js b/webpack.prod.js
new file mode 100644
index 00000000..188d9881
--- /dev/null
+++ b/webpack.prod.js
@@ -0,0 +1,23 @@
+const common = require('./webpack.common.js')
+const htmlexport = require('./webpack.htmlexport')
+const merge = require('webpack-merge')
+const path = require('path')
+const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
+
+module.exports = [
+ merge(common, {
+ mode: 'production',
+ output: {
+ path: path.join(__dirname, 'public/build'),
+ publicPath: '/build/',
+ filename: '[name].[contenthash].js'
+ }
+ }),
+ merge(htmlexport, {
+ mode: 'production',
+ optimization: {
+ minimizer: [
+ new OptimizeCSSAssetsPlugin({})
+ ]
+ }
+ })]
diff --git a/webpack.production.js b/webpack.production.js
deleted file mode 100644
index 67387583..00000000
--- a/webpack.production.js
+++ /dev/null
@@ -1,75 +0,0 @@
-var baseConfig = require('./webpackBaseConfig')
-var webpack = require('webpack')
-var path = require('path')
-const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin')
-const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
-const MiniCssExtractPlugin = require('mini-css-extract-plugin')
-
-module.exports = [Object.assign({}, baseConfig, {
- plugins: baseConfig.plugins.concat([
- new webpack.DefinePlugin({
- 'process.env': {
- 'NODE_ENV': JSON.stringify('production')
- }
- })
- ]),
-
- optimization: {
- minimizer: [
- new UglifyJsPlugin({
- parallel: true,
- cache: true
- })
- ],
- splitChunks: {
- chunks: 'async',
- minChunks: Infinity
- }
- },
-
- output: {
- path: path.join(__dirname, 'public/build'),
- publicPath: '/build/',
- filename: '[id].[name].[hash].js'
- // baseUrl: '<%- url %>'
- }
-}), {
- // This Chunk is used in the 'save as html' feature.
- // It is embedded in the html file and contains CSS for styling.
-
- entry: {
- htmlExport: path.join(__dirname, 'public/js/htmlExport.js')
- },
-
- output: {
- path: path.join(__dirname, 'public/build'),
- publicPath: '/build/',
- filename: '[name].js'
- },
- plugins: [
- new webpack.DefinePlugin({
- 'process.env': {
- 'NODE_ENV': JSON.stringify('production')
- }
- }),
- new MiniCssExtractPlugin({
- filename: 'html.min.css'
- })
- ],
-
- optimization: {
- minimizer: [
- new OptimizeCSSAssetsPlugin({})
- ]
- },
-
- module: {
- rules: [{
- test: /\.css$/,
- use: [
- MiniCssExtractPlugin.loader,
- 'css-loader'
- ]
- }]
- }
-}]
diff --git a/yarn.lock b/yarn.lock
index ef1be26e..bddcab02 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -101,11 +101,6 @@
"@types/express-serve-static-core" "*"
"@types/mime" "*"
-"@types/tapable@1.0.2":
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.2.tgz#e13182e1b69871a422d7863e11a4a6f5b814a4bd"
- integrity sha512-42zEJkBpNfMEAvWR5WlwtTH22oDzcMjFsL9gDGExwF8X8WvAiw7Vwop7hPw03QT8TKfec83LwbHj6SvpqM4ELQ==
-
"@webassemblyjs/ast@1.5.13":
version "1.5.13"
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.5.13.tgz#81155a570bd5803a30ec31436bc2c9c0ede38f25"
@@ -2041,12 +2036,12 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"
-clean-css@4.1.x:
- version "4.1.11"
- resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.1.11.tgz#2ecdf145aba38f54740f26cefd0ff3e03e125d6a"
- integrity sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=
+clean-css@4.2.x:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17"
+ integrity sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==
dependencies:
- source-map "0.5.x"
+ source-map "~0.6.0"
cli-color@~1.2.0:
version "1.2.0"
@@ -2250,10 +2245,10 @@ combined-stream@~1.0.6:
dependencies:
delayed-stream "~1.0.0"
-commander@2.15.x, commander@~2.15.0:
- version "2.15.1"
- resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
- integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==
+commander@2.17.x:
+ version "2.17.1"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf"
+ integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==
commander@^2.11.0, commander@^2.2.0, commander@^2.3.0, commander@^2.9.0:
version "2.16.0"
@@ -2265,6 +2260,11 @@ commander@~2.13.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
integrity sha512-MVuS359B+YzaWqjCL/c+22gfryv+mCBPHAv3zyVI2GN8EY6IRP8VwtasXn8jyyhvvq84R4ImN1OKRtcbIasjYA==
+commander@~2.15.0:
+ version "2.15.1"
+ resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
+ integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==
+
commondir@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
@@ -3963,6 +3963,11 @@ fd-slicer@~1.0.1:
dependencies:
pend "~1.2.0"
+feature-policy@0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/feature-policy/-/feature-policy-0.1.0.tgz#782d4865b1f261aa6ff6d0bba0c4eaeb2fd92862"
+ integrity sha512-Sq+O5vUN0wQGOLGKzDXY1xCY6dOPic2ufMEF0xpVHIW+Dr8LocJ7Jhnvo5ZBCXKqWUgmGIqcF5AIJR+Wnq2SQw==
+
figures@^1.0.1, figures@^1.3.5:
version "1.7.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
@@ -4889,27 +4894,33 @@ he@1.1.x, he@^1.1.1:
resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0=
-helmet-csp@2.7.0:
- version "2.7.0"
- resolved "https://registry.yarnpkg.com/helmet-csp/-/helmet-csp-2.7.0.tgz#7934094617d1feb7bb2dc43bb7d9e8830f774716"
- integrity sha512-IGIAkWnxjRbgMXFA2/kmDqSIrIaSfZ6vhMHlSHw7jm7Gm9nVVXqwJ2B1YEpYrJsLrqY+w2Bbimk7snux9+sZAw==
+helmet-crossdomain@0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/helmet-crossdomain/-/helmet-crossdomain-0.3.0.tgz#707e2df930f13ad61f76ed08e1bb51ab2b2e85fa"
+ integrity sha512-YiXhj0E35nC4Na5EPE4mTfoXMf9JTGpN4OtB4aLqShKuH9d2HNaJX5MQoglO6STVka0uMsHyG5lCut5Kzsy7Lg==
+
+helmet-csp@2.7.1:
+ version "2.7.1"
+ resolved "https://registry.yarnpkg.com/helmet-csp/-/helmet-csp-2.7.1.tgz#e8e0b5186ffd4db625cfcce523758adbfadb9dca"
+ integrity sha512-sCHwywg4daQ2mY0YYwXSZRsgcCeerUwxMwNixGA7aMLkVmPTYBl7gJoZDHOZyXkqPrtuDT3s2B1A+RLI7WxSdQ==
dependencies:
camelize "1.0.0"
content-security-policy-builder "2.0.0"
dasherize "2.0.0"
- lodash.reduce "4.6.0"
platform "1.3.5"
-helmet@^3.3.0:
- version "3.12.1"
- resolved "https://registry.yarnpkg.com/helmet/-/helmet-3.12.1.tgz#8b05bbd60f3966d70f13dad0de2c1d6c1a8303f1"
- integrity sha512-/CsAcbPIHgiGde395IkHUZyRLW126RJ6AtxFy6Y6bxhd44Qq8cZ5BBFZ0xNUSbcgX57j32Emh3OhWz/0XgAB5Q==
+helmet@^3.13.0:
+ version "3.14.0"
+ resolved "https://registry.yarnpkg.com/helmet/-/helmet-3.14.0.tgz#ff99e0467fe3e9205300071370024dd6e6690317"
+ integrity sha512-VUOjHxegTX/dIr1KeU4ZrIkP8k0/nKKD6vNBT1LCS2+q5KO1oMFKGMVdMw/pUcxXbn/z8yP9rfyMZSTpxXPPMg==
dependencies:
dns-prefetch-control "0.1.0"
dont-sniff-mimetype "1.0.0"
expect-ct "0.1.1"
+ feature-policy "0.1.0"
frameguard "3.0.0"
- helmet-csp "2.7.0"
+ helmet-crossdomain "0.3.0"
+ helmet-csp "2.7.1"
hide-powered-by "1.0.0"
hpkp "2.0.0"
hsts "2.1.0"
@@ -5004,30 +5015,29 @@ html-encoding-sniffer@^1.0.1:
dependencies:
whatwg-encoding "^1.0.1"
-html-minifier@^3.2.3:
- version "3.5.17"
- resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.17.tgz#fe9834c4288e4d5b4dfe18fbc7f3f811c108e5ea"
- integrity sha512-O+StuKL0UWfwX5Zv4rFxd60DPcT5DVjGq1AlnP6VQ8wzudft/W4hx5Wl98aSYNwFBHY6XWJreRw/BehX4l+diQ==
+html-minifier@^3.5.20:
+ version "3.5.20"
+ resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.20.tgz#7b19fd3caa0cb79f7cde5ee5c3abdf8ecaa6bb14"
+ integrity sha512-ZmgNLaTp54+HFKkONyLFEfs5dd/ZOtlquKaTnqIWFmx3Av5zG6ZPcV2d0o9XM2fXOTxxIf6eDcwzFFotke/5zA==
dependencies:
camel-case "3.0.x"
- clean-css "4.1.x"
- commander "2.15.x"
+ clean-css "4.2.x"
+ commander "2.17.x"
he "1.1.x"
param-case "2.1.x"
relateurl "0.2.x"
uglify-js "3.4.x"
-html-webpack-plugin@^4.0.0-alpha:
- version "4.0.0-alpha"
- resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.0.0-alpha.tgz#b2c7b6d4885a209c999dfce3ffb9866e2c8c0eaa"
- integrity sha1-sse21IhaIJyZnfzj/7mGbiyMDqo=
+html-webpack-plugin@4.0.0-beta.2:
+ version "4.0.0-beta.2"
+ resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-4.0.0-beta.2.tgz#c3a212448ee198a17dacd06525678ee12f917420"
+ integrity sha512-153QgkvYPOc1X5/v1GFPcq7GTinNheGA1lMZUGRMFkwIQ4kegGna+wQ0ByJ8uNgw4u1aEg9FtsSKs4AzsYMi9g==
dependencies:
- "@types/tapable" "1.0.2"
- html-minifier "^3.2.3"
+ html-minifier "^3.5.20"
loader-utils "^1.1.0"
- lodash "^4.17.10"
- pretty-error "^2.0.2"
- tapable "^1.0.0"
+ lodash "^4.17.11"
+ pretty-error "^2.1.1"
+ tapable "^1.1.0"
util.promisify "1.0.0"
htmlparser2@3.8.x:
@@ -6359,7 +6369,7 @@ lodash.pick@^4.2.1:
resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
integrity sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=
-lodash.reduce@4.6.0, lodash.reduce@^4.4.0:
+lodash.reduce@^4.4.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b"
integrity sha1-8atrg5KZrUj3hKu/R2WW8DuRTTs=
@@ -6422,6 +6432,11 @@ lodash@^4.0.0, lodash@^4.11.1, lodash@^4.14.2, lodash@^4.17.0, lodash@^4.17.10,
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==
+lodash@^4.17.11:
+ version "4.17.11"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
+ integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
+
lodash@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551"
@@ -7490,11 +7505,6 @@ object.values@^1.0.4:
function-bind "^1.1.0"
has "^1.0.1"
-octicons@~4.4.0:
- version "4.4.0"
- resolved "https://registry.yarnpkg.com/octicons/-/octicons-4.4.0.tgz#aca3bd32f5dc1d907a8d0de744f78e0c54e19446"
- integrity sha1-rKO9MvXcHZB6jQ3nRPeODFThlEY=
-
on-finished@~2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
@@ -8524,7 +8534,7 @@ pretty-bytes@^1.0.0:
get-stdin "^4.0.1"
meow "^3.1.0"
-pretty-error@^2.0.2:
+pretty-error@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3"
integrity sha1-X0+HyPkeWuPzuoerTPXgOxoX8aM=
@@ -9843,11 +9853,6 @@ source-map@0.5.0:
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.0.tgz#0fe96503ac86a5adb5de63f4e412ae4872cdbe86"
integrity sha1-D+llA6yGpa213mP05BKuSHLNvoY=
-source-map@0.5.x, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1:
- version "0.5.7"
- resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
- integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
-
source-map@^0.4.4:
version "0.4.4"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
@@ -9855,7 +9860,12 @@ source-map@^0.4.4:
dependencies:
amdefine ">=0.0.4"
-source-map@^0.6.1, source-map@~0.6.1:
+source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
+ integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=
+
+source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
@@ -10294,6 +10304,11 @@ tapable@^1.0.0:
resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2"
integrity sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==
+tapable@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.0.tgz#0d076a172e3d9ba088fd2272b2668fb8d194b78c"
+ integrity sha512-IlqtmLVaZA2qab8epUXbVWRn3aB1imbDMJtjB3nu4X0NqPkcY/JH9ZtCBWKHWPxs8Svi9tyo8w2dBoi07qZbBA==
+
tar-stream@^1.5.0:
version "1.6.1"
resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.1.tgz#f84ef1696269d6223ca48f6e1eeede3f7e81f395"
@@ -11168,6 +11183,13 @@ webpack-cli@^3.1.0:
v8-compile-cache "^2.0.0"
yargs "^12.0.1"
+webpack-merge@^4.1.4:
+ version "4.1.4"
+ resolved "https://registry.yarnpkg.com/webpack-merge/-/webpack-merge-4.1.4.tgz#0fde38eabf2d5fd85251c24a5a8c48f8a3f4eb7b"
+ integrity sha512-TmSe1HZKeOPey3oy1Ov2iS3guIZjWvMT2BBJDzzT5jScHTjVC3mpjJofgueEzaEd6ibhxRDD6MIblDr8tzh8iQ==
+ dependencies:
+ lodash "^4.17.5"
+
webpack-parallel-uglify-plugin@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/webpack-parallel-uglify-plugin/-/webpack-parallel-uglify-plugin-1.1.0.tgz#252a6c796bf79a8047b00de2cf08c23aa9861441"