Skip to content
Browse files

Update Makefile

  • Loading branch information...
1 parent e6c2270 commit 227ba8686e26360a0d78eded0c3d3017c1b39b69 @pyrsmk committed
Showing with 7 additions and 9 deletions.
  1. +7 −8 Makefile
  2. +0 −1 W-0.1.5.min.js
View
15 Makefile
@@ -1,16 +1,15 @@
-OLD = ls -l | grep .js | sed -r 's/.+\s(\S+)/\1/'
-NAME = ls src | sed -r 's/ender\.js|package\.json|\s+//' | sed -nr 's/(.+)\.js/\1/p'
-VERSION = grep -m 1 Version src/\`${NAME}\`.js | sed -r 's/.*:\s*(.+)/\1/'
+NAME = W
+VERSION = grep -m 1 Version src/${NAME}.js | cut -c19-
all: lint minify
lint:
- @jshint src/`${NAME}`.js --config config/jshint.json
+ jshint src/${NAME}.js --config config/jshint.json
minify:
- @rm -f `${OLD}`
- @uglifyjs -nc src/`${NAME}`.js > `${NAME}`-`${VERSION}`.min.js
+ rm -f ${NAME}*
+ uglifyjs -nc src/${NAME}.js > ${NAME}-`${VERSION}`.min.js
instdeps:
- @npm install jshint -g
- @npm install uglify-js -g
+ npm install jshint -g
+ npm install uglify-js -g
View
1 W-0.1.5.min.js
@@ -1 +0,0 @@
-this.W=function(){var a=window,b=document,c=b.documentElement,d,e,f="style",g="createElement",h="appendChild",i="offsetHeight",j="offsetWidth",k=[];return function(l){var m=typeof l,n,o,p;if(m=="function"){(o=a.addEventListener)?o("resize",l,!1):a.attachEvent("onresize",l),k.length||(d=b[g]("span"),d[f].position="absolute",d[f].top="-99em",d.innerHTML="W",c[h](d),e=d[i],setInterval(function(a,b){if(e!=(b=d[i])){a=k.length;while(a)k[--a]()}e=b},250)),k.push(l);return}return o=b[g]("div"),o[f].width="1em",c[h](o),n=o[j],n=n?n:16,c.removeChild(o),m=="number"?l/n:(o=c[j],(p=a.innerWidth)||(p=c.clientWidth),o=(p-o)*100/p<5?p:o,l?o/n:o)}}();

0 comments on commit 227ba86

Please sign in to comment.
Something went wrong with that request. Please try again.