diff --git a/Makefile b/Makefile
index 6ba3f70..748fb63 100644
--- a/Makefile
+++ b/Makefile
@@ -131,7 +131,8 @@ doc-html: $(PATH_DOC_OUTPUT_HTML)/index.html $(PATH_DOC_OUTPUT_HTML1)
min: build/ease.min.js build/ease-full.min.js
build/%.min.js: build/%.js
- node $(PATH_TOOLS)/minify.js < $< > $@
+ cat $(PATH_TOOLS)/license.tpl > $@
+ node $(PATH_TOOLS)/minify.js < $< >> $@
# clean up build dir
clean:
diff --git a/tools/combine b/tools/combine
index 011b494..e968e5b 100755
--- a/tools/combine
+++ b/tools/combine
@@ -23,6 +23,7 @@ PATH_LIB="$PATH_TOOLS/../lib"
PATH_TEST="$PATH_TOOLS/../test"
MODULE_EXT='js'
TPL_PATH="$PATH_TOOLS/combine.tpl"
+TPL_LICENSE_PATH="$PATH_TOOLS/license.tpl"
TPL_TEST_PATH="$PATH_TOOLS/combine-test.tpl"
TPL_VAR='/**{CONTENT}**/'
RMTRAIL="$PATH_TOOLS/rmtrail"
@@ -36,6 +37,9 @@ CAT_MODULES="$CAT_MODULES class class_final class_abstract interface"
##
tpl_header()
{
+ # prepend license
+ cat "$TPL_LICENSE_PATH"
+
# cut out the top of the template (before the content location)
cat "$TPL_PATH" \
| awk "{
@@ -64,11 +68,15 @@ tpl_footer()
}"
}
-# ensure we can locate our template (should be in the /tools dir)
+# ensure we can locate our templates (should be in the /tools dir)
if [ ! -f "$TPL_PATH" ]; then
echo "Error: combine.tpl not found ($TPL_PATH)"
exit 1
fi
+if [ ! -f "$TPL_PATH" ]; then
+ echo "Error: license.tpl not found ($TPL_PATH)"
+ exit 1
+fi
# output combined file header
diff --git a/tools/combine.tpl b/tools/combine.tpl
index eccaeeb..a66c05e 100644
--- a/tools/combine.tpl
+++ b/tools/combine.tpl
@@ -1,29 +1,3 @@
-/**
- * @preserve Combined redistributable ease.js file
- *
- * This file contains all ease.js modules in a single file for easy distribution
- * in a browser environment. For the original source code, please visit:
- *
- * https://github.com/mikegerwitz/easejs
- *
- *
- * Copyright (C) 2010 Mike Gerwitz
- *
- * This file is part of ease.js.
- *
- * ease.js is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see .
- */
/**
* ease.js namespace
diff --git a/tools/license.tpl b/tools/license.tpl
new file mode 100644
index 0000000..d0609de
--- /dev/null
+++ b/tools/license.tpl
@@ -0,0 +1,26 @@
+/**
+ * Combined redistributable ease.js file
+ *
+ * This file contains all ease.js modules in a single file for easy distribution
+ * in a browser environment. For the original source code, please visit:
+ *
+ * https://github.com/mikegerwitz/easejs
+ *
+ *
+ * Copyright (C) 2010 Mike Gerwitz
+ *
+ * This file is part of ease.js.
+ *
+ * ease.js is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free
+ * Software Foundation, either version 3 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see .
+ */