xogroup / tk-form-fields

3 stars 1 forks source link

Lack of a standard task runner #12

Closed GeorgeTaveras1231 closed 7 years ago

GeorgeTaveras1231 commented 8 years ago

Some tasks are shell scripts, some are node scripts, some are npm scripts. @jazzcrazed how do you feel about introducing gulp to this project?

jazzcrazed commented 8 years ago

I used to be really into Gulp, but I've since changed my tune. I'd really rather not introduce something that uses plugins, much less another platform being installed -- it just becomes another set of abstractions to keep up-to-date. npm is already a requirement of the app, and shell scripts work on any shell without additional software.

We can move what's in the shell scripts to npm scripts, as there isn't substantial logic to the one script that's there (test.sh).

Some reading that helped validate my feelings when I first considered this: https://medium.freecodecamp.com/why-i-left-gulp-and-grunt-for-npm-scripts-3d6853dd22b8#.3o6vbay10 https://css-tricks.com/why-npm-scripts/

GeorgeTaveras1231 commented 8 years ago

I think those are all valid points but you'd then be signing yourself up for writing all/most of the boilerplate code that drives the tasks. Writing your own tasks from scratch may turn out code that is more complex and scarier to enhance/improve.

I think our build.js file may be an example of a task that would be a lot simpler to express with Gulp.

Also, I don't fully buy into the fear of plugins; I think the majority of the time they will get you bootstrapped with whatever tool you need. In the chance where the plugin isn't up to date you always have the flexibility to use a shell command via an npm script or wrap the shell command with the child_process.spawn api in the gulpfile. I've very rarely had to bypass a plugin (but maybe I'm just lacking in experience).

I also wouldn't be thrilled about reusing build code(mainly boilerplate code) between projects. You can copy and paste or you can distribute a package that includes the shared code __ but then you are maintaining your own "plugin".

I do like that fact that shell scripts are more transparent and are more flexible so I would still be interested in exploring this.

GeorgeTaveras1231 commented 7 years ago

I'm on board for no gulp.