codecontrol
The Prebuilt Build System
Last updated 7 months ago by undersco_404 .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install codecontrol 
SYNC missed versions from official npm registry.

Package Emoji

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 codecontrol

or if you are yarn

$ 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 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.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 runs your code through babel which ensures that your code is compatible with older browsers. ( see compatible browsers)
  • babelify is 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 browserify which bundles any imported or required modules into a single file.
  • This bundled code is then minified using 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. 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 applies vendor-prefixes like -moz to your code to make it compatible with older browsers. ( see compatible browsers)
  • postcss-preset-env is like babel for css and makes it compatible with older browsers.
  • Your styles are then minified (uglified) with 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. 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
  • Replace browser-sync with another live-server implementation
  • Add html-minifier to minify html files.

Current Tags

  • 0.1.4                                ...           latest (7 months ago)

10 Versions

  • 0.1.4                                ...           7 months ago
  • 0.0.4                                ...           7 months ago
  • 0.0.3                                ...           7 months ago
  • 0.0.2                                ...           8 months ago
  • 0.0.1                                ...           9 months ago
  • 1.0.4                                ...           9 months ago
  • 1.0.3                                ...           9 months ago
  • 1.0.2                                ...           9 months ago
  • 1.0.1                                ...           9 months ago
  • 1.0.0                                ...           9 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 15
Dependencies (19)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |