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

Add examples app with bundled react vanilla, material examples #2056

Merged
merged 3 commits into from
Jan 4, 2023

Conversation

lucas-koehler
Copy link
Contributor

@lucas-koehler lucas-koehler commented Dec 2, 2022

This introduces a new private package examples-app to create a simple web page that ultimately has child pages for every example.

In this initial commit, only the react vanilla and material examples are added. Therefore, they are bundled with rollup to be able to run as standalone pages.

  • Add rollup configs to bundle react vanilla and material examples
  • Add required dev deps and upgrade rollup dev dep tp ^2.78.0 for all packages
    • NOTE: The update was only necessary for the two changed packages. However, I updated the dep everywhere to keep it consistent
  • change material deps to ~5.2.2 because latest 5.x versions break api for Autocomplete
  • Add private package examples-app with a script to aggregate the examples
  • Add root level npm script to create the examples app
  • regenerate package-lock.json

Part of #1706

Netlify instructions

Build examples app:

npm ci && npm run init && npm run examples-app

App will be located in packages/examples-app/dist/

@lucas-koehler lucas-koehler mentioned this pull request Dec 2, 2022
8 tasks
@coveralls
Copy link

coveralls commented Dec 2, 2022

Coverage Status

Coverage: 83.38%. Remained the same when pulling 677c708 on gh-1706_examples-app into 187b2b8 on master.

@sdirix
Copy link
Member

sdirix commented Dec 5, 2022

@lucas-koehler can you resolve the conflicts?

@lucas-koehler
Copy link
Contributor Author

@sdirix I resolved the conflict.

Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

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

Works for me in when including the suggested changes. Good job!

packages/examples-app/README.md Outdated Show resolved Hide resolved
packages/examples-app/prepare-examples-app.js Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@@ -34,7 +34,8 @@
"scripts": {
"build": "rollup -c rollup.config.js",
"dev": "webpack --config webpack/webpack.dev.js && webpack-dev-server --config webpack/webpack.dev.js --env=dev --inline",
"clean": "rimraf lib coverage dist .nyc_output 2> /dev/null",
"example:bundle": "rollup -c rollup.example.config.js",
Copy link
Member

Choose a reason for hiding this comment

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

I would name this build:example-app

packages/material-renderers/rollup.example.config.js Outdated Show resolved Hide resolved
packages/vanilla-renderers/rollup.example.config.js Outdated Show resolved Hide resolved
packages/examples-app/prepare-examples-app.js Outdated Show resolved Hide resolved
lucas-koehler and others added 3 commits January 3, 2023 10:19
This introduces a new private package `examples-app` to create a simple web page
that ultimately has child pages for every example.

In this initial commit, only the react vanilla and material examples are added.
Therefore, they are bundled with rollup to be able to run as standalone pages.

- Add rollup configs to bundle react vanilla and material examples
- Add required dev deps and upgrade rollup dev dep to ^2.78.0 for all packages
- change material deps to ~5.2.2 because latest 5.x versions break api for Autocomplete
- Add private package `examples-app` with a script to aggregate the examples
- Add root level npm script to create the examples app
- regenerate package-lock.json

Part of #1706
Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>
@lucas-koehler
Copy link
Contributor Author

@sdirix Thanks for the review and suggestions. I applied the suggestions and renamed the scripts as suggested. A brief retest did not show any problems :)

Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

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

Works for me

@sdirix sdirix merged commit 5a84cd3 into master Jan 4, 2023
@sdirix sdirix deleted the gh-1706_examples-app branch January 4, 2023 16:15
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