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

Spread user-defined attributes in script and style tag in output #75

Closed
saurabhdaware opened this issue Sep 3, 2020 · 5 comments
Closed
Assignees
Labels
enhancement New feature or request

Comments

@saurabhdaware
Copy link
Member

saurabhdaware commented Sep 3, 2020

In components, User should be able to write,

<AbellComponent>
// ....
<style rel="preload" onload="this.rel='stylesheet'; this.onload=null">
/* css */
</style>
</AbellComponent>

and in output it will be rendered as,

<style rel="preload" href="bundled-css/main.css" onload="this.rel='stylesheet'; this.onload=null" />
@saurabhdaware saurabhdaware added the enhancement New feature or request label Sep 3, 2020
@saurabhdaware
Copy link
Member Author

abelljs/abell-renderer#26 Needs to fixed before we work on this

@saurabhdaware
Copy link
Member Author

abelljs/abell-renderer#26 is fixed now.

This is the file you would want to make changes in:
https://github.com/abelljs/abell/blob/main/src/utils/abell-bundler.js#L119

@saurabhdaware saurabhdaware added the Hacktoberfest It's a Hacktoberfest issue :D label Sep 28, 2020
@abhijit-hota
Copy link
Contributor

Always wanted to contribute to Abell! Now that Hacktoberfest's here, I don't see any reason not to. I just forked the repo. Will look into the codebase and tell if I can take this. =)

P.S. I'm not claiming the issue yet. If anyone is ready to work on it, you can assign it to them!

@saurabhdaware saurabhdaware self-assigned this Oct 21, 2020
@saurabhdaware saurabhdaware removed the Hacktoberfest It's a Hacktoberfest issue :D label Oct 21, 2020
@saurabhdaware
Copy link
Member Author

Will start working on this from tomorrow

@saurabhdaware
Copy link
Member Author

Ohh I just realized this won't be possible for case like this:

If there is condition like this:
Comp1.abell

<AbellComponent>
<!-- ... -->
<script>
</script>
</AbellComponent>

Comp2.abell

<AbellComponent>
<!-- ... -->
<script type="module">
</script>
</AbellComponent>

In this case, both the scripts will go into same file. According to Comp2.abell, this file now should be loaded as a module but according to Comp1.abell, this file is normal javascript file. This will add overall confusion on which behavior is given more priority so closing this issue for now. I'll reopen this if I could think of something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants