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

docs additions for external add-ons usage #4233

Merged
merged 3 commits into from Jan 10, 2023
Merged

docs additions for external add-ons usage #4233

merged 3 commits into from Jan 10, 2023

Conversation

cguardia
Copy link
Contributor

@cguardia cguardia commented Jan 5, 2023

This information was very helpful to me when dealing with some add-ons (thanks Tiberiu Ichim for the blog post about untranspiled dependencies). I believe it would be good to have this in the docs.

@netlify
Copy link

netlify bot commented Jan 5, 2023

Deploy Preview for volto ready!

Name Link
🔨 Latest commit a7d6a88
🔍 Latest deploy log https://app.netlify.com/sites/volto/deploys/63b73e1e7b5b56000895bcd9
😎 Deploy Preview https://deploy-preview-4233--volto.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@cypress
Copy link

cypress bot commented Jan 5, 2023



Test summary

459 0 20 0


Run details

Project Volto
Status Passed
Commit a7d6a88
Started Jan 5, 2023 9:19 PM
Ended Jan 5, 2023 9:31 PM
Duration 11:41 💡
OS Linux Ubuntu -
Browser Chrome 108

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

Copy link
Collaborator

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

Good stuff!

Minor syntax fixes, and a question about the lexer.

@@ -455,6 +455,74 @@ volto-slate can declare in its `package.json`:
And of course, the dependency add-on can depend, on its turn, on other add-ons
which will be loaded as well. Circular dependencies should be avoided.

## problems with untranspiled add-on dependencies
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
## problems with untranspiled add-on dependencies
## Problems with untranspiled add-on dependencies

that are not securely transpiled or haven't been transpiled at all. In that case
you might see an error like the following:

```js
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this js or console output? If the latter, then:

Suggested change
```js
```console


Babel automatically transpiles the code in your add-on, but `node_modules` are
excluded from this process, so we need to include the add-on path in the list of
modules to be transpiled. This can be accomplished by customizing the Webpack
Copy link
Collaborator

Choose a reason for hiding this comment

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

They actually lowercase their own name.

Suggested change
modules to be transpiled. This can be accomplished by customizing the Webpack
modules to be transpiled. This can be accomplished by customizing the webpack

module.exports = { modifyWebpackConfig: customModifyWebpackConfig, plugins };
```

First we need some setup to get the webpack config from Volto's configuration. Once
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
First we need some setup to get the webpack config from Volto's configuration. Once
First we need some setup to get the webpack configuration from Volto's configuration. Once

```

First we need some setup to get the webpack config from Volto's configuration. Once
we have that, we just need to resolve the path to the desired add-ons and push it
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
we have that, we just need to resolve the path to the desired add-ons and push it
we have that, we need to resolve the path to the desired add-ons, and push it

@cguardia
Copy link
Contributor Author

cguardia commented Jan 5, 2023

@stevepiercy Thanks a lot. Made suggested changes.

@stevepiercy stevepiercy added this to the Plone 6.0 milestone Jan 5, 2023
@sneridagh sneridagh merged commit 8e85ba7 into master Jan 10, 2023
@sneridagh sneridagh deleted the docs-additions branch January 10, 2023 18:02
sneridagh added a commit that referenced this pull request Jan 11, 2023
Co-authored-by: Carlos de la Guardia <cguardia@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants