Giter Site home page Giter Site logo

EssentialJS - Essential Javascript

Build Status gittip.com/essentialjs

Essential web page enhancements. It gives you the freedom to scale from fast loading HTML 5 web pages to full blown HTML 5 web applications.

NPM

Resolver and Generator

Many languages have package and class concepts built in. Javascript has the global object, first order constructor functions, and function prototypes. If your code is no more than a few thousand lines the built-in concepts a quite sufficient. When moving beyond that point many people try to replicate the package and class concepts with mixed success. We use a different approach which give you even more power.

var core = Resolver().reference("appname.core");
function DecimalFormatter(decimals) {
}
core.declare("formatters.DecimalFormatter",Generator(DecimalFormatter));

Here we define a class equivalent in the module appname.core.formatters. The module will be accessible globally.

If you want to create a DecimalFormatter instance simply call.

var formatter = Resolver()("appname.core.formatters.DecimalFormatter")(2);

The really powerful part is that you can configure the resolution and generation somewhere else.

You can change the default resolver to use a private namespace keeping the global object unchanged. You can configure the default variant for appname.core.formatters.DecimalFormatter to be a different constructor.

Of course there is much more to it, check out the Wiki or the Website

Building Essential and Essentials

First prepare for development

npm install

Once you have the needed modules the source can be built with

grunt build

This will build plain and minified versions.

The default grunt target will host a development web server.

Building demo apps

./node_modules/.bin/lessc app/css/basic.less app/css/basic.css
./node_modules/.bin/lessc app/css/enhanced.less app/css/enhanced.css

License

You are quite free to use the library in your own projects. It is covered by an MIT license.

The demos are intended to remain as such and are therefore covered by an AGPL license.

Releases

Recent releases

0.6.0

Resolver("document") used to track document loading,modules,resources document.onreadystatechange is used as the main loading progress mechanism.

0.5.0

The queuing of links and meta tags in the head is reworked to be more efficient.

Resolver("essential::console::")() gets active console. Custom console can be set. Resolver("essential::console.logger::")(destination,level) gets specific console logger for destination Destinations can be routed to custom queue dump or routing push method.

Essential JavaScript's Projects

essential-bundle icon essential-bundle

Pull in your web component or module using require('your module') through browserify or socketstream

html5demos icon html5demos

Collection of hacks and demos showing capability of HTML5 apps

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.