Skip to content

Commit c7ff397

Browse files
committed
fix: pub/build flow
1 parent 8f02942 commit c7ff397

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

examples/context-editor/build.sh

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
#!/bin/bash
22

3-
# Navigate to the project directory
4-
cd examples/context-editor
5-
6-
# Run the existing build command
7-
npm run build
8-
93
# Generate version number
104
VERSION=$(date +'%Y.%m.%d-%H%M%S')
115

126
# Ensure public directory exists
137
mkdir -p public
148

15-
# Copy built files to public directory
16-
# Assuming the build output is in a 'build' directory, adjust if different
17-
cp -R build/* public/
9+
# Copy required MD files from root
10+
cp ../../CODEBASE-CONTEXT.md public/
11+
cp ../../CODING-ASSISTANT-PROMPT.md public/
12+
cp ../../GENERATE-CONTEXT-PROMPT.md public/
1813

1914
# Create version file
2015
echo $VERSION > public/version.txt
@@ -41,4 +36,4 @@ cat << EOF > public/version.html
4136
</html>
4237
EOF
4338

44-
echo "Build completed. Version: $VERSION"
39+
echo "Publish step completed. Version: $VERSION"

examples/context-editor/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"@types/react-router-dom": "^5.3.3",
1919
"class-variance-authority": "^0.7.0",
2020
"clsx": "^2.1.1",
21+
"js-yaml": "^4.1.0",
2122
"react": "^18.3.1",
2223
"react-dom": "^18.3.1",
2324
"react-router-dom": "^6.26.2",
@@ -31,7 +32,8 @@
3132
"start": "cross-env PORT=13000 react-scripts start",
3233
"build": "react-scripts build",
3334
"test": "react-scripts test",
34-
"eject": "react-scripts eject"
35+
"eject": "react-scripts eject",
36+
"publish": "chmod +x build.sh && ./build.sh"
3537
},
3638
"eslintConfig": {
3739
"extends": [

0 commit comments

Comments
 (0)