Skip to content
Super-lightweight library for building modular frameworks
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
test/spec
.editorconfig
.gitignore repository triage Apr 1, 2014
.jshintrc
Gruntfile.js fixed tests Apr 3, 2014
LICENSE.txt CoreJS Dec 16, 2013
README.md Update README.md Jun 2, 2015
bower.json updated Router Apr 2, 2014
core-react.js
core.js
events.js repository triage Apr 1, 2014
karma.conf.js
package.json
router.js
tpl.js

README.md

CoreJS

CoreJS

CoreJS

Installing CoreJS: single file

CoreJS is available in GitHub and via Bower:

bower install corejs

Usage

Include core.js into your HTML page and specify the path to your main module as the data-main attribute:

<!-- index.html -->
<!-- ... -->
<script data-main="js/main.js" src="bower_components/corejs/core.js"></script>
<!-- ... -->

main.js in its turn can have any require() calls that load all other modules, e.g.

/* main.js */
var moduleA = require('module-a'), // loads js/module-a.js
    util = require('folder/util'), // loads js/folder/util.js
    _ = require('bower_components/underscore/underscore');

All paths are resolved from your main module path, in this example it is js/

Installing CoreJS: with Components and example application

Cloning the repo and installing all NPM and Bower modules

git clone https://github.com/CoreJS/corejs.github.io.git CoreJS && cd $_
npm install
bower install --dev

Starting the application

grunt serve

Making the production build

Example application comes with the compile task that takes all required modules and creates a build:

grunt compile

Deploying is simple as well:

grunt deploy

The deploy location is configured in Gruntfile.js

Something went wrong with that request. Please try again.