easymake - “almost” the next task-runner for building, testing and other tasks for node.js

Today there are many task-runners, boilerplates for quick start of development, but often even in this case you have to modify, write, understand the heap of configuration files, and the root of the project often looks like a bunch of different configs. When working in different projects, even within the framework of one company, often in each project everything is arranged in its own way and before you start working with it, you first need to read a bunch of, often weighty, configs to figure out where, what, how and where the legs grow.

And you just want to - take and start writing code , immediately . And just write tests, easily run them, see coverage. And also get the final build.

If you want the same thing, then maybe you will be interested to learn about easymake.

In this article I will describe the main problems that easymake can help you solve.

1. Start speed. Just take it and get started

easymake can be compared to a capsule coffee maker for simplicity. In itself, easymake is not useful for the end user, presets are all valuable, and easymake only ensures their implementation.

easymake is an executable file with a command line parameter analyzer, task orchestrator and API (which is used when performing tasks and working with config files).

At startup, the transferred parameters are analyzed and the corresponding actions are performed, usually it is either copying configuration files to the project or performing a task.

The preset contains a set of tasks and a set of configuration files, as well as an enumeration of packages that are required to ensure its operation.

Thus, to start developing with easymake you usually need to follow 5 simple steps:

  1. npm init
  2. adding the required preset to devDependencies (easymake is specified in the dependencies on the preset, there is no need to register it explicitly)
  3. in package.json, in the config.easymake.preset section, specify the name of the used preset from point 2.
  4. if the preset has a task to create the initial structure of the project - execute it (for example easymake --run create-folders)
  5. Running a bundle build task for development (for example easymake --run bundle)


Want to test and find out the coverage? - no problem: easymake --run test-units(command for default-preset)

We want to get the assembly for production - no problem: easymake --run bundle --production(command for default-preset)

With easymake, just 5 simple steps separate you from the idea to the start of implementation.

2. The order in the work. We follow accepted approaches and best practices

I have just opened 2 major projects in which I took part, in one - 12 configuration and auxiliary files: startup, build, publish, configure scripts for Gulp, Babel, EsLint, Webpack, Karma, etc. Scripts use environment variables, the end of the command is the assembly (npm run bundle) of the project may be off-screen. In the other - 11, the tasks are almost the same, the implementation is completely different. Projects are launched in completely different ways.

Now imagine that you have such projects not 2, but 22. Someone collects using Gulp, someone using Grunt, someone testing with Jasmine, someone using Mocha.

How to control it all? Boilerplate? Well, you wrote it, distributed it, everyone cloned it, began to develop a project, time goes on - configs swell. You decide to add some rule to the linter, change the assembly, or the testing framework - how to synchronize this with existing projects? 22 times go into each project and update the configs with your hands and then see if it works, but if it’s broken.

With the approach based on easymake presets, you create a preset (or use an existing one) with typical tasks, with typical rules, configurations and utilities. Everyone who starts a project takes a preset and simply starts working in that environment and with those practices that are accepted.

Did you find what can be improved? What other actions can be automated? One of the projects redefined the configuration of the preset and got better? - Update the preset. Further, in each project, the participants will execute only one team - npm update- and your improvements are already with them.

One preset is the solution to hundreds of problems for many projects. Have you decided one hundred and first? - 1 team - and everyone uses your decision.

3. Cleanliness of the workplace. I don't want this copy paste anymore

Where does the project start? Of course, with the arrangement of the infrastructure with the help of which you will build, test, launch it and perform other related actions. Every time you write these configs from scratch? Ctrl-C + Ctrl-V (or F5 for fans :)) not tired? And when you open the project and at the root of pieces 5 different .rc?

If you have a suitable preset, all the configs are in it, no garbage. If you need to redefine something, this can of course be made in the form of a change to the desired config, and if this change is useful within the entire preset, it can be easily entered into the preset.

No more copying configs from project to project, no zoo settings. We keep the project clean and tidy.

Once again about what makes use of easymake:

  1. Getting started in 5 easy steps
  2. We use one preset - some approaches and development methods, we improve them quickly and without problems.
  3. We do not copy configs and in general it would be better not to see them in the project.

easymake is just an "almost" next task-runner

but perhaps it will help you change your development processes for the better and spend more time on what is really important, and of course, get more pleasure from the development process.

In conclusion, I note that the project was created relatively recently and is under development, but at the moment it is already stably working and actively used personally. The easymake itself is unlikely to change much already, but presets are a living thing.

Currently there are 2 presets: for developing a library and for developing a web application on React . If you have a desire to develop your preset or improve an existing one, I will be glad.

easymake is available on npm and github.

Links to existing presets: https://github.com/madcode-tech/easymake/wiki

Also popular now: