• Stars
    star
    265
  • Rank 154,577 (Top 4 %)
  • Language
    CoffeeScript
  • License
    MIT License
  • Created about 12 years ago
  • Updated over 4 years ago

Reviews

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

Repository Details

The Ultimate JavaScript Module Builder & Automagical Task Runner. Convert AMD & CommonJS/NodeJS modules to UMD, AMD, CommonJS or bundle them as `combined.js` (rjs & almond, AMDclean soon) & automagically run/test/watch them on nodejs, Web/AMD or Web/Script. Declarative & DRY config with inheritance. Manipulate & inject dependencies, module code, banners, version etc while building with a single line. Support two kinds of plugins, ResourceConverter (i.e file level) and AfterBuilder (i.e the whole bundle). Transparent support for Coffeescript, IcedCoffeescript, Coco, LiveScript โ€“ theyโ€™re just JavaScript :-)

uRequire v0.7.0-beta.33

THIS PROJECT IS NO LONGER MAINTAINED

It had awesome ideas, but it was for a different JavaScript era.

Back then in 2013, it was all about Grunt, CommonJS & AMD modules.

Now we have ES6, TypeScript, webpack, rollup anmd a different landscape.

Many of uRequire's ideas & features are still missing from mainstream build tools I use everyday (eg manipulate code while you're building, or inject modules at build time). I just work around them. Maybe someday, someone will revive those great ideas in the new world - if so, drop me a line!

The LATEST VERSION is v0.7.0-beta.33 and should work without problems.

Docs are mostly up to date, but not fully :-)

Beta release note

_Docs / wiki mainly are Work In Progress (in transition from v0.6.x) - but everything should work except you'll need npm install urequire-cli -g & npm install urequire locally (if you are using the CLI urequire instead of the the recommended grunt-urequire). Check uRequire's master config / docs for up to date usage._

Build Status Up to date Status

The JavaScript Universal Module & Resource Converter (and automagical builder, test runner and more)...

All documentation is at uRequire GitHub Pages

What's uRequire ?

For a quick taste of how much uRequire rocks, with minimal grunting or gulping, check urequire-example-helloworld. With just ~30 lines of DRY & declarative uRequire config, this example shows off the automagical :

  • transparent compilation from coffee-script, coco, LiveScript etc to javascript. They are all javascript, right ?

  • conversion from AMD or CommonJs (or a combination of both) to UMD or combined (<script>, AMD & nodejs compatible) javascript.

  • importing of dependencies (i.e dependencies: imports: lodash: ['_']) and keys out of them (resources: ['import-keys', {'chai': 'expect'} ] ]) to all modules in the bundle (held by some variable name). The latter uses the urequire-rc-import-keys ResourceConverter plugin.

  • injection of a var VERSION = 'x.x.x'; in main module's body, where 'x.x.x' comes from package.json (using the urequire-rc-inject-version ResourceConverter plugin).

  • gereration of a standard banner, with info from package.json.

  • declarative exporting of main module on window.myModule (with noConflict() baked in).

  • minification with uglify2's passing some rudimentary options.

  • discovery of dependencies's paths using the info already in bower or nodejs's npm.

  • generated tests that run on nodejs & phantomjs (browser) via mocha (& chai), both as Web/AMD & Web/Script. It even generates the required HTML, with all module's paths, requirejs's configs & shims or <script ...> tags etc.

  • watch facility with rapid rebuilds, since it compiles only files that have really changed and also runs the tests only if a) there were changes and b) with no compilation errors.

  • clean of destination files / folders before each build.

  • deriving (i.e like inheritance in OO) of configs.

  • passing r.js options

  • a cross module systems development, cross runtimes deployment & automagical continuous testing.

  • and last but not least: The elimination of (the need for) grunt plugins. There's isnt any hint of grunt-xxx for watch, coffee-script, browserify, uglify, mocha, concat, phantomjs, banner, clean etc). This is great news cause cause grunt plugins have many disadvantages :

    • repeating the same source & dest paths & files all over again (when you should keep it DRY)

    • you have to learn the intricacies & syntax of each plugin

    • making sure they run in the right order & hope they produce the right result

    • producing many intermediate temp files

    • building everything with each change etc

    • writing stuff for things that should be automagical ;-)

Who's gulping ?

