Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@toreda/build-tools

toreda184MIT0.8.0TypeScript support: included

Toreda

build, build package, buildscript, gulp-eslint alternative, gulp, lightweight, toreda, typescript

readme

Toreda

CI Coverage Sonar Quality Gate

GitHub package.json version (branch) GitHub Release Date GitHub issues

license

@toreda/build-tools

Helpers for common gulp build flows. Reduce complexity and code duplication in your gulpfile. Reduce redundancy and upkeep across multiple projects.

 

Contents

 

Usage

Examples

gulpfile.ts for TypeScript library

import {dest, parallel, series, src} from 'gulp';

import {Build} from '@toreda/build-tools';
import {EventEmitter} from 'events';
import {Log} from '@toreda/log';

const log = new Log();
const events = new EventEmitter();
const build = new Build({
    env: 'dev',
    log: log,
    events: events
});

function runLint() {

}

function createDist() {
    return build.create.dir('./dist', false);
}

function cleanDist() {
    return build.clean.dir('./dist');
}

function buildSrc() {
    return build.run.typescript('./dist', 'tsconfig.json');
}

exports.default = series(createDist, cleanDist, runLint, buildSrc);

Using Build

 

Package

Install

Install @toreda/build-tools directly from NPM.

Install with Yarn (preferred)

yarn add @toreda/build-tools --dev

Install using NPM

npm install @toreda/build-tools --save-dev

Run Tests

Install or clone @toreda/build-tools (see above).

Our unit tests use Jest.

Installing jest is not required after project dependencies are installed (see above).

yarn test

Build from source

The next steps are the same whether you installed the package using NPM or cloned the repo from Github.

Build with Yarn

Enter the following commands in order from the build-tools project root.

yarn build

Build with NPM

Enter the following commands in order from the build-tools project root.

npm run-script build

 

Legal

License

MIT © Toreda, Inc.

 

Copyright © 2019 - 2022 Toreda, Inc. All Rights Reserved.

https://www.toreda.com

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

0.6.0 - 2021-12-12

Added

  • Latest NPM dependencies
  • glob-parent ^5.1.2 and ansi-regex ^5.0.1 to yarn resolutions due to CVE flagged by Github during build.

0.4.1 - 2021-10-23

  • Upgraded all dependencies to latest versions. Specific eslint and gulp-eslint versions are causing conflicts for some packages. The version conflicts are not related to this package, but are solved by temporarrily adding resolutions for eslint and lodash.