Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- name: Install Node.js dependencies
run: npm install
working-directory: string-art-demo
working-directory: string-art-website

- name: Set up Rust
uses: actions-rs/toolchain@v1
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Build static files
id: build
run: npm run build
working-directory: string-art-demo
working-directory: string-art-website

- name: Upload static files as artifact
id: deployment
Expand Down
8 changes: 4 additions & 4 deletions build-wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ wasm-pack build --release --target web --features wasm
echo "✅ WASM package built successfully!"

# Copy the package to the React app's src directory for proper importing
if [ -d "../string-art-demo/src" ]; then
if [ -d "../string-art-website/src" ]; then
echo "📦 Copying WASM files to React app..."
mkdir -p ../string-art-demo/src/wasm
cp -r pkg/* ../string-art-demo/src/wasm/
mkdir -p ../string-art-website/src/wasm
cp -r pkg/* ../string-art-website/src/wasm/
echo "✅ WASM files copied to React app!"
fi

echo "🎉 Build complete! You can now use the WASM module in your React app."
echo ""
echo "To test:"
echo "1. Make sure the React dev server is running: cd string-art-demo && npm run dev"
echo "1. Make sure the React dev server is running: cd string-art-website && npm run dev"
echo "2. Open http://localhost:5173 in your browser"
echo "3. Upload an image and click 'Generate String Art'"
166 changes: 0 additions & 166 deletions string-art-demo/src/features/1Upload/components/ImageUploader.tsx

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions string-art-demo/src/main.tsx

This file was deleted.

39 changes: 0 additions & 39 deletions string-art-demo/vite.config.ts

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
40 changes: 40 additions & 0 deletions string-art-website/i18next-scanner.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
var fs = require('fs');
var chalk = require('chalk');
const typescriptTransform = require('i18next-scanner-typescript');

module.exports = {
output: './public/locales',
options: {
func: {
// don't pass ts or tsx here!
extensions: ['.js', '.jsx'],
},
trans: {
// don't pass ts or tsx here!
extensions: ['.js', '.jsx'],
},

},
// your i18next-scanner config
// ...
transform: typescriptTransform(
// options
{
// default value for extensions
extensions: [".ts", ".tsx"],
// optional ts configuration
tsOptions: {
target: "es2017",
},
},

// optional custom transform function
function customTransform(outputText, file, enc, done) {
// do something custom with the transpiled `outputText`
this.parser.parseTransFromString(outputText);
this.parser.parseFuncFromString(outputText);

done();
},
),
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>String Art Generator</title>
</head>
<body>
<div id="root"></div>
Expand Down
Loading