# @justeat/f-build-js

> Fozzie Build configuration for JS components

Latest version **0.2.1** (published 2019-01-17) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @justeat/f-build-js
pnpm add @justeat/f-build-js
yarn add @justeat/f-build-js
bun add @justeat/f-build-js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2019-01-17 |
| First published | 2018-12-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0.0 |
| Dependencies | 18 |
| Unpacked size | 8.9 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | 80sgreek, ashleynolan, bulutcy, cloudcooke, dandel10n, djmelonz, farmerajf, hwallis, jonahacquahje, jonrea, justeatui, kevinrodrigues, markedup, meselgroth, oleksiishevchuk, onye, rjimms92, sachazvetelman, simonsje, sonnyprince, stephek, xander-marjoram |
| Keywords | fozzie |

## Links

- npm: https://www.npmjs.com/package/@justeat/f-build-js
- Repository: https://github.com/justeat/f-build
- Issues: https://github.com/justeat/f-build/issues
- npm.io page: https://npm.io/package/@justeat/f-build-js

## Dependencies (18)

- [eslint](https://npm.io/package/eslint.md) 5.12.0
- [webpack](https://npm.io/package/webpack.md) 4.28.4
- [@babel/cli](https://npm.io/package/@babel/cli.md) 7.2.3
- [@babel/core](https://npm.io/package/@babel/core.md) 7.2.2
- [ansi-colors](https://npm.io/package/ansi-colors.md) 3.2.3
- [webpack-cli](https://npm.io/package/webpack-cli.md) 3.2.1
- [webpack-log](https://npm.io/package/webpack-log.md) 2.0.0
- [babel-loader](https://npm.io/package/babel-loader.md) 8.0.5
- [eslint-loader](https://npm.io/package/eslint-loader.md) 2.1.1
- [webpack-chain](https://npm.io/package/webpack-chain.md) 5.1.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) 7.2.0
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) 7.2.3
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) 2.14.0
- [@justeat/f-build-config](https://npm.io/package/@justeat/f-build-config.md) 0.1.1
- [@justeat/eslint-config-fozzie](https://npm.io/package/@justeat/eslint-config-fozzie.md) 2.3.0
- [@babel/plugin-transform-runtime](https://npm.io/package/@babel/plugin-transform-runtime.md) 7.2.0
- [@babel/plugin-syntax-dynamic-import](https://npm.io/package/@babel/plugin-syntax-dynamic-import.md) 7.2.0
- [@babel/plugin-syntax-object-rest-spread](https://npm.io/package/@babel/plugin-syntax-object-rest-spread.md) 7.2.0

## Recent versions

- 0.2.1 (latest) — 2019-01-17
- 0.2.0 — 2019-01-03
- 0.1.0 — 2018-12-17

## README

<div align="center">
<h1>f-build-js</h1>

<img width="125" alt="Fozzie Bear" src="bear.png" />

<p>Webpack configuration for JS Builds</p>
</div>

---

[![npm version](https://badge.fury.io/js/%40justeat%2Ff-build-js.svg)](https://badge.fury.io/js/%40justeat%2Ff-build-js)
[![Build Status](https://travis-ci.org/justeat/f-build-js.svg)](https://travis-ci.org/justeat/f-build-js)
[![Coverage Status](https://coveralls.io/repos/github/justeat/f-build-js/badge.svg)](https://coveralls.io/github/justeat/f-build-js)
[![Known Vulnerabilities](https://snyk.io/test/github/justeat/f-build-js/badge.svg?targetFile=package.json)](https://snyk.io/test/github/justeat/f-build-js?targetFile=package.json)

---

## Quick Guide

README To Be Written

## Overriding default configuration

`f-build-js` is setup with a bunch of sensible defaults that the majority of projects will be able to use out of the box.

However, should you wish to adjust the config of any part of webpack config, you can hook into the rules and merge/override them with your own configuration using the [hooks in `webpack-chain`](https://github.com/neutrinojs/webpack-chain/blob/master/README.md#config-module-rules-uses-loaders-modifying-options).

For example, say you wanted to change the name of the JS file being produced from the default entrypoint, you would do so in the following way:

```js
const webpackConfig = require('@justeat/f-build-js');

webpackConfig
    .output
        .path(__dirname)
        .filename('testName.js');
```

For overwriting or adding options within a loaders configuration you will need to use these hooks combined with the [`babel-merge` package](https://github.com/eliperelman/babel-merge).

One example would be if you wanted to override the default behaviour of the ESLint rule to turn off auto-fixing. You could do this by declaring the following in your `webpack.config.js`:

```js
const webpackConfig = require('@justeat/f-build-js');
const merge = require('babel-merge');

webpackConfig.module
    .rule('jsLinting')
        .use('eslint')
            .tap(options => merge(options, {
                fix: false // turn off autofix
            }));

module.exports = webpackConfig.toConfig();
```

A full list of the named rules and loaders you can hook into are listed below.


## Rules

TODO

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