New: Introducing PHP and Composer Support.Read the Announcement
Socket
Book a DemoInstallSign in
Socket

atma-loader

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atma-loader

Base Atma Loader

latest
npmnpm
Version
1.0.11
Version published
Weekly downloads
2
-75%
Maintainers
1
Weekly downloads
 
Created
Source

Atma Loader Abstraction

Used for the atma plugin creation to develop File read middleware, like compilers and preprocessors.

Extends:

  • IncludeJS with a custom loader
  • atma-io with a custom middleware to read/compile/preprocess files
  • atma-server and Atma Toolkit with a HTTPHandler to serve compiled sources (with sourceMap support)

For usage examples refer to:

API

create
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:

{
    "atma": {
        "settings": {
            "%loader-name%": {
                "foo": "baz"
            }
        }
    }
}

(c) MIT License - Atma.js Project

FAQs

Package last updated on 19 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts