# jarb

> Reusable lint, webpack, babel and jest configuration

Latest version **3.0.10-0** (published 2020-02-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install jarb
pnpm add jarb
yarn add jarb
bun add jarb
```

Provides the command `jarb`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.10-0 |
| Published | 2020-02-25 |
| First published | 2017-12-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.x |
| Dependencies | 59 |
| Unpacked size | 75.5 KB |
| Known vulnerabilities | 0 (+7 in 2 direct dependencies) |
| Install scripts | no |
| Author | Patrick Tolosa |
| Maintainers | iamhttp |

## Links

- npm: https://www.npmjs.com/package/jarb
- npm.io page: https://npm.io/package/jarb

## Dependencies (59)

- [glob](https://npm.io/package/glob.md) ^7.1.6
- [jest](https://npm.io/package/jest.md) ^25.1.0
- [open](https://npm.io/package/open.md) 7.0.2
- [jsdoc](https://npm.io/package/jsdoc.md) ^3.6.3
- [enzyme](https://npm.io/package/enzyme.md) 3.11.0
- [eslint](https://npm.io/package/eslint.md) ^6.8.0
- [rimraf](https://npm.io/package/rimraf.md) ^3.0.2
- [core-js](https://npm.io/package/core-js.md) ^3.6.4
- [webpack](https://npm.io/package/webpack.md) 4.41.6
- [get-port](https://npm.io/package/get-port.md) ^5.1.1
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [copyfiles](https://npm.io/package/copyfiles.md) ^2.2.0
- [find-root](https://npm.io/package/find-root.md) ^1.1.0
- [node-sass](https://npm.io/package/node-sass.md) ^4.13.1
- [ts-loader](https://npm.io/package/ts-loader.md) ^6.2.1
- [@babel/cli](https://npm.io/package/@babel/cli.md) ^7.8.4
- [babel-jest](https://npm.io/package/babel-jest.md) ^25.1.0
- [css-loader](https://npm.io/package/css-loader.md) 3.4.2
- [release-it](https://npm.io/package/release-it.md) 12.6.1
- [url-loader](https://npm.io/package/url-loader.md) ^3.0.0
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.8.4
- [cssnano-cli](https://npm.io/package/cssnano-cli.md) ^1.0.5
- [file-loader](https://npm.io/package/file-loader.md) ^5.1.0
- [null-loader](https://npm.io/package/null-loader.md) ^3.0.0
- [sass-loader](https://npm.io/package/sass-loader.md) ^8.0.2
- [babel-eslint](https://npm.io/package/babel-eslint.md) ^10.0.3
- [babel-loader](https://npm.io/package/babel-loader.md) ^8.0.6
- [ink-docstrap](https://npm.io/package/ink-docstrap.md) ^1.3.2
- [style-loader](https://npm.io/package/style-loader.md) ^1.1.3
- [babel-upgrade](https://npm.io/package/babel-upgrade.md) 1.0.1
- [eslint-loader](https://npm.io/package/eslint-loader.md) ^3.0.3
- [postcss-loader](https://npm.io/package/postcss-loader.md) 3.0.0
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.8.4
- [webpack-dev-server](https://npm.io/package/webpack-dev-server.md) 3.10.3
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.8.3
- [enzyme-adapter-react-16](https://npm.io/package/enzyme-adapter-react-16.md) 1.15.2
- [mini-css-extract-plugin](https://npm.io/package/mini-css-extract-plugin.md) ^0.9.0
- [uglifyjs-webpack-plugin](https://npm.io/package/uglifyjs-webpack-plugin.md) ^2.2.0
- [webpack-bundle-analyzer](https://npm.io/package/webpack-bundle-analyzer.md) 3.6.0
- [@babel/plugin-syntax-import-meta](https://npm.io/package/@babel/plugin-syntax-import-meta.md) ^7.8.3
- [@babel/plugin-proposal-decorators](https://npm.io/package/@babel/plugin-proposal-decorators.md) ^7.8.3
- [@babel/plugin-proposal-json-strings](https://npm.io/package/@babel/plugin-proposal-json-strings.md) ^7.8.3
- [@babel/plugin-syntax-dynamic-import](https://npm.io/package/@babel/plugin-syntax-dynamic-import.md) ^7.8.3
- [case-sensitive-paths-webpack-plugin](https://npm.io/package/case-sensitive-paths-webpack-plugin.md) ^2.3.0
- [@babel/plugin-proposal-function-bind](https://npm.io/package/@babel/plugin-proposal-function-bind.md) ^7.8.3
- [@babel/plugin-proposal-function-sent](https://npm.io/package/@babel/plugin-proposal-function-sent.md) ^7.8.3
- [@babel/plugin-proposal-do-expressions](https://npm.io/package/@babel/plugin-proposal-do-expressions.md) ^7.8.3
- [@babel/plugin-transform-reserved-words](https://npm.io/package/@babel/plugin-transform-reserved-words.md) ^7.8.3
- [@babel/plugin-proposal-class-properties](https://npm.io/package/@babel/plugin-proposal-class-properties.md) ^7.8.3
- [@babel/plugin-proposal-numeric-separator](https://npm.io/package/@babel/plugin-proposal-numeric-separator.md) ^7.8.3
- [@babel/plugin-proposal-optional-chaining](https://npm.io/package/@babel/plugin-proposal-optional-chaining.md) ^7.8.3
- [@babel/plugin-proposal-pipeline-operator](https://npm.io/package/@babel/plugin-proposal-pipeline-operator.md) ^7.8.3
- [@babel/plugin-proposal-throw-expressions](https://npm.io/package/@babel/plugin-proposal-throw-expressions.md) ^7.8.3
- [@babel/plugin-proposal-export-default-from](https://npm.io/package/@babel/plugin-proposal-export-default-from.md) ^7.8.3
- [@babel/plugin-proposal-export-namespace-from](https://npm.io/package/@babel/plugin-proposal-export-namespace-from.md) ^7.8.3
- [babel-plugin-transform-es3-property-literals](https://npm.io/package/babel-plugin-transform-es3-property-literals.md) ^6.22.0
- [@babel/plugin-proposal-nullish-coalescing-operator](https://npm.io/package/@babel/plugin-proposal-nullish-coalescing-operator.md) ^7.8.3
- [@babel/plugin-proposal-logical-assignment-operators](https://npm.io/package/@babel/plugin-proposal-logical-assignment-operators.md) ^7.8.3
- [babel-plugin-transform-es3-member-expression-literals](https://npm.io/package/babel-plugin-transform-es3-member-expression-literals.md) ^6.22.0

## Recent versions

- 3.0.10-0 (latest) — 2020-02-25
- 4.0.0-beta.4 (beta) — 2020-04-13
- 4.0.0-beta.3 — 2020-02-28
- 4.0.0-beta.2 — 2020-02-28
- 4.0.0-beta.1 — 2020-02-28
- 4.0.0-beta.0 — 2020-02-28
- 3.0.9 — 2020-02-25
- 3.0.8 — 2020-02-07
- 3.0.7 — 2020-02-04
- 3.0.6 — 2019-09-11
- 3.0.5 — 2019-08-13
- 3.0.4 — 2019-07-30
- 3.0.3 — 2019-06-18
- 3.0.2 — 2019-03-26
- 3.0.1 — 2019-02-27
- … 27 more at https://npm.io/package/jarb/versions

## README

### Quick start

* Create package.json in directory

  ```
  {
    "name": "PROJECT_NAME",
    "version": "0.0.1",
    "description": "Example usage of the reusable webpack configuration",
    "scripts" : {
      "init": "npm install && jarb init",
    },
    "devDependencies": {
      "jarb": "*"
    }
  }
  ```
  
* ``` npm run init``` to setup your react environment
* ``` npm start``` to start webpack dev server (the entrypoint is src/develop.js)
* ``` npm run build``` to build for production (the entrypoint is src/index.js)
* ``` npm run tdd``` to run jest in watch mode
* ``` npm run test``` to run jest and provide test coverage
* ``` npm run release``` to release your code, push to a repository and NPM (if configured)

###Change log
## 3.0.9
[V] Fix failing build when tutorials directory does not exist  
[V] Add dynamic port allocation to npm start instead of failing if port is taken
## 3.0.8
[V] FIX - npm run test will now rebuild jestConf correctly
[V] FIX - JARB will now create missing .dll directory if it does not exist in src 
## 3.0.7
[V] Added typescript support (ts-loader as part of the default loaders) 
## 3.0.6
[V] Added stats:minimal to webpack.dev configuration
## 3.0.5
[V] Updated readme to include a proper example
## 3.0.4
[V] Removed the pre-defined babel-loader options in webpack config, deferred all config to .babelrc\
[V] Replaced babel-polyfill with core-js/stable
## 3.0.3
[V] Fixed babelRC to support reg-runtime
## 3.0.2
[V] Fixed a bug where the wrong jarbFlag env was being passed to npm start, fixed with --env=develop
## 3.0.1
[V] Added an option to add `-- autofixLint` to npm run build and npm start (`npm run build -- --autofixLint`) 
## 3.0.0
[V] Update Babel to 7 (Extremely complex)\
[V] Update jest to 24.x\
[V] Remove all process.env usage(Minimal items are used)\
[V] Update ESLint to 5.x
  - Updated babel-eslint to 7.2.3
  
[V] Update release-it to latest (10.2.0)\
[V] Change release it scripts to run with node(Currently run as an execute command)\
[V] Add support to Node 10\
[V] Move assetsPath into envVariable, and stop using projectConfig directly for it\
[V] Remove PORT support from node_env\
[V] Change bin/analyze to run with node instead of exec\
[V] Update Webpack to 4\
  - Installed uglifyPlugin
  - Added optmiziation.minimizer in config
  - Installed/replaced mini-css-plugin (removed extractTextPlugin)
  - Updated eslint-loader to 2.1.2
  - Updated babel-loader to 7.1.5  (8.0.5 requires @babel-core, which will be the next step)
  - Updated file-uploader 3.0.1
  - Updated style-loader to 0.23.1
  - Updated to sass-loader to 7.1.0
  - Updated node-sass to 4.x
  - Updated webpack-dev-server to 3.2.0
  - npm run build works correctly!
  - npm start now working
  
[V] Removed redux/react-redux from dll plugin\
[V] Added support for node 10\
[V] Updated dependencies:
  - Installed/replaced mini-css-plugin (removed extractTextPlugin)
  - Updated eslint-loader to 2.1.2
  - Updated babel-loader to 7.1.5  (8.0.5 requires @babel-core, which will be the next step)
  - Updated file-uploader 3.0.1
  - Updated style-loader to 0.23.1
  - Updated to sass-loader to 7.1.0
  - Updated node-sass to 4.x 
  
[V] Embed "tap" as a test utility instead of the hand-made tests\ 
[V] Removed JEST from unit tests\
[V] Added TAP to replace JEST\
[V] Change all Jest commands to run from node\ 
[V] fix npm install to use native npm install instead of manually installing the dependencies\
[V] Removed "npm run test" from the default build process\
[V] Enable linting on all JARB project\
[V] Change all eslint commands to run from node\
  - Removed all eslint commands, eslint is now run directly from webpack
  
[V] Remove react-redux\
[V] Remove redux\
[V] Remove react-test-renderer\
[V] Remove install-local\
[V] Remove prop-types\
[V] init should add React and React-DOM to the project's package.json\
[V] Update to latest React (16.8.2)
    - npm install react 16.8.2 on core project
    - npm install react-dom 16.8.2 on core project
    - npm install enzyme[ ]adapter[ ]react[ ]16  1.9.1 on core project
    - Create a testSetup file in jarb/lib/testSetup.js
    - Add setupFiles for jest to include this setupFile
    - Install Enzyme v3 (3.8.0)

## 2.0.0
[V] added report.html and stats.json to default .gitignore
[V] Add environment specific variables to be passed to Webpack
(allow doing "npm run build --myEnv" with my own custom configuration)
[VT] Fix assets path for "applications"
[VT] Remove /mocks
[VT] Remove develop.js boilerplate
[VT] Change eslint to .eslintrc
[VT] Move devtool config to baseWebpackConfig
[VT] Remove .raw.js
[V] Move build:dll into the js script for npm start (no need to expose it)
[V] Remove build:dist:raw
[V] Remove live example
[V] Move all code into lib/
[V] Create bins for all commands done through jarb
[V] Remove all "NODE_ENV" from various scripts and files
[V] Node ENV should be configured based on the action you want to take and the env you choose
[V] Move src/.dll somewhere else, preferably in MOCKS
[V] Remove scripts/build.js, setup, devServer
[V] Ensure all tests are working
[V] use JARB bin for npm scripts instead of regular scripts
[V] npm run test should automatically extend jestConfig
[V] Allow projectConfig, per env, to control minification (envVariables.isMinified was added, RAW_FILE support removed)
[V] Add the ability to easily add more build environments
- Done through projectConfig.env['staging'] = {}, any item here, if ran through npm run build -- env=staging will use these configurations
[V] Allow assetsPath to be taken from projectConfig.env instead of projectConfig directly
[V] index.html is always created
[V] Remove projectType from projectConfig
[V] Added stdio to all execSync

## 1.1.0
[V] Add onBuildComplete and onBuildStart (tools/buildHooks.js can export an object with these keys as functions)

## 1.0.9
[V] Added support for entryPoints

## 1.0.8
[V] Update Jest to 23.6.0
[V] Removed default build test, instead we're now building directly on example src
[V] Remove karma, Mocha, Chai, isparta, jQuery, classnames, react-hot-reload
[V] Add "webpack-bundle-analzyer" to Jarb

## 1.0.7
- Fixed a bug that caused the readme.md to constantly be re-written
## 1.0.6
- Added support for a custom html file (For application type projects, file to be used is src/dist.html)
## 1.0.5
- Added support for custom html in the body tag for Applications
- Removed index.raw.js support
## 1.0.4
- Fixed a bug regarding using 'time' as a command when it's not supported
## 1.0.3
- Moved jest back to 20.0.1
- Fixed Pathing for app_index.html to include ./ instead of .
## 1.0.2
- Updated Jest to 22.4.2
- Updated release-it to 7.4.1

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