# abc-environment

> Get started with modern JavaScript development as simple as the ABC

Latest version **2.0.3** (published 2018-10-03) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install abc-environment
pnpm add abc-environment
yarn add abc-environment
bun add abc-environment
```

Provides the command `abc`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2018-10-03 |
| First published | 2016-10-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 18 |
| Unpacked size | 16.5 KB |
| Known vulnerabilities | 0 (+3 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | queicherius@gmail.com |
| Maintainers | queicherius |

## Links

- npm: https://www.npmjs.com/package/abc-environment
- Repository: https://github.com/queicherius/abc-environment
- Homepage: https://github.com/queicherius/abc-environment#readme
- Issues: https://github.com/queicherius/abc-environment/issues
- npm.io page: https://npm.io/package/abc-environment

## Dependencies (18)

- [nyc](https://npm.io/package/nyc.md) ^11.0.2
- [chai](https://npm.io/package/chai.md) ^4.0.2
- [chalk](https://npm.io/package/chalk.md) 2.2.0
- [debug](https://npm.io/package/debug.md) ^3.0.0
- [mocha](https://npm.io/package/mocha.md) ^4.0.0
- [sinon](https://npm.io/package/sinon.md) ^4.0.0
- [mkdirp](https://npm.io/package/mkdirp.md) 0.5.1
- [snazzy](https://npm.io/package/snazzy.md) ^7.0.0
- [codecov](https://npm.io/package/codecov.md) ^2.2.0
- [exec-sh](https://npm.io/package/exec-sh.md) 0.2.1
- [standard](https://npm.io/package/standard.md) ^11.0.0
- [babel-cli](https://npm.io/package/babel-cli.md) ^6.24.1
- [cross-env](https://npm.io/package/cross-env.md) ^5.0.1
- [babel-eslint](https://npm.io/package/babel-eslint.md) ^8.0.0
- [babel-preset-env](https://npm.io/package/babel-preset-env.md) ^1.5.2
- [babel-plugin-rewire](https://npm.io/package/babel-plugin-rewire.md) ^1.1.0
- [babel-preset-stage-0](https://npm.io/package/babel-preset-stage-0.md) ^6.24.1
- [babel-plugin-istanbul](https://npm.io/package/babel-plugin-istanbul.md) ^4.1.4

## Recent versions

- 2.0.3 (latest) — 2018-10-03
- 2.0.2 — 2017-03-18
- 2.0.1 — 2017-03-16
- 2.0.0 — 2017-03-15
- 1.4.0 — 2017-01-11
- 1.3.0 — 2017-01-11
- 1.2.4 — 2017-01-10
- 1.2.3 — 2017-01-04
- 1.2.2 — 2017-01-04
- 1.2.1 — 2017-01-04
- 1.2.0 — 2017-01-04
- 1.1.0 — 2016-12-03
- 1.0.15 — 2016-10-31
- 1.0.14 — 2016-10-30
- 1.0.13 — 2016-10-30
- … 13 more at https://npm.io/package/abc-environment/versions

## README

### :boom: Careful: This package is no longer maintained and is only here for historic reasons. This means you should very likely not use it. You have been warned. :boom:

---

# abc-environment

> Get started with modern JavaScript development as simple as the ABC

## Features

- Next generation JavaScript language syntax
- Unit tests with code coverage of your original code
- Linting for consistent style
- Continuous integration

## Install

> This module only works with Node v6+ and npm v3+ (or [yarn](https://github.com/yarnpkg/yarn)), which are the current LTS versions. Please make sure you are running the right versions via `node -v && npm -v` and update if needed.

```bash
# Install the module
npm install --save-dev abc-environment

# Run the setup
node_modules/.bin/abc setup

# Now you can commit...
git add ...
git commit ...

# ...and run commands directly
node_modules/.bin/abc test
npm test

