Permalink
Browse files

Initial version

  • Loading branch information...
0 parents commit ac0ec97af956a7208abb968b2fd4a0977508baf2 @pvdspek committed May 7, 2011
Showing with 493 additions and 0 deletions.
  1. +19 −0 MIT-LICENSE.txt
  2. +47 −0 Makefile
  3. +426 −0 src/jquery.autoellipsis.js
  4. +1 −0 version.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2011 Peter van der Spek
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
@@ -0,0 +1,47 @@
+PROJECT = jquery.autoellipsis
+
+SOURCEDIR = src
+DISTDIR = dist
+
+UGLIFY ?= `which uglifyjs`
+
+BASEFILES = ${SOURCEDIR}/${PROJECT}.js
+
+VERSION = ${shell cat version.txt}
+
+DISTFILE = ${DISTDIR}/${PROJECT}-${VERSION}.js
+DISTMINFILE = ${DISTDIR}/${PROJECT}-${VERSION}.min.js
+
+all: build minify jsdoc
+
+clean:
+ @@rm -rf ${DISTDIR}
+
+build: ${DISTFILE}
+
+minify: build ${DISTMINFILE}
+
+jsdoc: ${DISTJSDOC}
+
+${DISTDIR}:
+ @@mkdir -p ${DISTDIR}
+
+${DISTFILE}: ${BASEFILES} | ${DISTDIR}
+ @@echo "Building" ${DISTFILE};
+
+ @@cat ${BASEFILES} \
+ > ${DISTFILE};
+
+${DISTMINFILE}: uglifyavailable ${DISTFILE}
+ @@echo "Minifying" ${DISTMINFILE};
+
+ @@ ${UGLIFY} ${DISTFILE} > ${DISTMINFILE};
+
+uglifyavailable:
+ @@if test -z ${UGLIFY}; then \
+ echo "You must have UglifyJS installed"; \
+ echo " install with:"; \
+ echo " npm install uglify-js"; \
+ exit 1; \
+ fi
+
Oops, something went wrong.

0 comments on commit ac0ec97

Please sign in to comment.