1
0
Fork 0

Added license to minified files

closure/master
Mike Gerwitz 2011-05-23 18:59:50 -04:00
parent 44ea2552ba
commit 99d0f34940
4 changed files with 37 additions and 28 deletions

View File

@ -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:

View File

@ -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

View File

@ -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 <http://www.gnu.org/licenses/>.
*/
/**
* ease.js namespace

26
tools/license.tpl 100644
View File

@ -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 <http://www.gnu.org/licenses/>.
*/