DEV Community

Ahmed Tarek
Ahmed Tarek

Posted on

Replace NPM & Yarn’s init with a more powerful tool

So what is it all about? Initior is a command line application just like npm or yarn but it is focused on one task only and it is to get your project started in the smallest amount of time possible.

Why would I want to use it? So you are starting a new project, the first thing you do after creating the folder is running “npm init or “yarn init”. Then maybe your project will be a global package then you must open the package.json file created and manually input properties in your package.json file. After that’s done you have to install the different dependencies that your project will use and oh if you miss spell one of them, your whole command is invalid. After installing your dependencies you then maybe want to install eslint in your project so you install eslint and all of it’s different plugins and style guides and you can’t forget writing that awesome .eslintrc file or it will all not work. same goes to babel too and oh if you want to use webpack or gulp, it will even take more time just figuring out the plugins you need. This whole process takes a lot of your time which you should be already coding your project.

So What does Initior do exactly? Initior will start off by asking you the same old package.json questions to write the file but with more questions to prevent you from manually editing the file. Then it will ask if you are going to use eslint in your project and if you are, it will set it up for you by suggesting the style guide you want to use and it will take care of writing the config file and installing all the needed dependencies. After that it will do the same procedure but with Babel and you will be able to choose multiple presets. Then it will ask if you want to write a README.md, .gitignore and a LICENSE.md files which it can write 11 different open source licenses with your name. After that, Initior will ask if you want to set up Mocha and it will suggest some of the most popular assertion libraries for Mocha and if that library you choose has plugins, it will also suggest these. Initior will also suggest css dependencies like normalize or bootstrap as well as front end, back end and CLI dependencies, just choose and they are installed. You want to use webpack? no problem Initior will create a webpack.config.js file and suggest many loaders, plugins and tools to install. Same procedure goes to Gulp as well. Got more dependencies that weren’t suggested? Initior will ask you two questions, one for extra dependencies and the other for extra development dependencies where you can input a list of the dependencies you want to install like what “npm install does but you don’t have to write the “npm install part of it.

What if I want to use yarn? Initior comes with the option “ – yarn or “-y which will try to install all your dependencies using yarn.

Sound cool, will it fully set up gulp and webpack for me? Initior will set up your plugins and only create a starter files for these but coding them is all on you since everyone like to write their tasks and such differently.

Initior is like a yarn init blended in with yarn add in one procedure. It’s a “starter dependency manager because after you use Initior, you will have to use yarn or npm to install more dependencies as usual. It’s not a full replacement to yarn or npm. It’s just a one time process for each project.

I really hope you guys try out Initior because it really is a great tool, not just because I am the one who created it but I do honestly use it over yarn and npm’s init procedure since it makes it more efficient starting my new projects.
You can check out Initior’s website or the github repo.

Top comments (4)

Collapse
 
tensaga profile image
TENsaga

I've been dealing with setting up multiple projects over the past week, just gave this a go and it works great! Thanks for streamlining the process :)

Collapse
 
ahmedtarek_32 profile image
Ahmed Tarek

That’s what it was made for, I hated setting up new projects that’s why I thought of creating it, certainly all my projects are made of my real life experiences in trying to make things easier for me as well as other great developers <3

Collapse
 
alfredbez profile image
Alfred Bez

The link to the github repo is broken, here's the correct one: github.com/ahmedtarek2134/Initior

Collapse
 
ahmedtarek_32 profile image
Ahmed Tarek

Oh sorry, just noticed that and corrected it. <3