From 8d8c6e53019706639a4ed4a2fc4341458929df7e Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 24 Aug 2021 12:09:21 +0100 Subject: [PATCH] Setup production build script in package.json and readme.md --- README.md | 12 ++++++++++++ package.json | 1 + 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index 8c06826bd9..569e3be0a1 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,18 @@ Run `nx serve` and open `http://127.0.0.1:8080` in your browser. Then open your `text editor` and start developing. The browser will automatically refresh when files are saved. +## Production Build +To generate react production builds for remix-project. +```bash +npm run build:production +``` +build can be found in `remix-project/dist/apps/remix-ide` directory. + +```bash +npm run serve:production +``` +production build will be served by default to `http://localhost:8080/` or `http://127.0.0.1:8080/` + ## Docker: Prerequisites: diff --git a/package.json b/package.json index 3b86709188..1a4c330664 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ "make-mock-compiler": "node apps/remix-ide/ci/makeMockCompiler.js", "minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false", "build:production": "NODE_ENV=production npx nx build remix-ide --with-deps", + "serve:production": "npx http-server ./dist/apps/remix-ide", "nightwatch_parallel": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome,firefox", "nightwatch_local_firefox": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=firefox", "nightwatch_local_chrome": "npm run build:e2e && nightwatch --config dist/apps/remix-ide-e2e/nightwatch.js --env=chrome",