diff --git a/build.bat b/build.bat index 10da9ff..7a5c155 100644 --- a/build.bat +++ b/build.bat @@ -1 +1 @@ -npm run build \ No newline at end of file +node build.js diff --git a/build.js b/build.js new file mode 100644 index 0000000..0ccf591 --- /dev/null +++ b/build.js @@ -0,0 +1,5 @@ +const { execSync } = require('child_process'); + +process.env.REACT_APP_BUILD_TIME = new Date().getTime(); + +execSync('npm run build', { stdio: 'inherit' }); diff --git a/src/views/Welcome.jsx b/src/views/Welcome.jsx index 434f7db..b030685 100644 --- a/src/views/Welcome.jsx +++ b/src/views/Welcome.jsx @@ -1,19 +1,17 @@ -import { useContext } from 'react'; import { observer } from 'mobx-react'; -import { stores_Context, APP_VERSION } from '../config'; -import { Table } from 'antd'; +import moment from 'moment'; +import { APP_VERSION } from '../config'; import { SlackOutlined, SketchOutlined, AntCloudOutlined, RedditOutlined, GithubOutlined } from '@ant-design/icons'; export default observer((props) => { - // const { } = useContext(stores_Context); + const compileTime = moment(Number(process.env.REACT_APP_BUILD_TIME)).format('YYYY-MM-DD ddd HH:mm:ss'); return ( <>