open-index/open-npm huggingface dataset:
npm package: @kpdecker/eslint-config-linoleum
Description: Linoleum eslint config
Author: Kevin Decker
Latest version: 5.0.1

# eslint-config-linoleum

Linoleum eslint configs

## Usage

Project package.json:

```
  "eslintConfig": {
    "extends": [
      "@kpdecker/eslint-config-linoleum"
    ],
    "root": true
  }
```

Optional extends config sets:

- `@kpdecker/eslint-config-linoleum/react` ESLint config for projects using React and JSX
- `@kpdecker/eslint-config-linoleum/test` ESLint config for test subdirectory.
npm package: @kpdecker/linoleum
Description: Shared javascript build and testing infrastructure
Author: Kevin Decker
Latest version: 2.2.0

# Linoleum

Shared javascript build and testing infrastructure

Base project to avoid duplicating infrastructure boilerplate across javascript projects. Provides linting, es6, code coverage, with source maps all running in node, browser, or electron environments.

- For Node, see [linoleum-node](https://github.com/kpdecker/linoleum-node).
- For Webpack browser builds, see [linoleum-webpack](https://github.com/kpdecker/linoleum-webpack).
- For Electron, see [linoleum-electron](https://github.com/kpdecker/linoleum-electron).

That's right I've got a floor.

## Usage

Within `Gulpfile.js`:

```
// Init global state
var Linoleum = require('@kpdecker/linoleum');

// Include optional linoleum tasks
require('@kpdecker/linoleum-node');
require('@kpdecker/linoleum-webpack');
require('@kpdecker/linoleum-electron');
```

Global APIs:

- `WATCHING`: Set to true if the build is in watch mode.
- `SOURCE_FILES`: Glob representing source files. May be overridden.
- `TEST_FILES`: Glob representing test files. May be overridden.
- `BUILD_TARGET`: Path that build artifacts will be output to. May be overridden.
- `COVERAGE_TARGET`: Path that coverage reports will be output to. May be overridden.
- `jsFiles`: Helper used to generate the final list js files glob
- `testFiles`: Helper used to generate the final list test files glob
- `watch`: Helper utility to watch and immediately run a particular command on a set of files:

  ```
  Linoleum.watch(Linoleum.SOURCE_FILES, 'cover');
  ```

  Will create `watch:cover` task.

  Accepts an option 3rd argument `options`, which may define:
  - `setup`: Task that is called once prior to the first exec of the watched task.
  - `onChange`: Called prior to exec with an array of the changes that occurred to trigger this cycle.

### linoleum/tasks/clean

Defines the `clean` and `clean:always` task which will remove all build and coverage output from the project. The `clean` task will only run once in watch mode, while the `clean:always` task will run on each invocation.

### linoleum/tasks/lint

Defines the `lint` task which will lint all source and test files.

### linoleum/tasks/cover

Defines:
- `cover:untested` task which runs empty coverage report to ensure that untested files are included in `cover:report`.
- `cover:report` task which combines raw data from the other coverage tasks and asserts coverage.

## Common issues
### Node Compile Issues

Newer versions of Node (5+, potentially earlier) may run into native compiler errors under Travis due to older versions of the C++ compiler. This can be resolved via this config:

```
addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - g++-4.8
env:
  - CXX=g++-4.8
```
npm package: @kpdecker/linoleum-electron
Description: Shared javascript build and testing infrastructure
Author: Kevin Decker
Latest version: 1.0.0

# Linoleum-Electron

Electron build infrastructure for Linoleum projects.

## Usage

Within `Gulpfile.js`:

```
// Init global state
var Linoleum = require('@kpdecker/linoleum');

// Include optional linoleum tasks
require('@kpdecker/linoleum-electron');
```

Defines:
- `webpack:electron` task which builds the permutations of `{main, renderer} x {production, test}` configurations for this project.
- `cover:electron` task which runs electron coverage tests.

## Common issues
### Electron

Electron tests need a similar setup to run under Travis:

```
before_script:
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
  - sleep 3 # give xvfb some time to start
```

If not set this will generally result in a exit with error code 1 and no additional information.
npm package: @kpdecker/linoleum-node
Description: Shared javascript build and testing infrastructure
Author: Kevin Decker
Latest version: 2.2.0

# Linoleum-Node

Node build infrastructure for Linoleum projects.

## Usage

Within `Gulpfile.js`:

```
require('@kpdecker/linoleum');
require('@kpdecker/linoleum-node');
```

Defines:
- `babel` task which compiles Node sources using Babel
- `test:mocha` task which runs Node tests without coverage instrumentation.
- `cover:mocha` task which runs in-process Node coverage tests.
npm package: @kpdecker/linoleum-webpack
Description: Webpack build infrastructure for Linoleum projects
Author: Kevin Decker
Latest version: 3.2.1

# Linoleum-Webpack

Webpack build infrastructure for Linoleum projects.

## Usage

Within `Gulpfile.js`:

```
// Init global state
var Linoleum = require('@kpdecker/linoleum');

// Include optional linoleum tasks
var LinoleumWebpack = require('@kpdecker/linoleum-webpack');
```

Global APIs:

- `CLIENT_ENTRY`: Path to the client build entry point
- `KARMA_TEST_FILES`: Glob representing karma test files. May be overridden. Will be ignored from mocha tests.
- `SERVER_PORT`: Port that the webpack dev server instance will proxy.
- `DEV_SERVER_PORT`: Port that the webpack dev server will be hosted on.

(Added to the `Linoleum` root project)

Defines:

- `webpack` task which generates webpack build packages.
  This includes:
  - `lib/$client$/`: Web client package
  - `lib/index.js`: Node server package
  - `lib/$cover$/`: Test coverage node package

  This is intended to replace the `babel` build tasks for projects using Webpack, not augment them.
- `webpack:dev-server` task which launches a webpack developer server instance
- `watch:karma` task which runs Karma tests in watch mode.
- `cover:server` task which runs webpack coverage tests in node.
- `cover:web` task which runs webpack coverage tests in browser.

For webpack tests, each package will filter the tests that are imported based on the file suffix. `.server.js` tests will only run under the `cover:server` task and `.web.js` tests will only run under the `cover:web` task. Simple `.js` files will run under both.

When running in watch mode, the optional `LinoleumWebpack.watchHandler` change handler can be used to ensure that rebuilds always invalidate. Depending on the exact OS, Editor, and Node versions in use, the default configuration might not always trigger.

```
Linoleum.watch(WATCH_FILES, 'build', {
  onChange: LinoleumWebpack.watchHandler
});
```

## Common issues
### Karma

Travis needs to be configured to use Firefox when running Karma tests. This can be done with the following config:

```
before_script:
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
  - sleep 3 # give xvfb some time to start
```

If a `Error: Path doesn't exist '/_karma_webpack_/karma-test.js'` or similar is seen when running Karma, this is due to the Karma tests directory not existing.