Giter Club home page Giter Club logo

amdlc's Introduction

amdlc

This is a Node.js AMD Library Compiler. It enables you to write code in an the AMD style and compile the modules into a standalone library file with all public modules exposed into the global namespace this is the opposite to application specific AMD module loaders like RequireJS.

When compiling AMD projects using this compileer you get three files:

  • Inline minified file using Uglify-js
  • Inline source file
  • Development file that loads the modules synchronous (debug)

Installation

npm install -g amdlc

Command line usage

Usage: amdlc [options] <input file/glob pattern> <output file>

Options:
  --quiet              no output
  --include-root-ns    include root namespace from path resolve
  --basedir            basedir to look for modules for example src/js

Example with single file entry point

amdlc --basedir example/src example/src/App.js example/out/App.js

Example with glob pattern

amdlc --basedir example/src example/src/**/*.js example/out/App.js

Example of usage from Node.js

var amdlc = require("amdlc");

amdlc.compile({
    from: "src/**/*.js",
	baseDir: "src",
	compress: true,
	expose: "public",
	excludeRootNamespaceFromPath: true,
	verbose: true,
	outputSource: "out/lib.js",
	outputMinified: "out/lib.min.js",
	outputDev: "out/lib.dev.js"
});

Todo

  • Implement anonymous modules.
  • Implement support for relative modules like ./MyModule

amdlc's People

Contributors

jayarjo avatar spocke avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.