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

How to customize? #756

Open
kevincox opened this issue Oct 26, 2020 · 3 comments
Open

How to customize? #756

kevincox opened this issue Oct 26, 2020 · 3 comments

Comments

@kevincox
Copy link

The readme says "Very customizable" but there appears to be no instructions for adding build steps or additional transforms. Are these any docs on how to do this? I tried looking at the code but couldn't find any customization points.

@papandreou
Copy link
Member

I think I thought of how the source code is laid out when I wrote that 🙈

assetgraph-builder is mainly customizable through the cli options, augmented by a few bundling hints in the source code itself. What are you trying to get it to do?

@kevincox
Copy link
Author

I wanted to add in a step to move and rename assets. I ended up just using assetgraph directly and making a package to do the work.

I did notice that there is undocumented plugin support:

.options('plugin', {
alias: 'p',
describe:
'Install a plugin. Must be a require-able, eg. assetgraph-i18n. Can be repeated.',
type: 'string',
default: false,
})
so maybe I'll try to make my package into a plugin later. however I'm happy for now.

@papandreou
Copy link
Member

Ah yeah, we would like to figure out a proper plugin architecture before telling the world 😆 . The --plugin approach offers fairly limited abilities to hook into the various stages of assetgraph-builder, especially if you need to do async work.

Happy that you found a solution based on only assetgraph! Looks like all of ag-b would be overkill for that use case anyway.

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

No branches or pull requests

2 participants