Skip to content

Commit 220e8a8

Browse files
committed
feat: Attempt to fix build
1 parent 826e50e commit 220e8a8

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

bin/build.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
const path = require("path");
2+
const fs = require("fs");
3+
4+
const baseDirPath = `${__dirname}/..`;
5+
const src = path.normalize(`${baseDirPath}/public`);
6+
const dst = path.normalize(`${baseDirPath}/build`);
7+
8+
fs.copyFileSync(src, dst);
9+
console.log(`Copied from ${src} to ${dst}`);
10+
11+

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"url": "https://github.com/htbkoo/CssToAndFromReact.git"
1313
},
1414
"scripts": {
15-
"start": "react-scripts-ts start",
16-
"build": "react-scripts-ts build",
15+
"build:copy": "node ./bin/build",
16+
"build": "node ./bin/rename -s public -d build",
1717
"test": "cross-env CI=true react-scripts-ts test --env=jsdom",
1818
"test:unit": "cross-env CI=true react-scripts-ts test --testPathPattern=.*/src/.*.test.tsx?$",
1919
"test-watch": "react-scripts-ts test --env=jsdom",

0 commit comments

Comments
 (0)