Skip to content

Commit 3250a03

Browse files
Update build output path to workspace package directory
- Changed TypeScript outDir from node_package/lib to packages/react-on-rails/lib - Simplified workspace package build script (no more copying from old location) - Updated package-scripts.yml prepack checks to use new build path - Removed old node_package/lib reference from Knip configuration - Build output now goes directly to the publishable workspace package 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent a9e1e01 commit 3250a03

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

knip.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const config: KnipConfig = {
3232
'node_package/tests/emptyForTesting.js',
3333
// Build output directories that should be ignored
3434
'packages/react-on-rails/lib/**',
35-
'node_package/lib/**',
3635
// Pro features exported for external consumption
3736
'packages/react-on-rails/src/pro/streamServerRenderedReactComponent.ts:transformRenderStreamChunksToResultObject',
3837
'packages/react-on-rails/src/pro/streamServerRenderedReactComponent.ts:streamServerRenderedComponent',

package-scripts.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ scripts:
2525
# 3. Check if the project is built now;
2626
# 4. If it failed, print an error message (still follow https://docs.npmjs.com/cli/v8/using-npm/scripts#best-practices).
2727
script: >
28-
[ -f node_package/lib/ReactOnRails.full.js ] ||
28+
[ -f packages/react-on-rails/lib/ReactOnRails.full.js ] ||
2929
(npm run build >/dev/null 2>&1 || true) &&
30-
[ -f node_package/lib/ReactOnRails.full.js ] ||
30+
[ -f packages/react-on-rails/lib/ReactOnRails.full.js ] ||
3131
{ echo 'Building react-on-rails seems to have failed!'; }
3232
3333
format:

packages/react-on-rails/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"main": "lib/ReactOnRails.full.js",
66
"type": "module",
77
"scripts": {
8-
"build": "yarn run clean && yarn run tsc --declaration && cp -r ../../node_package/lib ./lib",
8+
"build": "yarn run clean && yarn run tsc --declaration",
99
"build-watch": "yarn run clean && yarn run tsc --watch",
10-
"clean": "rm -rf ../../node_package/lib ./lib",
10+
"clean": "rm -rf ./lib",
1111
"test": "cd ../.. && jest node_package/tests",
1212
"type-check": "yarn run tsc --noEmit --noErrorTruncation"
1313
},

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"jsx": "react-jsx",
88
"lib": ["dom", "es2020"],
99
"noImplicitAny": true,
10-
"outDir": "node_package/lib",
10+
"outDir": "packages/react-on-rails/lib",
1111
"allowImportingTsExtensions": true,
1212
"rewriteRelativeImportExtensions": true,
1313
"strict": true,

0 commit comments

Comments
 (0)