# art-build-configurator

> Tools for configuring npm (package.json) and webpack (webpack.config.js)

Latest version **1.30.5** (published 2025-11-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install art-build-configurator
pnpm add art-build-configurator
yarn add art-build-configurator
bun add art-build-configurator
```

Provides the commands `abc`, `art-build-configurator`.

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.30.5 |
| Published | 2025-11-07 |
| First published | 2017-03-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 22 |
| Unpacked size | 86.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Shane Brinkman-Davis Delamore |
| Maintainers | shanebdavis |

## Links

- npm: https://www.npmjs.com/package/art-build-configurator
- Repository: https://github.com/art-suite/art-suite-foundations
- Issues: https://github.com/art-suite/art-suite-foundations/issues
- npm.io page: https://npm.io/package/art-build-configurator

## Dependencies (22)

- [glob](https://npm.io/package/glob.md) ^11.0.0
- [colors](https://npm.io/package/colors.md) ^1.4.0
- [bluebird](https://npm.io/package/bluebird.md) ^3.5.5
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.2.0
- [commander](https://npm.io/package/commander.md) ^5.0.0
- [art-config](https://npm.io/package/art-config.md) ^2.0.6
- [css-loader](https://npm.io/package/css-loader.md) ^6.2.0
- [dateformat](https://npm.io/package/dateformat.md) ^4.5.1
- [detect-node](https://npm.io/package/detect-node.md) ^2.0.4
- [style-loader](https://npm.io/package/style-loader.md) ^3.2.1
- [coffee-loader](https://npm.io/package/coffee-loader.md) ^0.7.3
- [coffee-script](https://npm.io/package/coffee-script.md) ^1.12.7
- [webpack-merge](https://npm.io/package/webpack-merge.md) ^6.0.1
- [art-filebuilder](https://npm.io/package/art-filebuilder.md) ^2.1.16
- [caffeine-script](https://npm.io/package/caffeine-script.md) ^0.75.0
- [art-class-system](https://npm.io/package/art-class-system.md) ^1.11.20
- [art-standard-lib](https://npm.io/package/art-standard-lib.md) ^1.74.4
- [art-browser-tools](https://npm.io/package/art-browser-tools.md) ^1.2.17
- [neptune-namespaces](https://npm.io/package/neptune-namespaces.md) ^4.2.16
- [art-build-configurator](https://npm.io/package/art-build-configurator.md) ^1.30.5
- [art-object-tree-factory](https://npm.io/package/art-object-tree-factory.md) ^2.2.12
- [caffeine-script-runtime](https://npm.io/package/caffeine-script-runtime.md) ^1.14.0

## Recent versions

- 1.30.5 (latest) — 2025-11-07
- 1.30.4 — 2024-08-16
- 1.30.3 — 2024-05-30
- 1.30.2 — 2024-04-07
- 1.30.1 — 2021-09-10
- 1.30.0 — 2021-07-31
- 1.29.5 — 2021-07-28
- 1.29.4 — 2021-03-26
- 1.29.3 — 2020-12-12
- 1.29.2 — 2020-11-06
- 1.29.1 — 2020-11-06
- 1.29.0 — 2020-10-30
- 1.28.3 — 2020-10-30
- 1.28.2 — 2020-10-30
- 1.28.1 — 2020-10-30
- … 57 more at https://npm.io/package/art-build-configurator/versions

## README

# art-build-configurator (abc) [![Build Status](https://travis-ci.org/imikimi/art-build-configurator.svg?branch=master)](https://travis-ci.org/imikimi/art-build-configurator)
Tools for configuring npm (package.json) and webpack (webpack.config.js)

### Initializing a new Art Suite App

> NOTE: Your directory-name is used to initialize
> various files including package.json, so pick a good name.

```bash
# replace "my-app-name" with your appo's name
mkdir my-app-name
cd my-app-name

# create package.json forces npm to install in your directory
echo "{}" > package.json

# install & configure abc
npm install art-build-configurator
npx art-build-configurator --init app --git

# install newly configured dependencies
npm install

# start your app
npm start
```

Then go to:
http://localhost:8080/webpack-dev-server/

#### Create Git Repository (highly recommended):

After you have your app initialized, create a git repository so you have a working state to roll back to as you work:

```bash
git init
git add * ".[a-zA-Z]*"
git commit -a -m 'initial checkin'
```

### Configuring `package.json`

The original motivation for ABC is the problem that `package.json` is not code. There is no way to dynamically configure it with plain npm + node. ABC solves that. ABC's config file `art.build.config.{caf/coffee/js}` is *evaluated* before it is applied. You can execute arbitrary code to generate and return the config object.

The output package.json file is generated as follows:

1. Extract the current *version* from the current package.json. This is the only thing that is persisted. Everything else is replaced.
2. `defaultPackage = ABC's default package.json`
3. One of two things can happen depending upon the type of `package = ArtBuildConfig.npm || ArtBuildConfig.package` (two aliases):
	* package is an object: merged it: `deepMerge defaultPackage, package`
	* package is a function: invoke it: `package(defaultPackage)`
4. Set version to the version read in step 1
5. Write the resulting package.json

# WIP: ABC v2 >> AGC?

* **A.C.G.**: @art-suite/config-generator
* **configurator**: CONFIGURation generATOR

Config:
```coffeescript
import &ArtStandardLib

loaders:
  json: (rawJsonString, generator) ->
    consistentJsonStringify deepMerge current, generator current = JSON.parse rawJsonString

# Gets applied when you run the "abc --configure" command

generators:
  ###
    An array or object
    <array>
      Elements are functions or objects
      <Functions> are invoked and passed the selected folder, fully qualified.

    <objects>
      each value, key in object
        switch value
        when value is String
          key is the filename
          value is the contents to write

        when value is Function
          key is the filename
          function is invoked and passed in the current contents of the file, if any. The return value is written fo the file.
          If there is a matching loader for the filename's extension, It is used.

        when value is Array
          key is a folder
          create the folder if it doesn't exist
          recurse with the root algorythm in this sub-folder

  ###
  package.json: ->
    description: "The best package ever!"

```

&ArtBuildConfigurator.loaders.json
&ArtBuildConfigurator.Builder.webpack

---
_Source: https://npm.io/package/art-build-configurator · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
