diff --git a/.gitignore b/.gitignore index 9523636..6956a78 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules .DS_Store bin +dist/ diff --git a/.travis.yml b/.travis.yml index 2c52908..d717030 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,9 @@ language: node_js node_js: - - "0.10" -before_install: -- npm install -g grunt-cli grunt-contrib-jshint grunt-contrib-jasmine + - "node" notifications: email: false +jobs: + include: + - stage: buildtest + script: npm run bundle && npm t diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 36f11c3..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,184 +0,0 @@ -module.exports = function(grunt) { - 'use strict'; - - var app = {}, - config = {}, - tasks = [ - 'grunt-contrib-jshint', - 'grunt-contrib-concat', - 'grunt-contrib-jasmine', - 'grunt-contrib-watch', - 'grunt-contrib-uglify', - 'grunt-coveralls', - 'grunt-bump', - 'grunt-umd' - ]; - - // get patch if it's release - app.patch = grunt.option('patch'); - - // config pack - app.pack = grunt.config('pkg', grunt.file.readJSON('package.json')); - - // really?? I mean, really???? - function updateBanner() { - app.banner = '/** ' + - '\n* ' + app.pack.name + ' -v' + grunt.file.readJSON('package.json').version + - '\n* Copyright (c) '+ grunt.template.today('yyyy') + ' ' + app.pack.author + - '\n* Licensed ' + app.pack.license + '\n*/\n\n'; - - config.concat.options.banner = app.banner; - config.uglify.all.options.banner = app.banner; - }; - - // ============================================= - // bump - config.bump = {}; - config.bump.options = { - files: ['package.json'], - updateConfigs: [], - commit: true, - commitMessage: 'Release v%VERSION%', - commitFiles: [ - 'package.json', - 'dist' - ], - createTag: true, - tagName: 'v%VERSION%', - tagMessage: 'Version %VERSION%', - push: true, - pushTo: 'https://github.com/msodeveloper/core.js.git', - gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d' - }; - - // ============================================= - // jshint - config.jshint = {}; - config.jshint.options = { - debug: true, - sub: true - }; - config.jshint.all = ['dist/core.js']; - - // ============================================= - // concat - config.concat = { - options: { - banner: app.banner - }, - dist: { - src: [ - 'src/core/core.js', - 'src/helpers/*.js', - 'src/core/**/*.js', - 'src/sandbox/sandbox.js' - ], - dest: 'dist/core.js' - } - }; - - // ============================================= - // watch - config.watch = {}; - config.watch.scripts = { - files: ['src/**/*.js'], - tasks: ['concat', 'umd','jshint'], - options: { - spawn: false, - } - } - - // ============================================= - // uglify - config.uglify = {}; - config.uglify.all = { - files: { - 'dist/core.min.js': [ 'dist/core.js' ] - }, - options: { - preserveComments: false, - sourceMap: 'dist/core.min.map', - sourceMappingURL: 'core.min.map', - report: 'min', - beautify: { - ascii_only: true - }, - banner: app.banner, - compress: { - hoist_funs: false, - loops: false, - unused: false - } - } - } - - // ============================================= - // jasmine - config.jasmine = {}; - config.jasmine.coverage = { - src: [ - 'dist/core.js' - ], - options: { - specs: 'tests/**/*Spec.js', - template: require('grunt-template-jasmine-istanbul'), - templateOptions: { - coverage: 'bin/coverage/coverage.json', - report: { - type: 'lcov', - options: { - dir: 'bin/coverage' - } - }, - thresholds: { - lines: 75, - statements: 75, - branches: 75, - functions: 90 - } - } - } - } - - // ============================================= - // umd - config.umd = {}; - config.umd = { - all: { - options: { - src: 'dist/core.js', - objectToExport: 'Core' - } - } - }; - - // ============================================= - // coveralls - config.coveralls = { - src: 'bin/coverage/lcov.info' - }; - - updateBanner(); - - // Load all tasks - tasks.forEach(grunt.loadNpmTasks); - - // config - grunt.initConfig(config); - - - grunt.registerTask('dist', ['jshint', 'concat', 'umd', 'jasmine', 'uglify']); - - grunt.registerTask('ci', ['jshint', 'jasmine', 'coveralls']); - - grunt.registerTask('release', function () { - grunt.task.run('bump-only%patch%'.replace('%patch%', app.patch ? ':' + app.patch : '')); - setTimeout(function() { - updateBanner(); - grunt.task.run('dist'); - grunt.task.run('bump-commit'); - }, 0); - - // grunt.task.run('dist'); - }); -}; diff --git a/README.md b/README.md index 11de575..2b1c865 100644 --- a/README.md +++ b/README.md @@ -155,20 +155,14 @@ Core.start('tweet'); // Log:
(DOM Reference) If there's no DOM element, then `this.el` will return `null`. -### Extending Core - -__Core.js__ simple gives you an structure to scale your apps, but it won't give you the tools to build it, since we don't want to reinvent the wheel, it provides a way to extend its functionalities. - -Modules should not talk to external libreries as well, they will ask permission to `sandbox` before that, and `sandbox` will then talk to `Core` to check if that extension actually exists, let's see: - ```js // lets suppose we have jquery loaded before this -Core.extend('$', jQuery); + Core.register('tweet', function(sandbox) { return { init: function() { - sandbox.use('$')('#tweet').on('click', this.newTweet); + jQuery('#tweet').on('click', this.newTweet); }, newTweet: function() { @@ -178,9 +172,9 @@ Core.register('tweet', function(sandbox) { }); ``` -Using the method `use` from `sandbox`, it gives you access to all extensions from Core, without talking directly to it. -You might think: _"Why do that? it's only increasing the code"_. But since we are talking about consistency, and maybe a code that will be updated by other programmers, this is a way we can keep things standardized, and again, conpectually a module should not talk to anything else but the `sandbox`. + +A module should not talk to other modules directly anything else but the `sandbox`. ### Last thoughts @@ -241,18 +235,6 @@ __Usage__ Core.stopAll(); ``` -#### Core.extend( newExtension, implementation ) -Extends Core functionalities - -- `newExtension` (string): The name of the extension -- `implementation` (function | string | number | boolean | array): The implementation of the extension - -__Usage__ - -```js -Core.extend('$', jQuery); -``` - #### sandbox.listen( notification, callback, context, force ) Listens to other modules notifications, to overwrite a notification you must use the parameter force @@ -268,10 +250,6 @@ Notifies other modules - `type` (string): The notification that will be triggered - `data` (function | string | number | boolean | array): The data that will be passed in the callback -#### sandbox.use( extension ) -Calls the extension from core, if there's any - -- `extension` (string): The name of the extension ## Maintainer diff --git a/dist/core.js b/dist/core.js deleted file mode 100644 index 2c6b439..0000000 --- a/dist/core.js +++ /dev/null @@ -1,347 +0,0 @@ -(function (root, factory) { - if (typeof define === 'function' && define.amd) { - // AMD. Register as an anonymous module unless amdModuleId is set - define([], function () { - return (root['Core'] = factory()); - }); - } else if (typeof exports === 'object') { - // Node. Does not work with strict CommonJS, but - // only CommonJS-like environments that support module.exports, - // like Node. - module.exports = factory(); - } else { - root['Core'] = factory(); - } -}(this, function () { - -/** -* core.js -v0.7.3 -* Copyright (c) 2015 Mauricio Soares -* Licensed MIT -*/ - -'use strict'; - -/** -* The constructor of Core -* -* @class Core -* @constructor -*/ -var Core = function() { - this.modules = {}; -}; - -/** -* Registers a new module -* -* @method register -* @param {string} module the name of the new module -* @param {function} constructor the constructor of the new module -*/ -Core.prototype.register = function(module, constructor) { - if(this.modules[module]) { - this.helpers.err('!!module', module); - return false; - } - this.modules[module] = { - constructor: constructor, - instance: null - }; -}; - -/** -* Check if the module is already initialized or not -* -* @method moduleCheck -* @param {string} module the name of the module that will be checked -* @param {boolean} destroy check if the module exists, but is already destroyed -* @return {boolean} if the module exists or already have an instance -*/ -Core.prototype.moduleCheck = function(module, destroy) { - if(destroy) return !module || !module.instance; - - return !module || module.instance; -}; - -/** -* Gets an element by ID to attach to the module instance -* -* @method getElement -* @param {string} id the id of the main element in the module -*/ -Core.prototype.getElement = function(id) { - var el = document.getElementById(id); - - // this fixes some blackberry, opera and IE possible bugs - return (el && el.id === id && el.parentElement) ? el : null; -}; - -/** -* Starts a registered module, if no module is passed, it starts all modules -* -* @method start -* @param {string} module the name of the module -*/ -Core.prototype.start = function(module) { - if(!module) return this.startAll(); - - var cModule = this.modules[module], - el = this.getElement(module); - - if(this.moduleCheck(cModule)) { - this.helpers.err('!start', module); - return false; - } - - cModule.instance = new cModule.constructor(new this.Sandbox(module)); - - // attachs the element to the instance of the module - cModule.instance.el = el; - - if(cModule.instance.init) return cModule.instance.init(); -}; - -/** -* Stops a registered module -* -* @method start -* @param {string} module the name of the module -*/ -Core.prototype.stop = function(module) { - if(!module) return this.stopAll(); - - var cModule = this.modules[module], stopReturn; - - if(this.moduleCheck(cModule, true)) { - this.helpers.err('!stop', module); - return false; - } - - if(cModule.instance.destroy) stopReturn = cModule.instance.destroy(); - - cModule.instance = null; - - this.Sandbox.clearNotifications(module); - - return stopReturn; -}; - -/** -* Stop all started modules -* -* @method stopAll -*/ -Core.prototype.stopAll = function() { - this.xAll('stop'); -}; - -/** -* Stop all started modules -* -* @method stopAll -*/ -Core.prototype.startAll = function() { - this.xAll('start'); -}; - -/** -* Helper for startAll and stopAll -* -* @method xAll -* @param {string} method the method that will be triggered -*/ -Core.prototype.xAll = function(method) { - for(var module in this.modules) { - if(this.modules.hasOwnProperty(module)) this[method](module); - } -}; - -Core = new Core(); - -/** -* Handles error messages -* -* @method err -* @param {string} error the type of the error -* @param {function} message the complementary message to the error -*/ -var err = function(error, message) { - Core.helpers.log(err.messages[error] + "\"" + message + "\""); -}; - -err.messages = { - '!start': 'Could not start the given module, it\'s either already started or is not registered: ', - '!stop': 'Could not stop the given module, it\'s either already stopped or is not registered: ', - '!!module': 'Can\'t register an already registered module: ', - '!!listen': 'There\'s already an listen handler to the notification: ' -}; - -Core.helpers = Core.helpers || {}; -Core.helpers.err = err; - -/** -* Returns if the object is an array -* -* @method isArray -* @param {object} obj the object that will be checked -* @return {boolean} if its an array or not -*/ -var isArray = function(obj) { - return Object.prototype.toString.call(obj) === '[object Array]'; -}; - -Core.helpers = Core.helpers || {}; -Core.helpers.isArray = isArray; - -/** -* Adds console.log to Core helpers -* -* @method log -*/ -var log = (window.console) ? window.console.log.bind(window.console) : function() {}; - -Core.helpers = Core.helpers || {}; -Core.helpers.log = log; - -/** -* Returns an array-like to array -* -* @method toArray -* @param {object} obj The arraylike that will be converted -* @return {array} the converted arraylike -*/ -var toArray = function(obj) { - return Array.prototype.slice.call(obj); -}; - -Core.helpers = Core.helpers || {}; -Core.helpers.toArray = toArray; - -var extensions = {}; - -/** -* Extends core functionalities -* -* @method extend -* @param {string} name the name of the extension -* @param {function | array | boolean | string | number} implementation what the extension does -*/ -var extend = function(name, implementation) { - extensions[name] = implementation; -}; - -/** -* returns the extension -* -* @method getExtension -* @param {string} extension the name of the extension -* @return {function | array | boolean | string | number} the implementation of the extension -*/ -var getExtension = function(extension) { - return extensions[extension] || null; -}; - -Core.extend = extend; -Core.getExtension = getExtension; - -/** -* The constructor of Sandbox -* -* @class Sandbox -* @constructor -*/ -var Sandbox = function(module) { - this.module = module; -}; - -// All notifications from sandbox -Sandbox.notifications = {}; - -/** -* Clear all notifications from an specific module -* -* @method clearNotifications -* @param {string} module the name of the module -*/ -Sandbox.clearNotifications = function(module) { - delete Sandbox.notifications[module]; -}; - -/** -* Notifies other modules from an specific notification -* -* @method notify -* @param {object} notification the object with notifications configs -*/ -Sandbox.prototype.notify = function(notification) { - for(var module in Sandbox.notifications) { - var listening = Sandbox.notifications[module][notification.type]; - if(listening) { - listening.callback.call(listening.context, notification.data); - } - } -}; - -/** -* Makes a module listen to an specific notification -* -* @method listen -* @param {string | array} notification the notification that the module will be listening to -*/ -Sandbox.prototype.listen = function(notification) { - var args = Core.helpers.toArray(arguments); - if(!Core.helpers.isArray(notification)) return this.addNotification.apply(this, arguments); - - for(var i = 0, len = notification.length; i < len; i += 1) { - args[0] = notification[i]; - this.addNotification.apply(this, args); - } -}; - -/** -* Adds the module listener to the notifications configuration -* -* @method addNotification -* @param {string} notification the name of the notification -* @param {function} callback the callback that will be triggered when the notification is called -* @param {object} context the value of "this" -* @param {boolean} replace if the notification already exists, it forces to rewrite it -*/ -Sandbox.prototype.addNotification = function(notification, callback, context, replace) { - var notifications = Sandbox.notifications, - addNotification = false; - - if(!notifications[this.module] || !notifications[this.module][notification]) { - addNotification = true; - } else if(replace) { - addNotification = true; - } else { - Core.helpers.err('!!listen', notification); - } - - if(addNotification) { - notifications[this.module] = notifications[this.module] || {}; - notifications[this.module][notification] = { - callback: callback, - context: context || window - }; - } -}; - -/** -* Returns an extension from Core -* -* @method x -* @param {string} extension the name of the extension -* @return {function | array | boolean | string | number} the implementation of the extension -*/ -Sandbox.prototype.use = function(extension) { - return Core.getExtension(extension); -}; - -Core.Sandbox = Sandbox; - -return Core; - -})); diff --git a/dist/core.min.js b/dist/core.min.js deleted file mode 100644 index 1d94a12..0000000 --- a/dist/core.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/** -* core.js -v0.7.3 -* Copyright (c) 2015 Mauricio Soares -* Licensed MIT -*/ - - -!function(a,b){"function"==typeof define&&define.amd?define([],function(){return a.Core=b()}):"object"==typeof exports?module.exports=b():a.Core=b()}(this,function(){"use strict";var a=function(){this.modules={}};a.prototype.register=function(a,b){return this.modules[a]?(this.helpers.err("!!module",a),!1):void(this.modules[a]={constructor:b,instance:null})},a.prototype.moduleCheck=function(a,b){return b?!a||!a.instance:!a||a.instance},a.prototype.getElement=function(a){var b=document.getElementById(a);return b&&b.id===a&&b.parentElement?b:null},a.prototype.start=function(a){if(!a)return this.startAll();var b=this.modules[a],c=this.getElement(a);return this.moduleCheck(b)?(this.helpers.err("!start",a),!1):(b.instance=new b.constructor(new this.Sandbox(a)),b.instance.el=c,b.instance.init?b.instance.init():void 0)},a.prototype.stop=function(a){if(!a)return this.stopAll();var b=this.modules[a],c;return this.moduleCheck(b,!0)?(this.helpers.err("!stop",a),!1):(b.instance.destroy&&(c=b.instance.destroy()),b.instance=null,this.Sandbox.clearNotifications(a),c)},a.prototype.stopAll=function(){this.xAll("stop")},a.prototype.startAll=function(){this.xAll("start")},a.prototype.xAll=function(a){for(var b in this.modules)this.modules.hasOwnProperty(b)&&this[a](b)},a=new a;var b=function(c,d){a.helpers.log(b.messages[c]+'"'+d+'"')};b.messages={"!start":"Could not start the given module, it's either already started or is not registered: ","!stop":"Could not stop the given module, it's either already stopped or is not registered: ","!!module":"Can't register an already registered module: ","!!listen":"There's already an listen handler to the notification: "},a.helpers=a.helpers||{},a.helpers.err=b;var c=function(a){return"[object Array]"===Object.prototype.toString.call(a)};a.helpers=a.helpers||{},a.helpers.isArray=c;var d=window.console?window.console.log.bind(window.console):function(){};a.helpers=a.helpers||{},a.helpers.log=d;var e=function(a){return Array.prototype.slice.call(a)};a.helpers=a.helpers||{},a.helpers.toArray=e;var f={},g=function(a,b){f[a]=b},h=function(a){return f[a]||null};a.extend=g,a.getExtension=h;var i=function(a){this.module=a};return i.notifications={},i.clearNotifications=function(a){delete i.notifications[a]},i.prototype.notify=function(a){for(var b in i.notifications){var c=i.notifications[b][a.type];c&&c.callback.call(c.context,a.data)}},i.prototype.listen=function(b){var c=a.helpers.toArray(arguments);if(!a.helpers.isArray(b))return this.addNotification.apply(this,arguments);for(var d=0,e=b.length;e>d;d+=1)c[0]=b[d],this.addNotification.apply(this,c)},i.prototype.addNotification=function(b,c,d,e){var f=i.notifications,g=!1;f[this.module]&&f[this.module][b]?e?g=!0:a.helpers.err("!!listen",b):g=!0,g&&(f[this.module]=f[this.module]||{},f[this.module][b]={callback:c,context:d||window})},i.prototype.use=function(b){return a.getExtension(b)},a.Sandbox=i,a}); -//# sourceMappingURL=core.min.js.map \ No newline at end of file diff --git a/dist/core.min.js.map b/dist/core.min.js.map deleted file mode 100644 index ec9d42e..0000000 --- a/dist/core.min.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"core.min.js","sources":["core.js"],"names":["root","factory","define","amd","exports","module","this","Core","modules","prototype","register","constructor","helpers","err","instance","moduleCheck","destroy","getElement","id","el","document","getElementById","parentElement","start","startAll","cModule","Sandbox","init","stop","stopAll","stopReturn","clearNotifications","xAll","method","hasOwnProperty","error","message","log","messages","!start","!stop","!!module","!!listen","isArray","obj","Object","toString","call","window","console","bind","toArray","Array","slice","extensions","extend","name","implementation","getExtension","extension","notifications","notify","notification","listening","type","callback","context","data","listen","args","arguments","addNotification","apply","i","len","length","replace","use"],"mappings":";;;;;;;CAAC,SAAUA,EAAMC,GACO,kBAAXC,SAAyBA,OAAOC,IAEzCD,UAAW,WACT,MAAQF,GAAW,KAAIC,MAEG,gBAAZG,SAIhBC,OAAOD,QAAUH,IAEjBD,EAAW,KAAIC,KAEjBK,KAAM,WAQR,YAQA,IAAIC,GAAO,WACTD,KAAKE,WAUPD,GAAKE,UAAUC,SAAW,SAASL,EAAQM,GACzC,MAAGL,MAAKE,QAAQH,IACdC,KAAKM,QAAQC,IAAI,WAAYR,IACtB,QAETC,KAAKE,QAAQH,IACXM,YAA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,KAAMgE,UAEhF,KAAI,GAAIG,GAAI,EAAGC,EAAMZ,EAAaa,OAAYD,EAAJD,EAASA,GAAK,EACtDJ,EAAK,GAAKP,EAAaW,GACvBnE,KAAKiE,gBAAgBC,MAAMlE,KAAM+D,IAarC3C,EAAQjB,UAAU8D,gBAAkB,SAAST,EAAcG,EAAUC,EAASU,GAC5E,GAAIhB,GAAgBlC,EAAQkC,cAC1BW,GAAkB,CAEhBX,GAActD,KAAKD,SAAYuD,EAActD,KAAKD,QAAQyD,GAEpDc,EACRL,GAAkB,EAElBhE,EAAKK,QAAQC,IAAI,WAAYiD,GAJ7BS,GAAkB,EAOjBA,IACDX,EAActD,KAAKD,QAAUuD,EAActD,KAAKD,YAChDuD,EAActD,KAAKD,QAAQyD,IACzBG,SAAUA,EACVC,QAASA,GAAWlB,UAY1BtB,EAAQjB,UAAUoE,IAAM,SAASlB,GAC/B,MAAOpD,GAAKmD,aAAaC,IAG3BpD,EAAKmB,QAAUA,EAERnB"} \ No newline at end of file diff --git a/example/index.html b/example/index.html index 696058f..5212cf4 100644 --- a/example/index.html +++ b/example/index.html @@ -18,83 +18,9 @@ - - - + +