trenpixster / addict

User management lib for Phoenix Framework
MIT License
645 stars 99 forks source link

Separate js & css from layout to web/static #80

Open erickhsiao opened 8 years ago

erickhsiao commented 8 years ago

I am integrate addict to my existing project and figure out authorization isn't trigger by form action but js.
I can simply copy & paste those css & js to my existing file, or change js to form action, but still, I think move those code into separate file under static web is more appropriate.

trenpixster commented 8 years ago

@erickhsiao that was my initial approach, but it gave several issues when using a deployment strategy based on assets compilation or when external tooling (think react) would be used. That said, if you have any idea for a better approach I'm all ears! 😄

erickhsiao commented 8 years ago

Probably need to get better and better rather than get to the goal at first time. By that, React should be another issue we don't need to consider right now.

Providing stand alone files will fit most scenario, most framework can load & play nice with them. By compilation, we can just follow phoenix native compilation method which is brunch.js or run node command directly to compile assets into priv.