Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Environment variable setup, node demo app #13

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
HEADLESS_REACTION_SVG=true
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ navigate to into reaction-svg-composer and execute
npm link
yarn compile
```
### Development - ali 14.02.2024
set .env (HEADLESS_REACTION_SVG=true) in root directory
run following: node .\example\index.js



## Acknowledgments
Expand Down
238 changes: 238 additions & 0 deletions example/index.js

Large diffs are not rendered by default.

198 changes: 198 additions & 0 deletions example/test2.json

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@types/jest": "^29.5.3",
"@typescript-eslint/eslint-plugin": "^6.4.0",
"@typescript-eslint/parser": "^6.4.0",
"cross-env": "^7.0.3",
"eslint": "^8.47.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
Expand All @@ -28,16 +29,17 @@
"typescript": "^5.1.6"
},
"scripts": {
"compile": "yarn run tscEs && yarn run tscCommon",
"compile": "yarn run tscEs && yarn run tscCommon && yarn run test",
"tscEs": "tsc -p tsconfig.esm.json",
"tscCommon": "tsc -p tsconfig.cjs.json",
"lint": "eslint --fix",
"start": "node --experimental-json-modules lib/esm/index.js",
"test": "NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" HEADLESS_REACTION_SVG=true jest",
"test": "cross-env NODE_OPTIONS=--experimental-vm-modules HEADLESS_REACTION_SVG=true jest",
"prepare": "yarn run tscEs && yarn run tscCommon"
},
"dependencies": {
"@svgdotjs/svg.js": "^3.2.0",
"dotenv": "^16.4.7",
"svgdom": "^0.1.14"
},
"exports": {
Expand Down
14 changes: 13 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,14 @@ create-require@^1.1.0:
resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333"
integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==

cross-spawn@^7.0.2, cross-spawn@^7.0.3:
cross-env@^7.0.3:
version "7.0.3"
resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf"
integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==
dependencies:
cross-spawn "^7.0.1"

cross-spawn@^7.0.1, cross-spawn@^7.0.2, cross-spawn@^7.0.3:
version "7.0.6"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f"
integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==
Expand Down Expand Up @@ -1729,6 +1736,11 @@ domexception@^4.0.0:
dependencies:
webidl-conversions "^7.0.0"

dotenv@^16.4.7:
version "16.4.7"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.7.tgz#0e20c5b82950140aa99be360a8a5f52335f53c26"
integrity sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==

electron-to-chromium@^1.4.284:
version "1.4.288"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.288.tgz#bbce00eb03c1819fe3d0d0d861374b76c53f7507"
Expand Down