codecontrol v0.1.4

Codecontrol
The Prebuilt Build System
A simple, out-of-the-box and quick build system.
Install
To install codecontrol run the following the command
$ npm install -g codecontrolor if you are yarn
$ yarn global add codecontrolUsage
In an effort to increase simplicity, Codecontrol does not support a config file. Everything is preconfigured for your convenience. Currently, codecontrol uses a webpack style folder structure and it uses h5bp 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.jsonand installscodecontrol
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.
babelifyruns your code throughbabelwhich ensures that your code is compatible with older browsers. ( see compatible browsers)babelifyis installed with the preset-env preset and the preset-react preset which allows babel to modify code as needed, it also allows to use jsx.- The code is then run through
browserifywhich bundles any imported or required modules into a single file. - This bundled code is then minified using
terserand is written to thedist/folder. - After it is done writing the file, the source files in the
src/folder are linted usingstandard. 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.
autoprefixerapplies vendor-prefixes like-mozto your code to make it compatible with older browsers. ( see compatible browsers)postcss-preset-envis like babel for css and makes it compatible with older browsers.- Your styles are then minified (uglified) with
cssnanoand are written to thedist/folder - After it is done writing the file, the source files in the
src/folder are linted usingstylelint. 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 thedist/folder.
Future modifications.
These are modifications that might arrive in a future version of codecontrol.
- Replacing
terserand its runnerminify-streamwithbabel-preset-minify - Replace
browser-syncwith another live-server implementation - Add
html-minifierto minify html files.