Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use Javascript frameworks without build tools like grunt and gulp? [closed]

I'm trying out some modern Javascript frameworks like Angular, React, Vue and Ember, and they all want me to use build tools like npm, grunt, gulp, maven, etc.

Web-programming used to be fun. Just change some files, refresh the browser and see if it works. Now every time I change something, I have to build it again, which takes quite some time. I really hate to see that web-programming has become like this. I know the building can even be done automatically with these tools watching for file-changes, etc., but still, it just sucks.

My question is, when I want to use one of the mentioned frameworks, am I supposed to use the build-tools every time I want to run, or do I just need these for deployment and testing purposes (or not at all) ?

like image 699
Dylan Avatar asked Dec 29 '15 03:12

Dylan


2 Answers

You don't have to use these tools. They're mostly aimed at people who want to use frameworks in larger projects, and have features that let you compile hundreds of JS components into one file. I personally use them mostly for automating build tests, unit tests, and bundling all the assets together on release days. Let's address the frameworks you mentioned one at a time:

React: React provides an already compiled version of their code on their getting started page
AngularJS: Same as react, there's just a file you can include, just look up "angular cdn"
Vue: They also have a file that you can just include.
Ember: See above

For most frameworks, you can just look up "name of framework CDN" to get an online hosted js file that you can quickly throw in to your projects for web development the old way.

like image 198
Adam Avatar answered Oct 15 '22 19:10

Adam


Some libraries require building the code, some don't. From the list that you had, none of them require it technically. They can all work by simply including the js file in a <script> tag. However, there are many frameworks/libraries (such as sass or coffeescript) which do require a build tool, because the source code must be compiled to become html/javascript/css as understood by the browser.

Also, there's not really any reason to be so against using build tools. As you said, they can run automatically on file change, so they're really just in the background.

like image 40
markasoftware Avatar answered Oct 15 '22 18:10

markasoftware