Skip to content

Commit

Permalink
fix: config env example
Browse files Browse the repository at this point in the history
  • Loading branch information
thiendang committed Mar 12, 2024
1 parent f5c3902 commit 09ebc36
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 229 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@ jobs:
working_directory: ${{env.working-directory}}
- run: pnpm config set enable-pre-post-scripts true
working-directory: ${{env.working-directory}}
- run: pnpm --filter microfrontends build
working-directory: ${{env.working-directory}}
- run: pnpm -r --parallel run create:manifest
working-directory: ${{env.working-directory}}
- run: |
echo "PUBLIC_URL=/admin-microfrontends" >> shell/.env
pnpm run -r build
pnpm -r --parallel run build
working-directory: ${{env.working-directory}}
- run: pnpm -r --parallel run build
working-directory: ${{env.working-directory}}
- run: pnpm run -r copy:build
- run: pnpm -r --parallel run copy:build
working-directory: ${{env.working-directory}}
- run: pnpm run -r copy:manifests
- run: pnpm -r --parallel run copy:manifests
working-directory: ${{env.working-directory}}
- run: ls -ah shell/build
working-directory: ${{env.working-directory}}
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ jobs:
working_directory: ${{env.working-directory}}
- run: pnpm config set enable-pre-post-scripts true
working-directory: ${{env.working-directory}}
- run: pnpm run -r build
- run: pnpm --filter microfrontends build
working-directory: ${{env.working-directory}}
- run: pnpm run -r copy:build
- run: pnpm -r --parallel run create:manifest
working-directory: ${{env.working-directory}}
- run: pnpm run -r copy:manifests
- run: pnpm -r --parallel run build
working-directory: ${{env.working-directory}}
- run: pnpm -r --parallel run copy:build
working-directory: ${{env.working-directory}}
- run: pnpm -r --parallel run copy:manifests
working-directory: ${{env.working-directory}}
- run: ls -ah shell/build
working-directory: ${{env.working-directory}}
4 changes: 2 additions & 2 deletions mf-cards/.env.sample
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
PORT=8003
PORT=4003
WEBPACK_NODE_ENV=development
WDS_SOCKET_HOST=localhost
REACT_APP_API_URL=http://localhost:3333
2 changes: 1 addition & 1 deletion mf-cards/public/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Tables</title>
<title>Cards</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
4 changes: 2 additions & 2 deletions mf-cards/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"short_name": "Tables",
"name": "Tables",
"short_name": "Cards",
"name": "Cards",
"icons": [
{
"src": "https://react-demo.tailadmin.com/favicon.ico",
Expand Down
3 changes: 3 additions & 0 deletions mf-charts/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PORT=4001
WEBPACK_NODE_ENV=development
REACT_APP_API_URL=http://localhost:3333
6 changes: 3 additions & 3 deletions mf-charts/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"short_name": "X",
"name": "X",
"short_name": "Charts",
"name": "Charts",
"icons": [
{
"src": "https://pbs.twimg.com/profile_images/1683325380441128960/yRsRRjGO_400x400.jpg",
"src": "https://react-demo.tailadmin.com/favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
Expand Down
3 changes: 3 additions & 0 deletions mf-tables/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PORT=4002
WEBPACK_NODE_ENV=development
REACT_APP_API_URL=http://localhost:3333
14 changes: 7 additions & 7 deletions mf-tables/config-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ module.exports = function override(config, env) {
}
})
);
const shellScriptPlugin = new HookShellScriptPlugin({
beforeCompile: ['npm run create:manifest'],
});
shellScriptPlugin._onScriptError = () => {};
config.plugins.push(
shellScriptPlugin
);
// const shellScriptPlugin = new HookShellScriptPlugin({
// beforeCompile: ['npm run create:manifest'],
// });
// shellScriptPlugin._onScriptError = () => {};
// config.plugins.push(
// shellScriptPlugin
// );

config.resolve = {
fallback: {
Expand Down
Loading

0 comments on commit 09ebc36

Please sign in to comment.