# vue-cli-context

> Sampily to get the Packages in Directory

Latest version **1.4.6** (published 2020-01-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-cli-context
pnpm add vue-cli-context
yarn add vue-cli-context
bun add vue-cli-context
```

## 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 | 1.4.6 |
| Published | 2020-01-14 |
| First published | 2019-08-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | joenix |
| Maintainers | joenix |

## Links

- npm: https://www.npmjs.com/package/vue-cli-context
- npm.io page: https://npm.io/package/vue-cli-context

## Recent versions

- 1.4.6 (latest) — 2020-01-14
- 1.2.6 — 2019-11-26
- 1.2.5 — 2019-09-05
- 1.2.4 — 2019-08-29
- 1.2.3 — 2019-08-18
- 1.2.2 — 2019-08-18
- 1.2.1 — 2019-08-18
- 1.2.0 — 2019-08-18
- 1.1.0 — 2019-08-18
- 1.0.3 — 2019-08-18
- 1.0.2 — 2019-08-18
- 1.0.1 — 2019-08-18
- 1.0.0 — 2019-08-18

## README

# vue-cli-context

> Sampily to get the Packages in Directory

```sh
npm i vue-cli-context
# or
yarn add vue-cli-context
```

```js
import contextual from "vue-cli-context";

contextual({
  // context
  context: require.context(
    // directory
    `@/pages/`
    // recursive
    true,
    // regular
    /.js$/
  ),
  // expect
  expect: pkg => pkg
  // if need some injections, it must be export a function within the file
  inject: {
    say: `hello world`
  }
}).then( pkgs => console.log(pkgs));
```

```js
// sample package with option: `inject`
export default ({ say }) => {
  console.log(say);
  // each package must set propert: `name`
  return {
    name: `sample`
  };
};
```

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