Prestaul / skeemas

JSON Schema validation
MIT License
11 stars 2 forks source link

Bower support #4

Closed ctate closed 7 years ago

ctate commented 9 years ago

Thanks for making skeemas. Any plans to bring it to the frontend?

Prestaul commented 9 years ago

I should probably do that. I personally have a strong distaste for bower (see: https://twitter.com/ddprrt/status/529909875347030016) and prefer to use npm + webpack or browserify.

I will try to take a look at supporting bower installation and will certainly leave this issue open until I have it. Thanks for asking!

ctate commented 9 years ago

I get that. It’s pretty ironic to install a package manager with another package manager but I don’t think it’s a big deal. It’s like installing pip or gem with apt. It takes less than 30 sec and it beats the old days when you had to go to a project’s homepage to download/install.

Once Bower is installed, it’s a great tool for frontends. Webpack and Browserify are great for turning server-side JS into client-side JS (i.e require-less JS), but pure client-side JS is better for frontends. Those also require an extra step to compile 3rd party client-side JS which can take much longer than 30 sec - especially if you run into problems. Bower keeps my frontend/backend JS separate; I know that anything I install via Bower will run in my browser.

I’m hoping to use this for http://autocode.crystal.sh. Currently I validate schemas with an API call (via skeemas), but I’d like to add client-side validation to avoid unnecessary API calls. If this is something you’re interested in and/or would like some help on, let me know how I can help.

Thanks so much!