jscore
A small library providing some class functionality.
Last updated 6 years ago by wasabi2k .
Original npm · Tarball · package.json
$ cnpm install jscore 
SYNC missed versions from official npm registry.

(js)Core Class library

Install

As always, use the npm package manager:

npm install jscore

Local usage:

var Core = require('jscore');
var example1 = Core.define('example1', {

	constructor: function() {
	 	// constructor method.
	}
});

var example2 = Core.define('example2', {
	extend: 'example1',
	
	constructor: function() {
	 	this._super(); // Call super.
	}

});

Global usage:

app.js:

require('jscore').makeGlobal(); // Puts Core in global scope.
Core.Loader.addPrefix('ApplicationName', 'fancy'); // add loader reference to folder 'fancy' for name 'ApplicationName'
Core.define('app', {
	extend: 'ApplicationName.base', // Auto loads fancy/base.js
	
	requires: [
		'data.file' // Auto loads data.file into global scope.
	],
	
	constructor: function() {
	 	var file = new data.file();
	 	
	}
});

data/file.js:

Core.define('data.file', {

});

fancy/base.js:

Core.define('ApplicationName.base', {

});

Current Tags

  • 1.0.9                                ...           latest (6 years ago)

10 Versions

  • 1.0.9                                ...           6 years ago
  • 1.0.8                                ...           6 years ago
  • 1.0.7                                ...           6 years ago
  • 1.0.6                                ...           6 years ago
  • 1.0.5                                ...           6 years ago
  • 1.0.4                                ...           6 years ago
  • 1.0.3                                ...           6 years ago
  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |