# codecontrol

> The Prebuilt Build System

Latest version **0.1.4** (published 2019-04-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install codecontrol
pnpm add codecontrol
yarn add codecontrol
bun add codecontrol
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2019-04-12 |
| First published | 2019-02-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 19 |
| Unpacked size | 40.8 KB |
| Known vulnerabilities | 0 (+6 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | undersco_404 |

## Links

- npm: https://www.npmjs.com/package/codecontrol
- Repository: https://github.com/Dontmindeme/codecontrol
- Homepage: https://github.com/Dontmindeme/codecontrol#readme
- Issues: https://github.com/Dontmindeme/codecontrol/issues
- npm.io page: https://npm.io/package/codecontrol

## Dependencies (19)

- [fs](https://npm.io/package/fs.md) 0.0.1-security
- [path](https://npm.io/package/path.md) ^0.12.7
- [rimraf](https://npm.io/package/rimraf.md) ^2.6.3
- [cssnano](https://npm.io/package/cssnano.md) ^4.1.10
- [postcss](https://npm.io/package/postcss.md) ^7.0.14
- [babelify](https://npm.io/package/babelify.md) ^10.0.0
- [standard](https://npm.io/package/standard.md) ^12.0.1
- [commander](https://npm.io/package/commander.md) ^2.20.0
- [stylelint](https://npm.io/package/stylelint.md) ^9.10.1
- [browserify](https://npm.io/package/browserify.md) ^16.2.3
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.4.3
- [ansi-colors](https://npm.io/package/ansi-colors.md) ^3.2.4
- [autoprefixer](https://npm.io/package/autoprefixer.md) ^9.5.1
- [browser-sync](https://npm.io/package/browser-sync.md) ^2.26.3
- [minify-stream](https://npm.io/package/minify-stream.md) ^1.2.0
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.4.3
- [postcss-preset-env](https://npm.io/package/postcss-preset-env.md) ^6.6.0
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.0.0
- [stylelint-config-standard](https://npm.io/package/stylelint-config-standard.md) ^18.2.0

## Recent versions

- 0.1.4 (latest) — 2019-04-12
- 0.0.4 — 2019-04-08
- 0.0.3 — 2019-04-02
- 0.0.2 — 2019-03-08
- 0.0.1 — 2019-02-27
- 1.0.4 — 2019-02-27
- 1.0.3 — 2019-02-27
- 1.0.2 — 2019-02-24
- 1.0.1 — 2019-02-24
- 1.0.0 — 2019-02-23

## README

![Package Emoji](https://dl.dropboxusercontent.com/s/mxzn36zhcfjddjc/package_1f4e6.png)

# Codecontrol
## The Prebuilt Build System

A simple, out-of-the-box and quick build system.

## Install
To install codecontrol run the following the command
```bash
$ npm install -g codecontrol
```
or if you are yarn 
```bash
$ yarn global add codecontrol
```

## Usage
In an effort to increase simplicity, Codecontrol does not support a config file. Everything is preconfigured for your convenience. Currently, codecontrol uses a [webpack](https://webpack.js.org/) style folder structure and it uses [h5bp](https://html5boilerplate.com/) for its boilerplate.

Codecontrol has only 2 commands.

### 1) `codecontrol -n <dirname>`
This is codecontrol's command for generating a new project. It only has 1 option you to set the folder name. To be generated.
If the folder already exists. codecontrol will use the folder name `codecontrol-gen` instead.

* Generates a webpack style folder structure.
* Copies HTML5 Boilerplate To the `src/` folder.
* Generates `package.json` and installs `codecontrol`

### 2) `codecontrol -d`
`codecontrol -d` is codecontrol's development function. What it does is it copies the `src/` folder to the `dist/` applying a few optimizations to certain files. It repeats this process if the `src/` file are modified. It also starts a live server that watches the `dist` and updates the browser if a change occurs.

#### JS Files
`codecontrol` searches for js files and applies certain optimizations to them. Below is the list in the order in which they are applied.

* [`babelify`](https://www.npmjs.com/package/babelify) runs your code through [`babel`](https://babeljs.io/) which ensures that your code is compatible with older browsers. [( see compatible browsers)](https://browserl.ist/?q=defaults)
* [`babelify`](https://www.npmjs.com/package/babelify) is installed with the [preset-env](https://www.npmjs.com/package/@babel/preset-env) preset and the [preset-react](https://www.npmjs.com/package/@babel/preset-react) preset which allows babel to modify code as needed, it also allows to use jsx.
* The code is then run through [`browserify`](http://browserify.org/) which bundles any imported or required modules into a single file.
* This bundled code is then minified using [`terser`](https://www.npmjs.com/package/terser) and is written to the `dist/` folder.
* After it is done writing the file, the source files in the `src/` folder are linted using [`standard`](https://standardjs.com/). If any errors are found standard will attempt to fix them.

#### CSS Files
`codecontrol` searches for css files and applies certain optimizations to them. Below is the list in the order in which they are applied.

* [`autoprefixer`](https://github.com/postcss/autoprefixer) applies vendor-prefixes like `-moz` to your code to make it compatible with older browsers. [( see compatible browsers)](https://browserl.ist/?q=defaults)
* [`postcss-preset-env`](https://www.npmjs.com/package/postcss-preset-env) is like babel for css and makes it compatible with older browsers.
* Your styles are then minified (uglified) with [`cssnano`](https://www.npmjs.com/package/cssnano) and are written to the `dist/` folder
* After it is done writing the file, the source files in the `src/` folder are linted using [`stylelint`](https://stylelint.io/). If any errors are found stylelint will attempt to fix them.

#### Warnings and other infomation.
* **While Linting, If any errors are found the linter will attempt to fix them. This will change source files** \
* **All packages are run using their default config.** \
* **Codecontrol will copy the file structure from the `src/` folder to the `dist/` folder.**

#### Future modifications.
These are modifications that might arrive in a future version of codecontrol.

* Replacing `terser` and its runner `minify-stream` with [`babel-preset-minify`](https://www.npmjs.com/package/babel-preset-minify)
* Replace `browser-sync` with another live-server implementation
* Add `html-minifier` to minify html files.

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