# @vtex/vtex-scripts

> VTEX miscelaneous build scripts

Latest version **0.4.13** (published 2018-05-08) · ISC license · 0 weekly downloads

## Install

```sh
npm install @vtex/vtex-scripts
pnpm add @vtex/vtex-scripts
yarn add @vtex/vtex-scripts
bun add @vtex/vtex-scripts
```

Provides the command `vtex-scripts`.

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.4.13 |
| Published | 2018-05-08 |
| First published | 2018-04-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 26 |
| Unpacked size | 12.9 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 57 |
| Author | VTEX |
| Maintainers | andreldsa, brunojdo, claudivanfilho, estacioneto, gugabribeiro, lucasecdb, salesfelipe, vitoriaheliane |

## Links

- npm: https://www.npmjs.com/package/@vtex/vtex-scripts
- Repository: https://github.com/vtex-apps/npm-storecomponents
- Homepage: https://github.com/vtex-apps/npm-storecomponents#readme
- Issues: https://github.com/vtex-apps/npm-storecomponents/issues
- npm.io page: https://npm.io/package/@vtex/vtex-scripts

## Dependencies (26)

- [jest](https://npm.io/package/jest.md) ~22.4.3
- [babel](https://npm.io/package/babel.md) ~6.23.0
- [chalk](https://npm.io/package/chalk.md) ~2.4.0
- [react](https://npm.io/package/react.md) ^16.3.2
- [enzyme](https://npm.io/package/enzyme.md) ~3.3.0
- [graphql](https://npm.io/package/graphql.md) ~0.13.2
- [webpack](https://npm.io/package/webpack.md) ~4.5.0
- [fs-extra](https://npm.io/package/fs-extra.md) ~5.0.0
- [node-sass](https://npm.io/package/node-sass.md) ^4.9.0
- [react-dom](https://npm.io/package/react-dom.md) ^16.3.2
- [babel-jest](https://npm.io/package/babel-jest.md) ~22.4.3
- [css-loader](https://npm.io/package/css-loader.md) ^0.28.11
- [url-loader](https://npm.io/package/url-loader.md) ^1.0.1
- [graphql-tag](https://npm.io/package/graphql-tag.md) ~2.8.0
- [sass-loader](https://npm.io/package/sass-loader.md) ^7.0.1
- [babel-loader](https://npm.io/package/babel-loader.md) ~7.1.4
- [style-loader](https://npm.io/package/style-loader.md) ^0.21.0
- [enzyme-to-json](https://npm.io/package/enzyme-to-json.md) ~3.3.3
- [react-dev-utils](https://npm.io/package/react-dev-utils.md) ~5.0.1
- [svg-inline-loader](https://npm.io/package/svg-inline-loader.md) ^0.8.0
- [babel-preset-react](https://npm.io/package/babel-preset-react.md) ^6.24.1
- [babel-preset-es2015](https://npm.io/package/babel-preset-es2015.md) ^6.24.1
- [jest-transform-graphql](https://npm.io/package/jest-transform-graphql.md) ~2.1.0
- [enzyme-adapter-react-16](https://npm.io/package/enzyme-adapter-react-16.md) ~1.1.1
- [babel-plugin-dynamic-import-node](https://npm.io/package/babel-plugin-dynamic-import-node.md) ^1.2.0
- [babel-plugin-transform-class-properties](https://npm.io/package/babel-plugin-transform-class-properties.md) ^6.24.1

## Recent versions

- 0.4.13 (latest) — 2018-05-08
- 0.4.12 — 2018-05-08
- 0.4.11 — 2018-05-08
- 0.4.10 — 2018-05-07
- 0.4.9 — 2018-05-07
- 0.4.8 — 2018-05-07
- 0.4.6 — 2018-04-30
- 0.4.5 — 2018-04-26
- 0.4.4 — 2018-04-26
- 0.4.3 — 2018-04-26
- 0.4.2 — 2018-04-20
- 0.4.1 — 2018-04-20
- 0.4.0 — 2018-04-19
- 0.3.4 — 2018-04-19
- 0.3.3 — 2018-04-19
- … 5 more at https://npm.io/package/@vtex/vtex-scripts/versions

## README

# VTEX Scripts

This package contains the scripts and build configuration for the VTEX modules.

## Usage

1.  Inside the [NPM Store Components repo](https://www.github.com/vtex-apps/npm-storecomponents)

Just run the bellow in the terminal

```sh
$ lerna add @vtex/vtex-scripts --scope=your-component
$ lerna bootstrap
```

And add the following lines to your `package.json`

```json
{
  "scripts": {
    "build": "vtex-scripts build",
    "test": "vtex-scripts test"
  }
}
```

2.  In a `vtex init`'ed module

Add the `@vtex/vtex-scripts` to your devDependencies

```sh
$ yarn add @vtex/vtex-scripts --dev
```

Also, **if you want testing** you need to install some required packages

```
$ yarn add enzyme enzyme-adapter-react-16 jsdom --dev
```

And add the following to a `setupTests.js` in the root of your _source_ directory

```js
import Enzyme from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import { JSDOM } from 'jsdom'

const jsdom = new JSDOM('<!doctype html><html><body></body></html>')

global.window = jsdom.window
global.document = window.document

Enzyme.configure({ adapter: new Adapter() })
```

Then, just add the scripts to your `package.json`

```json
{
  "scripts": {
    "test": "vtex-scripts test"
  }
}
```

## Configurations

You can also customize some default configurations that comes with `vtex-scripts`

The following properties can be supplied in a `vtexScriptsOverride` property inside your `package.json`

| Name                 |   Type   | Description                                                        |
| -------------------- | :------: | ------------------------------------------------------------------ |
| `srcPath`            | `String` | The relative path of your sources directory (e.g. `./src`)         |
| `distPath`           | `String` | The relative path of your compiled files directory (e.g. `./dist`) |
| `setupTestsFilename` | `String` | The filename of the tests setup file (e.g. `setupTests.js`)        |

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