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

Package detail

@eric.dahlseng/configuration-build

edahlseng19MIT0.1.2

Build Configuration

readme

Build Configuration

A collection of configuration files for transpilation and building.

Installation

npm install --save-dev @edahlseng/configuration-build

Usage

After installing, run npx configuration-build setup [build-types] to set up configuration for the desired build-types.

Available build-types:

  • javascript-browser (or js-browser)
  • javascript-module (or js-module)
  • javascript-node (or js-node)

Example

Running npx configuration-build setup js-module will add a babel key to a project's package.json file as well as the build script, configuring Babel to transpile the module's source into a dist/ folder.

API

This tool can be extended for use in a custom configuration library. To do so, create a file that can be run as a Node executable, and pass in an options object and the process global object to the setup function exported by this module:

#!/usr/bin/env node

import { setup } from '@eric.dahlseng/configuration-build';

setup({ process, options: { /* options here */}}).fork(console.error, () => {});

The options object should be a map where the keys are build types, and the values are objects with the following fields:

  • alternateNames (optional): An array of alternate names for the build type. This is useful for specifying abbreviations.
  • configurationFiles (optional): An array of objects containing a path and content
  • jsonData (optional): An array of objects containing filePath, dataPath, and content

changelog

Change Log

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

0.1.2 (2019-02-19)

Bug Fixes

  • Add babel-loader dependency (43da306)

0.1.1 (2019-01-30)

Bug Fixes

  • Add @babel/node dependency (723d07a)
  • Add es6-promise dependency (926aa36)

0.1.0 (2019-01-23)

Features

  • Add javascript-browser, javascript-module, javascript-node options (759ad6e)