# Tip: Create an alias for "abc" to have an even shorter command
echo "alias abc='node_modules/.bin/abc'" >> ~/.bashrc && source ~/.bashrc
abc test
```

## Commands

### `abc setup`

**Creates the directories and files for the whole project to run.** This will modify files, so only run it on empty or version-controlled projects.

⚠️ When updating this module to the next higher minor version number, it is recommended to run the `setup` command again to get the newest files! When updating to the next major number, running `setup` is required.

The created directories and files are:

- `src/` - Directory for your source code
- `src/index.js` - Demo module file (if `src/` is empty)
- `tests/` - Directory for your tests
- `tests/index.spec.js` - Demo test file (if `tests/` is empty)
- `.babelrc` - Manages the Babel configuration throughout the whole project <sup>[1](#footnote1)</sup>
- `.gitignore` - Makes sure that you don't commit dependency files into version control
- `.npmignore` - Makes sure that you only release the built files into npm
- `.travis.yml` - Handles continuous integration with [Travis](https://travis-ci.org/)
- `package.json` - Adds three npm scripts:
  - `npm test` - Runs the `test` and `lint` commands
  - `npm run build` - Runs the `build` command
  - `npm run version` - Runs the `build` command when you publish a new version of your package to npm (e.g. using [`np`](https://github.com/sindresorhus/np) or [`npm-release`](https://github.com/phuu/npm-release))

### `abc build`

**Compiles the source files from `src/` into a `build/` directory.** Thanks to this, you can use the latest language features of JavaScript and compile them into JavaScript that runs in older browsers or older versions of Node. You can find an overview of all the new language features [here](https://babeljs.io/docs/plugins/preset-stage-0/) and [here](http://babeljs.io/docs/plugins/preset-latest/).

### `abc test`

**Runs the test files in the `tests/` directory.** Using unit tests, you can check if your module always works in the way you expect it to. You can also see which parts of your code are covered by your tests by opening the generated `coverage/lcov-report/index.html` in your browser.

### `abc lint [--fix]`

**Checks if your code is consistent and follows best practices (and optionally fix issues).** By using a linter you can ensure that all your code looks the same, even if it was written by different developers. Linting also helps to catch common errors. This module uses the [standard](http://standardjs.com/) style guide.

### `abc run src/file.js`

**Runs a specified file.** Because we are using compiled code, it can get tedious if you have to run `build` before you can run your code. Using the `run` command, you can just specify the file and get it compiled and executed in one single step. *This is used for development purposes, in production you should always use the compiled files generated using the `build` command!*

## Internals

- **Compiling**
  - [`babel-cli`](https://github.com/babel/babel) - Compiler for writing next generation JavaScript
  - [`babel-preset-latest`](https://github.com/babel/babel/tree/master/packages/babel-preset-latest) - Compiling everything what's in ES2015+
  - [`babel-preset-stage-0`](https://github.com/babel/babel/tree/master/packages/babel-preset-stage-0) - Compiling up-and-coming language features
- **Testing**
  - [`mocha`](https://github.com/mochajs/mocha) - Simple & flexible test framework
  - [`chai`](https://github.com/chaijs/chai) - BDD / TDD assertion framework
  - [`sinon`](https://github.com/sinonjs/sinon) - Test spies and stubs
  - [`nyc`](https://github.com/istanbuljs/nyc) - Code coverage tool
  - [`babel-plugin-istanbul`](https://github.com/istanbuljs/babel-plugin-istanbul) - Instruments your code with Istanbul coverage
  - [`babel-plugin-rewire`](https://github.com/speedskater/babel-plugin-rewire) - Adds the ability to rewire module dependencies
- **Linting**
  - [`snazzy`](https://github.com/feross/snazzy) - One JavaScript Style Guide to Rule Them All
  - [`babel-eslint`](https://github.com/babel/babel-eslint) - Lint all valid Babel code, including `stage-0`
- **Continuous Integration (optional, but recommended)**
  - [Travis](https://travis-ci.org/) - Continuous integration service
  - [`codecov`](https://github.com/codecov/codecov-node) - Code coverage badges in your repository
  - [GreenKeeper](https://greenkeeper.io/) - Automatic PRs for npm dependencies
  - [`np`](https://github.com/sindresorhus/np) - A better `npm publish`

## Licence

MIT

---

<a name="footnote1">[1]</a>: Sadly this is required, because [Mocha provides no way to configure Babel](http://jamesknelson.com/testing-in-es6-with-mocha-and-babel-6/)

---
_Source: https://npm.io/package/abc-environment · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
