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

Use Rollup and ES modules (v2) #116

Merged
merged 2 commits into from
Dec 9, 2018
Merged

Conversation

donmccurdy
Copy link

Re-opening #113, and adding documentation.

@emackey
Copy link
Member

emackey commented Dec 8, 2018

Hi Don, currently we publish this repo as GitHub Pages. The old version is published right from the master branch, but of course we could switch it to gh-pages or some other branch if need be. But will GitHub Pages be able to act as the server here?

@emackey
Copy link
Member

emackey commented Dec 8, 2018

Oh I think I see. In #114 (comment) you mentioned that the dist folder is not included in the PR, but will be build and pushed with each release.

@emackey
Copy link
Member

emackey commented Dec 8, 2018

If anyone wants to test this when served via GitHub Pages, I published a built version of this branch from my emackey fork here:

https://emackey.github.io/glTF-WebGL-PBR/

@UX3D-nopper UX3D-nopper merged commit f480983 into reference-viewer Dec 9, 2018
@UX3D-nopper
Copy link
Contributor

Reverted, as did not work on my machine.

@UX3D-nopper
Copy link
Contributor

@emackey Can you please try out a clean checkout and redo the pull request?

@donmccurdy
Copy link
Author

@UX3D-nopper could you describe how this did not work on your machine? The steps to build and run the viewer are:

npm install
npm run dev

Then open http://localhost:8000.

From the current reference-viewer branch, reverting the revert (git revert 507059f1d5dc1d4f756b1236e161440be38a8e6c) works properly for me on a separate machine than I used to create the PR. If this isn't working for you, it would be helpful to know the error before I recreate the PR.

@UX3D-nopper
Copy link
Contributor

The reference viewer should still work without npm. Just committing the build package will probably solve the problem.

@emackey
Copy link
Member

emackey commented Dec 10, 2018

@UX3D-nopper I believe the reason those files weren't included was mentioned in #114 (comment):

Note that I have not included the dist/ files in the PR. My suggestion would be to do that only with each release, and not with individual PRs.

But, perhaps the dist/ folder should ship at least with the initial PR, so that GitHub Pages works out of the box.

Is the UX3D team able to do some testing of this before asking for another PR? It looks like these PRs are getting rapidly merged and reverted. Normally a deep-rooted PR like this should remain open for testing and feedback, possibly for days, or however long it takes for the affected team members to all be confident that merging it won't disrupt their daily workflow. The team would need to make changes to that workflow here, for example using npm run dev for the interactive development server, and npm run build to regenerate the dist files for static hosting.

@UX3D-nopper
Copy link
Contributor

To be honest, if u or Don are doing a pull request, currently I personally do no test it, as I assume, u guys already tested it.
But u are right, we need to test always.

@donmccurdy
Copy link
Author

I'm happy to include the dist/ folder in the PR for this, that's no problem. But future PRs (e.g. by community members) should omit the dist/ files, because they're hard to review and lead to merge conflicts — it's easier just to update them when needed for a new version or demo deployment.

Do note that with this change, NPM (or an alternative like https://yarnpkg.com/) will be part of the development process, and should be running in the background (npm run dev) while working locally. Static hosting for the demo is still supported of course, NPM does not need to be installed on the server. It's enough just to run npm run build and then push the files to a location like GitHub Pages.

Once this is checked in I'm also happy to add a hook so that future PRs will display a warning if they break the build script.

@donmccurdy donmccurdy deleted the feat-es-modules-v2 branch December 10, 2018 18:23
@donmccurdy
Copy link
Author

Reopened in #123.

emackey pushed a commit that referenced this pull request Mar 3, 2021
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.

3 participants