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

Fix yarn install and building steps, otherwise they failed when you start from scratch #2

Merged

Conversation

damianavila
Copy link

Some things I was surprised about...

  1. After doing the yarn install, all the JS on rise-reveal was "moved" from node_modules into the export directory.
    Since we are using cp -r, I was surprised to find the node_modules inside rise-reveal empty...

  2. I guess the images from the chalkboard and the html file from the notes need to be copied over explicitly because they are not JS/CSS files, correct?

Again, thanks for working on this port!!

@fcollonval
Copy link
Owner

Thanks a lot for taking the time to review this big piece...

  1. After doing the yarn install, all the JS on rise-reveal was "moved" from node_modules into the export directory.
    Since we are using cp -r, I was surprised to find the node_modules inside rise-reveal empty...

This is a side effect of using lerna and yarn workspace - all dependencies of all packages are pulled in at top node_modules to reduce the download size and to try using the same dependencies version for all packages.

  1. I guess the images from the chalkboard and the html file from the notes need to be copied over explicitly because they are not JS/CSS files, correct?

This is a side effect of webpack (mandatory for JLab). It packages the code by keeping only what is explicitly mentioned. As reveal.js plugins contain static files it can be complex to tell webpack what additional files need to be included. So I went for a simple way by copying them where lab-like apps can find them.

@fcollonval fcollonval merged commit c35a620 into fcollonval:ft/jlab3 Nov 28, 2021
@damianavila damianavila deleted the fix_yarn_install_and_build branch March 9, 2022 01:05
@damianavila
Copy link
Author

Thanks for the clarifications, @fcollonval!! And for the merge 😉!

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