Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow scripts files to not be in /public #110

Merged
merged 14 commits into from
Aug 27, 2024

Conversation

YayunHuang
Copy link
Contributor

@YayunHuang YayunHuang commented Aug 23, 2024

Ref: MUP-147

For the script in public/ use for [model].astro, since they might need package file, let's move it when implementing https://linear.app/oursky/issue/MUP-161/change-ulid-from-cdn-into-packagejson and https://linear.app/oursky/issue/MUP-159/change-all-js-files-into-ts-files

@YayunHuang YayunHuang force-pushed the 147-allow-script-not-in-public-folder branch from 81147f8 to 311a1b2 Compare August 26, 2024 03:27
@YayunHuang YayunHuang changed the title [WIP] Allow scripts files to not be in src/public [WIP] Allow scripts files to not be in /public Aug 26, 2024
@YayunHuang YayunHuang force-pushed the 147-allow-script-not-in-public-folder branch 3 times, most recently from e223530 to 0863937 Compare August 26, 2024 08:56
@YayunHuang YayunHuang changed the title [WIP] Allow scripts files to not be in /public Allow scripts files to not be in /public Aug 26, 2024
@YayunHuang YayunHuang requested a review from pkong-ds August 26, 2024 08:58
@YayunHuang
Copy link
Contributor Author

@pkong-ds ready for review except for src/pages/model, as this page have several js file and use many cdn package, I want to move it while implementing https://linear.app/oursky/issue/MUP-161/change-ulid-from-cdn-into-packagejson and https://linear.app/oursky/issue/MUP-159/change-all-js-files-into-ts-files

Copy link
Collaborator

@pkong-ds pkong-ds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do all these files fall into below? highlight: upload.js, home.js, baseLayout.js

For the script in public/ use for [model].astro, since they might need package file, let's move it when implementing ...

image

src/pages/download/_autoDownload.ts Show resolved Hide resolved
src/pages/download/_autoDownload.ts Show resolved Hide resolved
.eslintrc.js Show resolved Hide resolved
@pkong-ds
Copy link
Collaborator

pkong-ds commented Aug 26, 2024

Also - can you help add sth like below to README?

### About `src/pages/**/_*.ts`

You might observe some js/ts files with underscroe `_` prefix. This is because ...

ref https://docs.astro.build/en/guides/routing/#excluding-pages

@YayunHuang
Copy link
Contributor Author

@pkong-ds

  • main.js, baseLayout.js => use in src/layout/BaseLayout.astro
  • download-python-package.js, home.js => use in src/pages/index.astro
  • preview_worker.js, web_worker.js, upload.js => use in src/pages/model/[model].astro

For the script use for src/layout/BaseLayout.astro and src/pages/index.astro, do we also want to let it not be in public/?

@YayunHuang YayunHuang force-pushed the 147-allow-script-not-in-public-folder branch 2 times, most recently from de3cdb1 to f176ff2 Compare August 27, 2024 03:21
@YayunHuang YayunHuang force-pushed the 147-allow-script-not-in-public-folder branch from f176ff2 to 4be4881 Compare August 27, 2024 03:22
@pkong-ds
Copy link
Collaborator

For the script use for src/layout/BaseLayout.astro and src/pages/index.astro, do we also want to let it not be in public/?

Yes, I think this PR aims at modulizing script files to their related astro components. Can you help? 🙏

Copy link
Collaborator

@pkong-ds pkong-ds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please help with below 🙏 Thanks

  1. ✅ Ensure auto download filename is <device>-mockup.zip instead of mockup.zip
  2. Move script files for baseLayout and index
  3. Modify readme

README.md Outdated
Comment on lines 141 to 143
You might observe some js/ts files with underscroe `_` prefix. This is because ...

ref https://docs.astro.build/en/guides/routing/#excluding-pages
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you help fine-tune this a bit? I was providing a template for you to modify 🤣

@YayunHuang YayunHuang force-pushed the 147-allow-script-not-in-public-folder branch from 4be4881 to 39ebb17 Compare August 27, 2024 06:55
@YayunHuang YayunHuang force-pushed the 147-allow-script-not-in-public-folder branch from 39ebb17 to b49a412 Compare August 27, 2024 07:02
@YayunHuang
Copy link
Contributor Author

YayunHuang commented Aug 27, 2024

@pkong-ds updated~
download-python-package.js will move to src/pages/ in #114
and preview_worker.js, web_worker.js, upload.js will move to src/pages/ in https://linear.app/oursky/issue/MUP-160/change-all-cdn-into-packagejson

@YayunHuang YayunHuang mentioned this pull request Aug 27, 2024
Copy link
Collaborator

@pkong-ds pkong-ds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot Yayun 🙏 🙏 🙏 🙏 🙏

@pkong-ds pkong-ds merged commit a47ff50 into oursky:main Aug 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants