# atma-loader-package

> 'Package' loader for `atma-io`, `IncludeJS` and `atma-server`.

Latest version **1.0.11** (published 2014-08-11) · MIT license · 0 weekly downloads

## Install

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

## 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 | 2014-08-11 |
| First published | 2014-02-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Alexander Kit |
| Maintainers | tenbits |

## Links

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

## Recent versions

- 1.0.11 (latest) — 2014-08-11
- 1.0.9 — 2014-07-15
- 1.0.8 — 2014-05-04
- 0.0.8 — 2014-05-04
- 0.0.7 — 2014-05-04
- 0.0.6 — 2014-02-10
- 0.0.5 — 2014-02-09

## README

Package Loader (Atma Plugin)
-----

[![Build Status](https://travis-ci.org/tenbits/atma-loader-package.png?branch=master)](https://travis-ci.org/tenbits/atma-loader-package)

The Plugin extends:
- [`IncludeJS`](https://github.com/atmajs/IncludeJS) with a custom loader for the `Node.js` version
- [`atma-io`](https://github.com/atmajs/atma-io) with a custom middleware
- [`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)


Load scripts from a directory as a package, assume this structure and the loading process:

```
lib
+-- Foo
|   |-- foo.js
|    
|-- A.js
|-- B.js
```

```javascript

// load all files
include
    .js('./lib/.package::Lib') 
    // similar to the glob version: `./lib/**.js.package`

    .done(function(resp){
        resp.Lib.A //> Exports Object from `lib/A.js' file
        resp.Lib.B //> Exports Object from `lib/B.js' file
        resp.Lib.Foo.foo //> Exports Object from `lib/Foo/foo.js' file
    });

// load only root files
include
    .js('./lib/*.js.package')
    .done(function(resp){
        resp.Lib.A //> Exports Object from `lib/A.js' file
        resp.Lib.B //> Exports Object from `lib/B.js' file
    })

```




##### How to use

###### Embed into the Project

- `npm install atma -g`
- `atma plugin install atma-loader-package`
- _That's all_

##### Quick Try

@see [Tests](https://github.com/tenbits/atma-loader-package/tree/master/test)


----
The MIT License

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