Socket
Book a DemoInstallSign in
Socket

fractaljs

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fractaljs

async-require ============= [![Build Status](https://travis-ci.org/dmitriiabramov/async-require.svg?branch=master)](https://travis-ci.org/dmitriiabramov/async-require)

Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

async-require

Build Status

// app.js
//= require_lib
//= require ./submodule.js

exports.f = function () { return 'app'; };
// submodule.js
exports.f = function () { return 'submodule'; };
<script src="http://localhost:6969/app.js></script>
<script>
    var app = require('app.js'),
        submodule = require('submodule.js');
    console.log(app.f());
    console.log(submodule.f());
</script>

development

make install && make dev

run all tests

make test

watch mocha test

make watch_mocha

run karma tests

brew install phantomjs
make karma
Features TODO
  • Q => ES-6 Promises
  • multiple paths
  • get rid of mutable config
  • parse directives differently for different file types
  • production build
  • generate layered build config file automatically (which package cantains required module)
  • heartbeat
  • unified API for serving assets
  • throw error in main thread (main app) on compile error (coffee/hamlc)
  • require ./file.js wrap_in_module
  • make module names relative paths
  • compile coffee/hamlc
  • 'require_tree' && 'require_directory' directives
API
  • getAssetList(paths, filePath) @param paths {Array} of absolute directory paths for lookup @param filePath {String} relative path to a single js file

  • getASset(paths, filePath, preprocessors) @param paths {Array} of absolute directory paths for lookup @param filePath {String} relative path to a single js file @param [preprocessors] {Object} hash-map of preprocessor name as keys and booleans as values for enabling/disabling preprocessors

  • getBuild() TODO

FAQs

Package last updated on 13 Jul 2014

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