that-build-library
A collection of common scripts for the build and deploy process
Last updated 2 months ago by thatdevsteve .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install that-build-library 
SYNC missed versions from official npm registry.

That Build Library

CircleCI

Overview

At That Dev Company we create and manage a whole bunch of projects which are generally built, packaged and deployed using the same set of techniques.

This library contains a collection of common scripts that help with those build and deploy processes

Installation

To install:-

yarn add that-build-library

Quick Example

An example use:-

import { BuildUtils } from 'that-build-library'

Promise.resolve()
    .then(() => BuildUtils.echo('Cleaning'))
    .then(() => BuildUtils.clean('dist'))
    
    .then(() => BuildUtils.echo('Compiling'))
    .then(() => BuildUtils.tsc())
    
    .catch(console.error)

Utilities

The following utility functions are available:-

clean (folder, leaveRoot)

Removes the contents of a folder

  • folder the folder to be cleaned
  • leaveRoot (optional) should the folder be left untouched (just the contents removed)

copy (source, destination, filename)

Copies a file or a folder

  • source the folder or file to be copied
  • destination the folder to be created/copied into
  • filename (optional) the filename of the new file (defaults to the name of the source file)

echo (message)

Logs a message to screen

  • message the message to be logged

exec (cmd, parameters)

Executes a command line program

  • cmd the command to be run
  • parameters a list of parameters to be passed

npmPublish (folder, packageProcessor)

Updates the version and publishes the project to NPM

  • folder the folder containing the distributable build
  • packageProcessor a function that will tidy up the package.json

prettierJS (include, excludes)

Automatically tidies the code (for JAVASCRIPT code)

  • include the root folder prettify
  • excludes an array of folders to exclude

prettierTS (include, excludes)

Automatically tidies the code (for TYPESCRIPT code)

  • include the root folder prettify
  • excludes an array of folders to exclude

processPackage (callback, autoUpdate)

Load the package.json file

  • callback a function which will receive the package.json file's contents
  • autoUpdate should the version of the package.json be automatically updated and saved

removeModuleAlias (moduleName, folder)

Automatically flattens typescript module paths

  • moduleName the name of the path module to remove
  • folder the actual path of the module

test (minimum_coverage, include, excludes)

Compile the codebase (in accordance to the typescript config)

  • minimum_coverage the minimum coverage threshold for each file (0 to 100)
  • include the path to the root directory (default "src")
  • excludes an array of paths to be excluded (default [])

tsc (config)

Compile the codebase (in accordance to the typescript config)

  • config the path to the tsconfig file

zip (from, to)

Create a zip of the build

  • from the build path
  • to the path to the zip file being produced

Current Tags

  • 1.0.15                                ...           latest (2 months ago)

45 Versions

  • 1.0.15                                ...           2 months ago
  • 1.0.13                                ...           5 months ago
  • 1.0.14                                ...           5 months ago
  • 1.0.12                                ...           5 months ago
  • 1.0.11                                ...           a year ago
  • 1.0.10                                ...           a year ago
  • 1.0.9                                ...           a year ago
  • 1.0.8                                ...           a year ago
  • 1.0.6                                ...           a year ago
  • 1.0.5                                ...           a year ago
  • 1.0.4                                ...           a year ago
  • 1.0.3                                ...           a year ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.1.36                                ...           2 years ago
  • 0.1.35                                ...           2 years ago
  • 0.1.34                                ...           2 years ago
  • 0.1.33                                ...           2 years ago
  • 0.1.32                                ...           2 years ago
  • 0.1.31                                ...           2 years ago
  • 0.1.30                                ...           2 years ago
  • 0.1.28                                ...           2 years ago
  • 0.1.27                                ...           2 years ago
  • 0.1.26                                ...           2 years ago
  • 0.1.25                                ...           2 years ago
  • 0.1.24                                ...           2 years ago
  • 0.1.23                                ...           2 years ago
  • 0.1.22                                ...           2 years ago
  • 0.1.21                                ...           2 years ago
  • 0.1.20                                ...           2 years ago
  • 0.1.19                                ...           2 years ago
  • 0.1.18                                ...           2 years ago
  • 0.1.17                                ...           2 years ago
  • 0.1.14                                ...           2 years ago
  • 0.1.13                                ...           2 years ago
  • 0.1.12                                ...           2 years ago
  • 0.1.11                                ...           2 years ago
  • 0.1.8                                ...           2 years ago
  • 0.1.7                                ...           2 years ago
  • 0.1.6                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.0.4 [deprecated]           ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 11
Last Day 0
Last Week 0
Last Month 87
Dependencies (3)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |