• Stars
    star
    118
  • Rank 299,923 (Top 6 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 12 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Montage Require: A "no-build-step" CommonJS module system for browsers.

Montage Require (aka mr)

npm version

Build Status

Analytics

This is a CommonJS module system, highly compatible with NodeJS, intended for front-end development of web applications using npm style packages. It is designed to be automatically replaced by the Montage Optimizer with a smaller, faster and bundled production module system.

Mr is installed as a package in your application using npm:

$ npm init                  # if you don't already have a package.json
$ npm install --save mr

In an HTML file next to your package.json add the Mr script and provide a module to load:

<script src="node_modules/mr/bootstrap.js" data-module="index"></script>

Start writing your code in index.js, using the require function as you would in Node. Have a look at the demo for working example.

You can place your package.json in a different location, or avoid having one at all, with other script tag attributes.

Optimization

Take a look at Mop, the Montage Optimizer to optimize applications for production. The optimizer can bundle packages with all of the dependent modules, can preload bundles of progressive enhancements in phases, and can generate HTML5 application cache manifests.

Documentation

Mr is compatible with Node and npm, although there are some differences.

There is documentation for:

And you may be interested in an in-depth look at how Mr works.

Compatibility

At present, Mr depends on document.querySelector and probably several other recent EcmaScript methods that might not be available in legacy browsers. With your help, I intend to isolate and fix these bugs.

At time of writing, tests pass in Chrome 21, Safari 5.1.5, and Firefox 13 on Mac OS 10.6.

Maintenance

Tests are in the spec directory. Use npm test to run the tests in NodeJS or open spec/run.html in a browser.

To run the tests in your browser, simply use npm run test:jasmine.

To run the tests using Karma use npm run test:karma and for continious tests run with file changes detection npm run test:karma-dev.

About

This implementation is a part from Motorola Mobility’s Montage web application framework. The module system was written by Tom Robinson and Kris Kowal. Motorola holds the copyright on much of the original content, and provided it as open source under the permissive BSD 3-Clause license. This project is maintained by Kris Kowal and Stuart Knightley, continuing with that license.

More Repositories

1

collections

This package contains JavaScript implementations of common data structures with idiomatic interfaces.
JavaScript
2,094
star
2

montage

Montage is an elegant, open source HTML5 framework maintained by Montage Studio that rivals native SDKs, yet is easier to learn. It offers modular components, two-way data binding, and much more. Join us on irc.freenode.net#montage. Sign up for our beta to build Montage applications in the cloud.
JavaScript
1,504
star
3

frb

Functional Reactive Bindings (frb): A CommonJS package that includes functional and generic building blocks to help incrementally ensure consistent state.
JavaScript
206
star
4

digit

Montage template package: Contains touch-optimized Montage components for tablets and phones (work in progress).
JavaScript
106
star
5

screening

JavaScript
49
star
6

popcorn

Sample Montage application
JavaScript
49
star
7

montagejs.org

The montagejs.org website with an introduction about Montage.
HTML
45
star
8

joey

An HTTP content negotiation client and server JavaScript library, inspired by Sinatra and JSGI, and using Q promises.
JavaScript
40
star
9

mop

Montage Optimizer (mop): Minifies (to reduce file size) and creates bundles (to reduce the number of requests) of Montage applications.
JavaScript
31
star
10

mousse

The library used by the MontageJS framework to manage the serialization of objects in its templates.
JavaScript
21
star
11

collectionsjs.com

A site for recollecting collections and their multifarious methods.
JavaScript
18
star
12

continuum

A Chrome Web Inspector Extension that adds a panel for asynchronous promises
JavaScript
13
star
13

minidom

Small Javascript DOM level 1 implementation
JavaScript
13
star
14

mfiddle

JavaScript
12
star
15

beachplanetblog

An example of how straightforward WebGL is with MontageJS
HTML
9
star
16

matte

Montage template package: Contains desktop UI components.
JavaScript
8
star
17

minit

Tool: Helps you build Montage applications by generating template applications and components for you.
JavaScript
8
star
18

todo-mvc

Sample: This is a MontageJS implementation of the TodoMVC application.
HTML
8
star
19

photofx

Sample: Image editing application for applying filter effects to photos
JavaScript
5
star
20

argo

Monadic streaming JSON parser
JavaScript
5
star
21

jasminum

A light, modular, promissory, “isomorphic”, Jasmine test runner clone
JavaScript
5
star
22

montage-wordpress

Displays a Wordpress posts in a montage flow component using REST API
HTML
4
star
23

studio-todo

JavaScript
3
star
24

native

Montage template package: Contains native UI components.
JavaScript
3
star
25

q-git

Interface with a JS-Git repository as a Q-IO compatible file system
JavaScript
3
star
26

bluemoon

JavaScript
2
star
27

montage-geo

Montage resources to build geospatial applications
JavaScript
2
star
28

carconfigurator

Sample: Implementation of the Montage 3D view component (WebGL scene)
JavaScript
2
star
29

paparazzi

Sample: Photo booth-style application for taking photos and applying effects
JavaScript
2
star
30

montage-testing

Package to enable jasmine test using the testacular runner in Montage projects
JavaScript
2
star
31

fribble

An easy way to experiment with the power of FRB expressions.
JavaScript
2
star
32

montage-lab

JavaScript
1
star
33

the-little-binder

A field manual for Functional Reactive Bindings (FRB)
1
star
34

montage-twitter

JavaScript
1
star
35

kitchen-sink

JavaScript
1
star
36

storyboard

JavaScript
1
star
37

calculator

Sample Montage calculator application
JavaScript
1
star
38

domenic

Normalizes the DOMParser interface between Node.js and browsers
JavaScript
1
star
39

dr

A dependency analyzer for CommonJS modules and Montage
JavaScript
1
star
40

montage-assets

Artwork for the Montage JavaScript Framework
1
star