From 952cdb2d842130d925f077c05a5b7c56885a3dcb Mon Sep 17 00:00:00 2001 From: Ivan Borshchov Date: Wed, 26 May 2021 17:55:21 +0300 Subject: [PATCH] fixes --- .eslintrc.js | 28 ---------------------------- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ build/index.html | 4 ---- package.json | 2 +- 4 files changed, 42 insertions(+), 33 deletions(-) delete mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index a129b12..0000000 --- a/.eslintrc.js +++ /dev/null @@ -1,28 +0,0 @@ -// http://eslint.org/docs/user-guide/configuring - -module.exports = { - root: true, - parserOptions: { - sourceType: 'module' - }, - env: { - browser: true, - }, - extends: 'airbnb-base', - // check if imports actually resolve - 'settings': { - // 'import/resolver': { - // 'webpack': { - // 'config': 'webpack.config.js' - // } - // } - }, - // add your custom rules here - 'rules': { - 'no-param-reassign': ["error", { "props": false }], - 'no-console': ["error", { allow: ["warn", "error"] }], - // allow debugger during development - 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, - 'import/no-extraneous-dependencies': ["error", {"devDependencies": true}] - } -}; diff --git a/README.md b/README.md index d8b17ca..7fb90f7 100644 --- a/README.md +++ b/README.md @@ -355,6 +355,8 @@ Translated languages: | `pt-PT` | European Portuguese | | `pt-BR` | Brazilian Portuguese | | `ru` | Russian | +| `nl` | Dutch | + If you want to add another language, then: @@ -578,6 +580,43 @@ npm run dev ``` Then open http://localhost:8080 with demo page + +Editing source on the fly for painterro imported from side webpack app (e.g. your project SPA) +------------------------------------------ + +1. If your side app uses 'eslint' it, most likely side app will need eslint-plugin-import: + +``` +npm i eslint-plugin-import +``` + +2. Since compiled painterro commonjs2 file already linted and minimized you need to exclude it from linting: + +Add to package.json of your side app: +``` + "eslintIgnore": [ + "/home/ivan/devforth/painterro/build/painterro2.commonjs.js" + ], +``` +where `/home/ivan/devforth/painterro` is a folder with Painterro sources + +3. Replace + +``` +import Painterro from 'painterro'; +``` +with + +``` +import Painterro from '/home/ivan/devforth/painterro/build/painterro.commonjs2.js'; +``` + +4. Go to painterro source folder and run: + +``` +watch npm run build +``` + Regenerating icons font ----------------------- @@ -589,6 +628,8 @@ npm run buildfont For font generation we use method described here: [How to generate a webfont (automated setup)](https://hinty.io/brucehardywald/how-to-generate-a-webfont-automated-setup/) + + Contributing ------------ diff --git a/build/index.html b/build/index.html index 4457f62..5929283 100644 --- a/build/index.html +++ b/build/index.html @@ -22,13 +22,9 @@ display: flex; } - - - {% comment %}
{% endcomment %} -
diff --git a/package.json b/package.json index 4a02b0c..26abed2 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "prepare": "npm run build", "test": "echo \"Error: no test specified\" && exit 1", "build": "webpack --progress", - "dev": "webpack serve --open --host 127.0.0.1", + "dev": "webpack serve --open --host 127.0.0.1 --port 3000", "watch": "webpack --watch", "buildfont": "node generate_font.js" },