Support uRequire

  • @goto('http://github.com/anodynos/urequire').then -> @star() with your love :-)

  • Flattr donate button PayPayl donate button

  • Get me hired me in a cool nodejs-loving team in London, UK (as of March 2015 ;-)

License

The MIT License

Copyright (c) 2013-2015 Agelos Pikoulas ([email protected])

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

upath

A proxy to `path`, replacing `\` with `/` for all results & methods to add, change, default, trim file extensions.
CoffeeScript
146
star
2

accesscontrol-re

A facade enhancing the great javascript lib AccessControl, but with much desired missing features!
TypeScript
11
star
3

node-glob-expand

A sync glob / minimatch call with a gruntjs -like `expand` of patterns, with minimum depepndencies. Derived from gruntjs's v0.4.1 `file.expand`.
CoffeeScript
9
star
4

node2web

Registers browserify-ied nodejs core modules to bower (via their name), to make them easily available to browsers.
CoffeeScript
6
star
5

uBerscore

An anorthodox, extensible, overloaded facade experiment of underscore facilities & leftovers.
CoffeeScript
6
star
6

require-clean

Cleanly require a module from disk, having flushed the module's cache, including all of its submodules. Used like normal require.
CoffeeScript
5
star
7

touchegg

Automatically exported from code.google.com/p/touchegg
C++
4
star
8

urequire-example-helloworld

Example `Hello world` project build with uRequire, demonstrating declarative DRYness packed with automagical power.
CoffeeScript
3
star
9

node2web_querystring

JavaScript
2
star
10

node2web_buffer

JavaScript
2
star
11

urequire-example

Example project build with uRequire, demonstrating declarative DRYness packed with automagical power.
CoffeeScript
2
star
12

decurry

Decurry is the 'reverse' of curry: given a composed function `fn(arg1)(arg2)(arg3)` it gives a function that can be called as `fn(arg1, arg2, arg3)` or `fn(arg1, arg2)(arg3) etc.
CoffeeScript
2
star
13

newin

CLI to open new window(s)/tab(s) & execute bash command(s) on WSL Windows Terminal or KDE Konsole
JavaScript
2
star
14

ramdash

(Some) missing lodash functions for ramda with minimal size (1k minified)
CoffeeScript
2
star
15

calculated-cached-properties

CoffeeScript
2
star
16

urequire-ab-specrunner

Automagically generates and runs Specs using mocha, chai & phantomjs after running a `lib` and a `specs` build in [uRequire](http://urequire.org) running on grunt.
CoffeeScript
2
star
17

SpringDataNeo4jTrials

Some Spring Data Neo4j 2.x testing on OO/Inheritance/Polymorhpism, Repositories, AspectJ, Groovy, Cypher, Gremlin etc
Java
1
star
18

policy-peoplefinder-abac

Open Policy Agent
1
star
19

nodejs-browser-cross-development

Using uRequire with cross platform (nodejs/browser) dependencies
JavaScript
1
star
20

permissions-nestjs

NestJS Guard & Decorators for @superawesome/permissions, promoting orthogonal fine-grained access control to resources.
TypeScript
1
star
21

urequire-rc-rxjs5-custom-build

Build *custom build of RxJS 5*, a custom Observable with added (patched) operators on streams (eg 'map', 'filter' etc), and static methods attached to Observable (like 'Observable.fromEvent').
CoffeeScript
1
star
22

permissions

Fine grained permissions / access control with ownerships & attribute picking, done right.
TypeScript
1
star
23

umatch

A `function(filename, specs)` thats checks if `'someFile.ext'` passes through an of Array of `minimatch` / `RegExp` / `callbacks` / `Array` (recursive) specs, with a negation/exclusion '!' flag for all
CoffeeScript
1
star
24

urequire-ab-grunt-contrib-watch

Automagically generates and runs a `grunt-contrib-watch` task from a uRequire config running within grunt.
CoffeeScript
1
star
25

node2web_path

JavaScript
1
star
26

urequire-rc-inject-version

uRequire ResourceConverter that injects a `var VERSION = 'x.x.x'` where its needed.
CoffeeScript
1
star
27

urequire-grunt

Write a 5-10 line build configuration, get an out-of-the-box, ready-to-work, full-fledged, fool-proof grunt & urequire based build system.
CoffeeScript
1
star