Skip to content

Commit

Permalink
Merge pull request #1073 from dm3-org/version-dynamic
Browse files Browse the repository at this point in the history
Version dynamic
  • Loading branch information
AlexNi245 authored Jul 2, 2024
2 parents 5d7d645 + d2bdd33 commit 73ddfaa
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
3 changes: 2 additions & 1 deletion packages/messenger-widget/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
"clean": "rm -rf lib/",
"build:esm": "tsc",
"build:cjs": "tsc --module commonjs --outDir lib/cjs",
"build": "yarn clean && yarn build:esm && yarn build:cjs && bash build-script.sh",
"build": "yarn clean && yarn version:output && yarn build:esm && yarn build:cjs && bash build-script.sh",
"version:output": "echo 'export const version = \"'$npm_package_version'\";' > ./src/version.ts",
"start:example": "react-app-rewired start",
"lint": "eslint '*/**/*.{js,ts,tsx}' --fix",
"format": "prettier --write '*/**/*.{js,ts,tsx,json}'",
Expand Down
4 changes: 2 additions & 2 deletions packages/messenger-widget/src/components/About/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
SPECIFICATION,
openUrlInNewTab,
} from '../../utils/common-utils';
import { dm3Config } from '../../config';
import { version } from '../../version';

export default function About() {
const { setShowAboutModal } = useContext(ModalContext);
Expand All @@ -29,7 +29,7 @@ export default function About() {
<div className="width-fill">
<h4 className="font-weight-800 mb-1">About: dm3</h4>
<div className="font-weight-500 font-size-12">
Version: {dm3Config.version}
Version: {version}
</div>
</div>
<img
Expand Down
6 changes: 2 additions & 4 deletions packages/messenger-widget/src/components/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import { UiViewContext } from '../../context/UiViewContext';
import { ModalContext } from '../../context/ModalContext';
import { useDisconnect } from 'wagmi';
import { dm3Config } from '../../config';
import { version } from '../../version';

export default function Menu() {
const {
Expand Down Expand Up @@ -131,9 +131,7 @@ export default function Menu() {
>
<hr className="line-separator text-secondary-color" />
<div className="font-weight-800 text-secondary-color">dm3</div>
<div className="text-secondary-color">
Version {dm3Config.version}
</div>
<div className="text-secondary-color">Version {version}</div>
<div
className="text-secondary-color pointer-cursor"
onClick={() => openUrlInNewTab(DM3_NETWORK)}
Expand Down
3 changes: 0 additions & 3 deletions packages/messenger-widget/src/config.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/messenger-widget/src/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const version = '1.4.1';
1 change: 1 addition & 0 deletions packages/messenger-widget/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"allowJs": true,
"declaration": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"esModuleInterop": true,
"noImplicitThis": true,
"noImplicitAny": true,
Expand Down

0 comments on commit 73ddfaa

Please sign in to comment.