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

initial support for exporting builds #52

Merged
merged 1 commit into from
Dec 7, 2021

Conversation

decanTyme
Copy link
Contributor

@decanTyme decanTyme commented Dec 6, 2021

PR Includes:

  • Add jsdom
  • Add postbuild script
  • Add npm scripts

Summary:

Adds initial support for exporting and compressing builds (#10). The exported files/zip should not require any server to run, which can then be easily shared.

Sidenote: removed run keyword from scripts since it is perfectly fine omitting it and it shortens some otherwise lengthy scripts.

Sample compressed export: export.zip

Instructions/docs:

Run yarn export:optimized to export and compress the build files. The resulting files do not need any servers to run (i.e. you can open it directly in a browser without using a dev server.) The compressed (zip) file will be saved inside dist/. To export without minification and other optimizations, run yarn export. For convenience, there is a yarn compress script that you can use if you do not want the postbuild script to run, which is used to prepare the files for running without a server.

@vercel
Copy link

vercel bot commented Dec 6, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/warengonzaga/css-text-portrait-builder/2m2JDmfjbKKjzaqMSu29ysXQJYXw
✅ Preview: https://css-text-portrait-builder-git-fork-decantyme-dev-warengonzaga.vercel.app

@warengonzaga warengonzaga added the feature Issue/Pull Request Label for New Features label Dec 7, 2021
@warengonzaga warengonzaga linked an issue Dec 7, 2021 that may be closed by this pull request
@warengonzaga warengonzaga added this to the v1.3.0 📦 milestone Dec 7, 2021
@warengonzaga warengonzaga self-requested a review December 7, 2021 03:23
Copy link
Owner

@warengonzaga warengonzaga left a comment

Choose a reason for hiding this comment

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

All good to me! I like what you did to export the builds by creating a post-build script. 😊
Meaning if you want to use parcel (zero-config) you still need to config it when you want to export a serverless version of your builds. 😅

The question, any instructions on how to export your builds? So I can add it to the official documentation. 🤔

@warengonzaga warengonzaga changed the title Add initial support for exporting builds initial support for exporting builds Dec 7, 2021
* Add `jsdom`
* Add postbuild script
* Add npm scripts
@decanTyme
Copy link
Contributor Author

All good to me! I like what you did to export the builds by creating a post-build script. 😊 Meaning if you want to use parcel (zero-config) you still need to config it when you want to export a serverless version of your builds. 😅

Thanks! 😊 and yeah I really couldn't find anything anywhere that allows Parcel to bundle it for non-production settings, which I guess is understandable since it primarily deals with live apps and is created with that in mind.

The question, any instructions on how to export your builds? So I can add it to the official documentation. 🤔

Oh right almost forgot about this, thanks again for reminding!

Docs:

Run yarn export:optimized to export and compress the build files. The resulting files do not need any servers to run (i.e. you can open it directly in a browser without using a dev server.) The compressed (zip) file will be saved inside dist/. To export without minification and other optimizations, run yarn export. For convenience, there is a yarn compress script that you can use if you do not want the postbuild script to run, which is used to prepare the files for running without a server.

Something like that I guess?

@warengonzaga
Copy link
Owner

Run yarn export:optimized to export and compress the build files. The resulting files do not need any servers to run (i.e. you can open it directly in a browser without using a dev server.) The compressed (zip) file will be saved inside dist/. To export without minification and other optimizations, run yarn export. For convenience, there is a yarn compress script that you can use if you do not want the postbuild script to run, which is used to prepare the files for running without a server.

That's it! We can improve it later... 😊 @decanTyme

@warengonzaga
Copy link
Owner

@decanTyme I'm happy to merge this now...

@warengonzaga warengonzaga merged commit bf3776e into warengonzaga:dev Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue/Pull Request Label for New Features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

export builds
2 participants