diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml index b3a946db..88955fcb 100644 --- a/.github/workflows/deploy-website.yml +++ b/.github/workflows/deploy-website.yml @@ -35,7 +35,7 @@ jobs: - name: Install dependencies run: npm install - name: Build with npm - run: npm run build + run: RECHARTS_LATEST_VERSION=`curl -X GET "https://registry.npmjs.org/recharts/latest" | jq --raw-output '.version'` npm run build - name: Setup Pages uses: actions/configure-pages@v3 - name: Upload artifact diff --git a/src/views/IndexView.js b/src/views/IndexView.js index f1ab6ec3..7163036e 100644 --- a/src/views/IndexView.js +++ b/src/views/IndexView.js @@ -6,7 +6,6 @@ import { getLocaleType, localeGet } from '../utils/LocaleUtils'; import './IndexView.scss'; import 'simple-line-icons/scss/simple-line-icons.scss'; import users from '../docs/users/users'; -import rechartsPackageJson from 'recharts/package.json'; const data = [ { @@ -69,8 +68,9 @@ class IndexView extends PureComponent {

+   {localeGet(locale, 'home', 'install')} -  v{rechartsPackageJson.version} + {process.env.RECHARTS_LATEST_VERSION ? ` v${process.env.RECHARTS_LATEST_VERSION}` : undefined}