Skip to content

Yurickh/ouxe

Repository files navigation

Ouxe

CI npm version MIT

Basic configuration tool for my common setup.

It is will be able to handle:

Running linters and prettier on precommit with husky.

Usage

Be sure to have both git and node installed and available. node must be 5.2.0 or later.

In your command line, write:

npx ouxe

Commands

You can skip some prompts by providing commands and flags.

ouxe prettier

Opinionated prettier configuration.

By default, it will create a .prettierignore and a .prettierrc with preloaded configuration, which you can later edit.

--write, -w

Run prettier on all files of the project.

--lint-staged, -l

Setup prettier to run on every commit with husky and lint-staged.

Will create a .huskyrc and a .lintstagedrc with pre-loaded configuration you can later edit.

Rationale

Prettier

Prettier is a great code formatter. It produces readable and organized code most times, and it has nice defaults.

You'll notice I chose to override three configs for it: semi, trailingComma and singleQuote. This is basically personal preference, and I agree with most other prettier patterns.

You'll notice that rather than installing the prettier npm package, we actually alias it through this fork. This is done so operators are aligned in the beggining of the line, rather than in the end, and the prettier team has been pretty vocal about it not coming to a prettier version.

Running locally

Run an instance of npm start so microbundle watches the src folder while building.

From there, you may run npm run ouxe to execute the command.

As of this version, we don't have tests. PRs are welcome!