diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..e4c0d46 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +1.0.3 \ No newline at end of file diff --git a/dist/simple.dev.js b/dist/simple.dev.js index 900f460..aae10a3 100644 --- a/dist/simple.dev.js +++ b/dist/simple.dev.js @@ -172,7 +172,8 @@ function _c(obj) { */ var app; app = function (name, cnf) { - this.version = '1.02'; + // current version from build + this.version = '1.0.3'; this.aName = name; // defaults name = _s(name).hashCode(); @@ -806,5 +807,6 @@ w.SimpleApp = function (name, config) { if (typeof exports != 'undefined') { exports.SimpleApp = w.SimpleApp; } + }) (this); diff --git a/dist/simple.min.js b/dist/simple.min.js index 61ec18d..245d71a 100644 --- a/dist/simple.min.js +++ b/dist/simple.min.js @@ -13,7 +13,7 @@ if(0===this.length)return a for(t=0,i=this.length;i>t;t++)e=this.charCodeAt(t),a=(a<<5)-a+e,a|=0 return Math.abs(a)} var l -l=function(t,l){this.version="1.02",this.aName=t,t=n(t).hashCode() +l=function(t,l){this.version="1.0.3",this.aName=t,t=n(t).hashCode() var o="_sj_"+t if(this.name=t,r[o]=this,this.localStorageKey=o+"_data",this.container=null,this.state={},this.pState={},this.cnf={localStorageWrite:!0,localStorageRead:!0,partialRender:!0},"object"==typeof l)for(var c in l)this.cnf[c]=l[c] this.callbacks={sta:{},fin:{},wrd:{},drd:{},rde:{},ped:{},siu:{}},this.getCallback=function(t,e){return e?"function"==typeof this.callbacks[t][e]?this.callbacks[t][e]:void 0:this.callbacks[t]},this.on=function(t,e,i){"object"==typeof this.callbacks[t]&&"function"==typeof i&&(this.callbacks[t][e]=i)},this._f=function(t){var e=this.getCallback(t) diff --git a/package.json b/package.json index d524d9c..6e93f8e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "info": "echo 'Simple JS for Apps, supports defer/async and uses native JS with no external libs'", "lint": "echo '=> JS Linkting' && jshint src/*.js", "pretest": "npm run lint -s", - "build": "echo '=> Build All' && npm run build:dev && uglifyjs -c drop_console=true dist/simple.dev.js -o dist/simple.js && minify dist/simple.js && rm dist/simple.js", + "build": "echo '=> Build All' && npm run build:dev && uglifyjs -c drop_console=true dist/simple.dev.js -o dist/simple.js && minify dist/simple.js && rm dist/simple.js && sed -i '' -- \"s/{version}/$(cat VERSION)/g\" dist/*", "build:dev": "echo '=> Build Dev' && cat src/start.inc src/app.js src/end.inc > dist/simple.dev.js", "watch": "watch 'npm run build' src/", "server": "http-server ./", diff --git a/src/app.js b/src/app.js index d0ff860..001d8ff 100644 --- a/src/app.js +++ b/src/app.js @@ -171,7 +171,8 @@ function _c(obj) { */ var app; app = function (name, cnf) { - this.version = '1.02'; + // current version from build + this.version = '{version}'; this.aName = name; // defaults name = _s(name).hashCode(); @@ -804,4 +805,4 @@ w.SimpleApp = function (name, config) { // nodejs compatible if (typeof exports != 'undefined') { exports.SimpleApp = w.SimpleApp; -} \ No newline at end of file +}