Skip to content

Commit a8da25d

Browse files
Merge pull request #10 from FireAndIceFrog/feature/translationtions
Feature/translationtions
2 parents 370e21f + cbdff38 commit a8da25d

52 files changed

Lines changed: 1478 additions & 367 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
- name: Install Node.js dependencies
3232
run: npm install
33-
working-directory: string-art-demo
33+
working-directory: string-art-website
3434

3535
- name: Set up Rust
3636
uses: actions-rs/toolchain@v1
@@ -49,7 +49,7 @@ jobs:
4949
- name: Build static files
5050
id: build
5151
run: npm run build
52-
working-directory: string-art-demo
52+
working-directory: string-art-website
5353

5454
- name: Upload static files as artifact
5555
id: deployment

build-wasm.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ wasm-pack build --release --target web --features wasm
1313
echo "✅ WASM package built successfully!"
1414

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

2323
echo "🎉 Build complete! You can now use the WASM module in your React app."
2424
echo ""
2525
echo "To test:"
26-
echo "1. Make sure the React dev server is running: cd string-art-demo && npm run dev"
26+
echo "1. Make sure the React dev server is running: cd string-art-website && npm run dev"
2727
echo "2. Open http://localhost:5173 in your browser"
2828
echo "3. Upload an image and click 'Generate String Art'"

string-art-demo/src/features/1Upload/components/ImageUploader.tsx

Lines changed: 0 additions & 166 deletions
This file was deleted.

string-art-demo/src/features/3RenderImage/components/StringArtConfig/StringArtConfigSection.tsx

Lines changed: 0 additions & 83 deletions
This file was deleted.

string-art-demo/src/main.tsx

Lines changed: 0 additions & 12 deletions
This file was deleted.

string-art-demo/vite.config.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.
File renamed without changes.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
var fs = require('fs');
2+
var chalk = require('chalk');
3+
const typescriptTransform = require('i18next-scanner-typescript');
4+
5+
module.exports = {
6+
output: './public/locales',
7+
options: {
8+
func: {
9+
// don't pass ts or tsx here!
10+
extensions: ['.js', '.jsx'],
11+
},
12+
trans: {
13+
// don't pass ts or tsx here!
14+
extensions: ['.js', '.jsx'],
15+
},
16+
17+
},
18+
// your i18next-scanner config
19+
// ...
20+
transform: typescriptTransform(
21+
// options
22+
{
23+
// default value for extensions
24+
extensions: [".ts", ".tsx"],
25+
// optional ts configuration
26+
tsOptions: {
27+
target: "es2017",
28+
},
29+
},
30+
31+
// optional custom transform function
32+
function customTransform(outputText, file, enc, done) {
33+
// do something custom with the transpiled `outputText`
34+
this.parser.parseTransFromString(outputText);
35+
this.parser.parseFuncFromString(outputText);
36+
37+
done();
38+
},
39+
),
40+
};

0 commit comments

Comments
 (0)