npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dev-init

v0.0.15

Published

Initialize a new project with Kiril-approved settings

Downloads

4

Readme

dev-init

Build Test Coverage Downloads Version Dependency Status Kiril approved

This project will get you started and automate a whole bunch of little things you need to do to every new project in order to work sanely with a team or accept contributions from other members of the open-source community. Since there are so many little steps, they take time and you always end up forgetting something and needing to make a bunch of tweaks later on. You should skip all of that, and just use this module to get up and running quickly.

Sweet, how do I install it?

I appreciate your enthusiasm.

npm install -g dev-init

How do I use it?

Easy:

mkdir my-cool-lib
cd my-cool-lib
dev-init

So what happens?

git init

The regular git init command is run for the module, to create all the necessary git bits.

.gitignore

A default .gitignore file is used, suitable for NodeJS module and application development on macOS, Windows, and Linux. If you already have one of these files (perhaps you want to run this module on an existing repo), the values from this list will be merged into your existing file.

.gitattributes

A default .gitattributes file is used, to standardize file checkouts across macOS, Windows, and Linux. This will ensure things like linting will never be broken on operating systems that you might not be using, but other members on your team are. If this file already exists, this will be skipped by default.

.brackets.json

Kiril approves of Brackets. So a configuration file is created to correctly set up Brackets. If you already have this file, the settings will be merged into your existing file.

There is an option here to select your preferred linter:

dev-init --linter ESLint

You can define as many linters as you would like to use:

dev-init --linter ESLint --linter JSHint --linter JSCS

You can also configure the number of spaces to use for indentation, although I strongly encourage you to stick to 4.

dev-init --spaces 2

.editorconfig

Kiril also approves of other IDEs. An .editorconfig file will be created to configure a whole plethora of other IDEs. If your favorite IDE does not support it natively, there is probably a plugin for it. If you already have this file, the settings will be merged into your existing file.

Like with .brackets.json, spaces are configurable.

dev-init --spaces 2

README.md

An empty readme file will be created, to get you started and remind you that writing a readme is important. If a README already exists, this will be skipped by default.

Whoa, merging files! Is that safe?

I'd like to think it is. I did a great job writing it. And, just so you know, if there is a merge error, your existing files will be safe. However, if you don't trust me, there is a flag for that.

dev-init --safe

With this flag, existing files will be left untouched.

You mentioned something about some files being skipped?

Yeah. Not all files can be merged at this time. For those, I will respect your existing settings and leave them alone (until I can figure out a good way to merge them, anyway).

If you do want to use the files from this module, however, there is a flag for that too:

dev-init --force

This flag will replace all of the skipped files with the ones generated by this module. Files that are usually merged will still be merged.

What if I want to run only some of the tasks?

Well, this is your lucky day, because you have options:

  • dev-init --include list of tasks

    You can use the --include flag, followed by a space-separated list of task names, as a whitelist for which tasks to run.

  • dev-init --exclude list of tasks

    You can use the --exclude flag, followed by a space-separated list of task names, as a blacklist for tasks to skip.

You can also combine these, but they apply on top of one another (i.e. the exclude list will exclude tasks that were explicitly included in the include list).

  • dev-init select

    You can use the select command to enter an interactrive menu, where you can visually select the tasks to run.

But what are the task names?

That's easy too:

dev-init list

And if that is too much typing:

dev-init ls

I don't like your settings.

That's not really a question, but it is also okay. Not everyone has to make the correct choices. You can still use this project though, to configure and enforce the settings you do prefer. Feel free to clone it and make all the changes you would like to the files in the fixtures folder.

You can set it up in your dev environment as such:

git clone [email protected]:catdad/dev-init.git
cd dev-init
npm install
npm link

Now you can make changes and use the dev-init cli command with your local version.

License

ISC