# atma-loader

> Base Atma Loader

Latest version **1.0.11** (published 2017-03-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install atma-loader
pnpm add atma-loader
yarn add atma-loader
bun add atma-loader
```

## 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.0.11 |
| Published | 2017-03-19 |
| First published | 2014-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alexander Kit |
| Maintainers | tenbits |

## Links

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

## Dependencies (2)

- [atma-io](https://npm.io/package/atma-io.md) >0.0.0
- [atma-utils](https://npm.io/package/atma-utils.md) ^0.1.6

## Recent versions

- 1.0.11 (latest) — 2017-03-19
- 1.0.10 — 2016-09-20
- 1.0.9 — 2016-03-05
- 1.0.8 — 2016-03-04
- 1.0.7 — 2014-08-11
- 1.0.6 — 2014-08-11
- 1.0.5 — 2014-08-11
- 1.0.4 — 2014-08-05
- 1.0.3 — 2014-08-05
- 1.0.2 — 2014-06-26
- 1.0.1 — 2014-05-29
- 1.0.0 — 2014-05-28

## README

Atma Loader Abstraction
-----

Used for the atma plugin creation to develop File `read` middleware, like compilers and preprocessors.

Extends:

- [`IncludeJS`](https://github.com/atmajs/IncludeJS) with a custom loader
- [`atma-io`](https://github.com/atmajs/atma-io) with a custom middleware to read/compile/preprocess files
- [`atma-server`](https://github.com/atmajs/atma-server) and [`Atma Toolkit`](https://github.com/atmajs/Atma.Toolkit) with a `HTTPHandler` to serve compiled sources (with **sourceMap** support)


For usage examples refer to:
- [atma-loader-traceur](https://github.com/atmajs/atma-loader-traceur)
- [atma-Loader-less](https://github.com/atmajs/atma-loader-less)
- [atma-loader-package](https://github.com/tenbits/atma-loader-package)

#### API

###### create
```javascript
module.exports.create = function(data, ICompiler):AtmaPlugin

/*
 * - data Object {
 *      name: String > Plugin Loader Name
 *      options: {
 *          mimeType: String > mimeType of the resource
 *          extensions: [String] > file extensions to bind the middleware to
 *          ... > other configuration, which is then passed to compiler
 *      }
 *  }
 *
 * - ICompiler Object {
 *      compile: function(source String, filepath String, config Object): ICompilationResult
 *      ?compileAsync: function(source, filepath, config): Deferred<ICompilationResult>
 *  }
 *
 *  ICompilationResult: {
 *      content: String > Should contain compiled result
 *      ?sourceMap: String > optional, Source Maps
 *  }
 */
```

`options` could be extended then via `package.json`. Example:
```json
{
    "atma": {
        "settings": {
            "%loader-name%": {
                "foo": "baz"
            }
        }
    }
}

```

----
_(c) MIT License - Atma.js Project_

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