• Stars
    star
    103
  • Rank 333,046 (Top 7 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 14 years ago
  • Updated over 9 years ago

Reviews

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

Repository Details

Dropin require polyfill for the browser

require

Dropin require polyfill for the browser

Really useful in development for when you don't want to crank up browserify.

Super simple.

Fully swappable with browserify and friends in production.

Installation

  1. Include the script and serve it (it won't work direct from the filesystem due to browser security)
<script src='require.js'></script>

or use it direct from rawgit

<script src='//rawgit.com/weepy/brequire/master/require.js'></script>
  1. Code like a boss

  2. You can optionally include the PARSEJS library which will help point point any syntax errors in your code whilst

Compilers

You can add compilers for coffeescript, css, JSX or whatever in very simply by registering a handler like

require.compilers.css = function(text) {

    var style = document.createElement('style');
	style.appendChild(document.createTextNode(text));
	document.head.appendChild(style);
}

This will allow you to include css on page like :

require("./style.css")

Production

It uses Sync XHR which is great for development, but not so much in production.

Forunately, you can swap out this library with browserify or similar in production.

More Repositories

1

jquery.path

Animatation for arcs and bezier curves with jQuery
JavaScript
407
star
2

kaffeine

Extended Javascript for Pros
JavaScript
180
star
3

o_O

Funnyface: HTML binding for teh lulz
JavaScript
149
star
4

attr

evented attribute component with automatic dependencies
JavaScript
52
star
5

saucy

Dynamic Text Rendering Plugin for Rails. Like sIFR but without the Hassle, Flash or even Javascript.
Ruby
43
star
6

sublive

Public Repo for Sublive for bug reports and feedback
37
star
7

jade-browser

compile jade for the browser
JavaScript
34
star
8

bounce

Node Reload
JavaScript
31
star
9

cornerz

Bullet Proof Corners plugin for jQuery using Canvas/VML
JavaScript
27
star
10

cssie

CSS in your face (only IE need to apply)
JavaScript
24
star
11

bean-server

Rubygems for Javascript
Ruby
17
star
12

node-jobs

simple job runner
JavaScript
12
star
13

test

test
10
star
14

ie-hover

Bringing :hover to IE Stylesheets with jQuery
JavaScript
10
star
15

snips

Super Simple CMS for Rails
Ruby
9
star
16

redisify

object orientated redis proxy
JavaScript
7
star
17

node_eval

Evaluate's javascript and returns a JSON object using Node
JavaScript
6
star
18

sprite-factory

sprites for jquery - with full PNG support
JavaScript
5
star
19

sam

simple asset manager
JavaScript
5
star
20

browser-require

`require` polyfill for the browser
JavaScript
5
star
21

jsvm_server

RPC Server and client for running multiple javascript environments in a separate process (Event Machine).
Ruby
4
star
22

pipe_utils

Utilities for use with the pipe operator in Kaffeine
JavaScript
4
star
23

mmmodel

Homer's favorite ORM
JavaScript
4
star
24

spiderz

Scarily easy spidering
Ruby
3
star
25

vanilla-notify

Vanilla growlesque notification for jQuery. Only 20 LOC
JavaScript
3
star
26

EML

EaselJS Markup Language
JavaScript
2
star
27

vanilla

Basic Rails App with all the starting points. jQuery, Restful Auth, ClearSS + lots of other bits n bobs
Ruby
2
star
28

StudioAmplify2.github.io

Documentation site for StudioAmplify
1
star
29

express

1
star
30

weepy2.github.io

1
star
31

weepy.github.com

project page
1
star
32

studioamplify.github.io

Documentation site for Studio Amplify
1
star
33

__edgy

1
star
34

GramrphoneDownloads

1
star
35

sprockets-server

simple sprockets server based on sinatra to afford modular TDD javascript
Ruby
1
star