NoDivide / astrum

A lightweight pattern library designed to be included with any web project.
http://astrum.nodividestudio.com
1.54k stars 98 forks source link

Added functionality to run any inline scripts that are added to a com… #168

Closed TristanMNorton closed 3 years ago

TristanMNorton commented 5 years ago

…ponent

What does this PR cover?

Being able to run inline scripts relating to a component it's used with. Not going to lie, I've been a developer for only 2 years and this is my first attempt to contribute to open source so if you think this is total garbage, feel free to deny the request. This was just something I needed to run on my pattern-library and though it would be useful for others. BONUS, super appreciated if you let me know why this is garbage if it is :D.

How can this be tested?

Creating a few components that have inline scripts in the markup file. If scripts run properly without error, we should be good!

Screenshots / Screencast

![]()

What gif best describes how you feel about this work?

I did a thing


Reviewers

Review 1

Review 2 (optional)

By adding a +1 you are confirming you have...


TristanMNorton commented 3 years ago

Looking back at this two years later, I can unequivocally say that this isn't a good update.

Wrapping a setTimeout with an additional nextTick is suuuuper hacky. Closing.