# aster-src

> Glob files reader for aster.

Latest version **0.1.3** (published 2014-09-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install aster-src
pnpm add aster-src
yarn add aster-src
bun add aster-src
```

## 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.1.3 |
| Published | 2014-09-27 |
| First published | 2014-06-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Ingvar Stepanyan |
| Maintainers | rreverser |
| Keywords | aster-plugin, ast, javascript, glob, read, parse |

## Links

- npm: https://www.npmjs.com/package/aster-src
- Repository: https://github.com/asterjs/aster-src
- Issues: https://github.com/asterjs/aster-src/issues
- npm.io page: https://npm.io/package/aster-src

## Dependencies (4)

- [rx](https://npm.io/package/rx.md) ^2.3.11
- [glob](https://npm.io/package/glob.md) ^4.0.6
- [minimatch](https://npm.io/package/minimatch.md) ^1.0.0
- [aster-parse](https://npm.io/package/aster-parse.md) ^0.1.1

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 0.1.3 (latest) — 2014-09-27
- 0.1.2 — 2014-09-27
- 0.1.0 — 2014-09-27
- 0.0.4 — 2014-06-15
- 0.0.3 — 2014-06-11
- 0.0.2 — 2014-06-06
- 0.0.1 — 2014-06-06

## README

# aster-src
[![NPM version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]

> Source files reader for aster.

## Usage

This module is part of [aster](https://npmjs.org/package/aster) and is available via `aster.src`.

You use it in build scripts whenever you want to get list of files for executing build pipeline:

```javascript
var aster = require('aster');

aster.src([
  '**/*.js',
  '!node_modules/**'
])
.map(plugin1(optionsForPlugin1))
.map(plugin2(optionsForPlugin2))
// ...
.subscribe(aster.runner);
```

`aster.src` returns [`Rx.Observable`](https://github.com/Reactive-Extensions/RxJS/blob/master/doc/api/core/observable.md) which, in order, emits single inner observable collection of file ASTs wrapped with custom `{type: 'File', program: ..., loc: {source: 'fileName.js'}}` node. 

## API

### src(patterns, options)

#### patterns
Type: `String|String[]`

List of patterns as array of strings or one comma-separated string.

#### options
Type: `Object`

`glob` module options (see https://github.com/isaacs/node-glob#options for details).

#### options.noglob
Type: `Boolean`
Default: `false`

Set to true if you want `patterns` to be used as explicit list of files instead of globbing patterns (used by [aster-watch](https://github.com/asterjs/aster-watch)).

#### options.parse
Type: `Function|Boolean|Object`
Default: `true`

* If preconfigured parser (i.e., `require('aster-parse-js')({loc: false})`) or custom `function (files) { ... }` is passed, it will be used as is.
* If boolean is passed:
  * `true` means files should be parsed with parser associated with file extension (see [aster-parse](https://github.com/asterjs/aster-parse)).
  * `false` means files should not be parsed and so they are pushed as `{path: string, contents: string}` object.
* If object is passed, it will be used as [parsing options](https://github.com/asterjs/aster-parse#parseoptions).

### src.registerParser(extension, parser)
Method for registering custom parsers associated with extension, see [asterParse.registerParser](https://github.com/asterjs/aster-parse#parseregisterparserextension-parser) for details.

## License

[MIT License](http://en.wikipedia.org/wiki/MIT_License)

[npm-url]: https://npmjs.org/package/aster-src
[npm-image]: https://badge.fury.io/js/aster-src.png

[travis-url]: http://travis-ci.org/asterjs/aster-src
[travis-image]: https://secure.travis-ci.org/asterjs/aster-src.png?branch=master

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