diff --git a/README.md b/README.md index 64e343e..ae066cb 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This project was bootstrapped with [Create React App](https://github.com/faceboo In the project directory, you can run: -### `yarn start` +### `npm start` Runs the app in the development mode.
Open [http://localhost:3000](http://localhost:3000) to view it in the browser. @@ -12,12 +12,12 @@ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.
You will also see any lint errors in the console. -### `yarn test` +### `npm test` Launches the test runner in the interactive watch mode.
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. -### `yarn build` +### `npm build` Builds the app for production to the `build` folder.
It correctly bundles React in production mode and optimizes the build for the best performance. @@ -27,7 +27,7 @@ Your app is ready to be deployed! See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. -### `yarn eject` +### ~~`npm eject`~~ **Note: this is a one-way operation. Once you `eject`, you can’t go back!** diff --git a/craco.config.js b/craco.config.js index 44536fa..0e10c75 100644 --- a/craco.config.js +++ b/craco.config.js @@ -3,6 +3,7 @@ const { when, whenDev, whenProd, whenTest, ESLINT_MODES, POSTCSS_MODES } = requi const CracoLessPlugin = require('craco-less'); const CracoAntDesignPlugin = require("craco-antd"); const CracoAlias = require("craco-alias"); +const OpenBrowserPlugin = require("open-browser-webpack-plugin"); module.exports = { reactScriptsVersion: "react-scripts", @@ -17,7 +18,8 @@ module.exports = { source: 'tsconfig', tsConfigPath: 'tsconfig.paths.json', } - } + }, + { plugin: new OpenBrowserPlugin({ url: 'http://localhost:3000' }) } ], // style: { // modules: { diff --git a/package-lock.json b/package-lock.json index 62ea49a..99957da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4808,6 +4808,37 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" }, + "axios": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "requires": { + "follow-redirects": "1.5.10" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "requires": { + "debug": "=3.1.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, "axobject-query": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", @@ -6252,8 +6283,7 @@ "craco-alias": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/craco-alias/-/craco-alias-2.1.1.tgz", - "integrity": "sha512-rTYOcHYlcCES0XUOcUgcCOXe6s+FvR1dTupvMYfeLLtQ4NWW143i3KtATXlNegBDyj/dZqtBEv6OieGG3yPZzg==", - "dev": true + "integrity": "sha512-rTYOcHYlcCES0XUOcUgcCOXe6s+FvR1dTupvMYfeLLtQ4NWW143i3KtATXlNegBDyj/dZqtBEv6OieGG3yPZzg==" }, "craco-antd": { "version": "1.18.1", @@ -11290,6 +11320,23 @@ } } }, + "open-browser-webpack-plugin": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/open-browser-webpack-plugin/-/open-browser-webpack-plugin-0.0.5.tgz", + "integrity": "sha1-Xm3G+Lh5czHiEphd4hhXLYTAUh8=", + "dev": true, + "requires": { + "open": "0.0.5" + }, + "dependencies": { + "open": { + "version": "0.0.5", + "resolved": "https://registry.npmjs.org/open/-/open-0.0.5.tgz", + "integrity": "sha1-QsPhjslUZra/DcQvOilFw/DK2Pw=", + "dev": true + } + } + }, "opn": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/opn/-/opn-5.5.0.tgz", diff --git a/package.json b/package.json index 2e184d6..5595dfb 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,8 @@ "@types/recoil": "0.0.1", "@types/styled-components": "^5.1.1", "antd": "^4.4.2", + "axios": "^0.19.2", + "craco-alias": "^2.1.1", "craco-antd": "^1.18.1", "craco-less": "^1.17.0", "less": "^3.12.0", @@ -26,8 +28,7 @@ "react-scripts": "3.4.1", "recoil": "0.0.10", "styled-components": "^5.1.1", - "typescript": "~3.7.2", - "craco-alias": "^2.1.1" + "typescript": "~3.7.2" }, "scripts": { "start": "craco start", @@ -51,5 +52,6 @@ ] }, "devDependencies": { + "open-browser-webpack-plugin": "0.0.5" } }