Skip to content

Commit

Permalink
change geneated files location tto 'src'
Browse files Browse the repository at this point in the history
  • Loading branch information
john093e committed Aug 3, 2024
1 parent 724747a commit 8c7c9ae
Show file tree
Hide file tree
Showing 11 changed files with 10,574 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ node_modules
**/node_modules
.pnp
.pnp.js
.yarn/install-state.gz# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
.yarn/install-state.gz

# GitHub
**.git
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ pnpm i
# Configure environment variables
# There is an `.env.example` in the root directory you can use for reference
cp .env.example .env

# Run the TuboRepo project
turbo run dev
```

### 2. Run the TurboRepo
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"build": "pnpm with-env rollup -c && next build",
"build:zoid": "rollup -c",
"clean": "git clean -xdf dist .next node_modules .rollup.cache",
"clean": "git clean -xdf dist .turbo .next node_modules .rollup.cache",
"dev": "pnpm with-env rollup -c --watch & next dev -p 3000",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const rollupConfig = files.map(file => {
return {
input: inputPath,
output: {
file: `dist/${outputFileName}`, // Output directory and file name
file: `src/widgets/${outputFileName}`, // Output directory and file name
format: 'iife', // Format suitable for browsers
name: path.basename(outputFileName, '.js')
.split("-")
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/api/widgets/[component]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function GET(

try {
// Construct the path to the component's JavaScript file
const filePath = join(process.cwd(), 'dist', `${component}.js`);
const filePath = join(process.cwd(), 'src', 'widgets', `${component}.js`);

// Read the file content
const file = readFileSync(filePath, 'utf8');
Expand Down
2 changes: 1 addition & 1 deletion apps/nextjs/src/app/zoid-advanced/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const metadata: Metadata = {
openGraph: {
title: "Advanced example with Zoid",
description: "Simple example with Zoid",
url: "https://create-t3-turbo.vercel.app",
url: "https://nextjs-zoid.vercel.app",
siteName: "Advanced example with Zoid",
},
};
Expand Down
5,283 changes: 5,283 additions & 0 deletions apps/nextjs/src/widgets/advanced-zoid.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions apps/nextjs/src/widgets/advanced-zoid.js.map

Large diffs are not rendered by default.

5,283 changes: 5,283 additions & 0 deletions apps/nextjs/src/widgets/button.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions apps/nextjs/src/widgets/button.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/third-party-website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"build": "pnpm with-env next build",
"clean": "git clean -xdf .next .turbo node_modules",
"clean": "git clean -xdf .turbo .next .turbo node_modules",
"dev": "pnpm with-env next dev -p 3001",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
Expand Down

0 comments on commit 8c7c9ae

Please sign in to comment.