Permalink
Browse files

A number of tweaks, improvements, and fixes

- Fixed a bug that raised an error when using the drawText() method
- All jCanvas methods now respect the value of the 'visible' property
- Graph functions, drawn using drawGraph(), can now access the given
parameters object
- There is now only one supported syntax for defining function layers
(using the 'fn' property).
  • Loading branch information...
1 parent 8494e22 commit fcc3a29457efff751009d360a6571530dd200d32 @caleb531 committed Jan 19, 2013
Showing with 499 additions and 461 deletions.
  1. +14 −8 build/build.py
  2. +7 −3 jcanvas.jquery.json
  3. +434 −406 jcanvas.js
  4. +44 −44 jcanvas.min.js
View
@@ -7,15 +7,15 @@
def run_cmd(cmd):
process = subprocess.Popen(cmd.split(' '), stdout=subprocess.PIPE)
out, err = process.communicate()
- return out
+ return out.decode('utf-8')
# Compress source file
-def compress(source):
+def compress_file(source):
# Create path to minified file from source path
- minified = re.sub('(\.\w+)$', '.min\\1', source)
+ compressed = re.sub('(\.\w+)$', '.min\\1', source)
# Compress source file using Google Closure Compiler
- run_cmd('java -jar build/closure-compiler.jar --js ' + source + ' --js_output_file ' + minified + ' --compilation_level SIMPLE_OPTIMIZATIONS')
+ run_cmd('java -jar build/closure-compiler.jar --js ' + source + ' --js_output_file ' + compressed + ' --compilation_level SIMPLE_OPTIMIZATIONS')
# Update version in given source file
def replace_in_file(path, expression, version):
@@ -54,11 +54,15 @@ def main():
readme = 'README.md'
license = 'LICENSE.txt'
+ print('Updating version in source files...')
+
# Update version in source and readme files
version_re = '\d{2}\.\d{2}\.\d{2}'
replace_in_file(source, version_re, version)
replace_in_file(manifest, version_re, version)
+ print('Updating year in copyright notices...')
+
# Update year in copyright license
year_re = '\d{4}'
replace_in_file(source, year_re, year)
@@ -69,13 +73,15 @@ def main():
tags = run_cmd('git tag -l')
# Create tag for this version if it doesn't exist
- if ((version in tags) == False):
+ if (version not in tags):
run_cmd('git tag ' + version)
print('Added new tag: ' + version)
-
- # Compress jCanvas source
- compress(source)
+ print('Compressing jCanvas for production...')
+
+ # Compress jCanvas source
+ compress_file(source)
+
# Inform user when build process has finished
print('Done.')
View
@@ -1,7 +1,7 @@
{
"name": "jcanvas",
"title": "jCanvas",
- "version": "13.01.18",
+ "version": "13.01.19",
"author": {
"name": "Caleb Evans",
"email": "calebevans.me@gmail.com",
@@ -16,13 +16,16 @@
"dependencies": {
"jquery": ">=1.4"
},
- "description": "jCanvas is a jQuery plugin that makes the HTML5 canvas easy to work with.",
+ "description": "jCanvas brings the flexible power of jQuery's syntax and capability to the HTML5 canvas. Quickly create canvas-based apps that can utilize layers, animations, events, and more. jCanvas works on all modern browsers and platforms, including iOS and Android.",
"keywords": [
"jcanvas",
"jquery",
"html5",
"canvas",
- "javascript"
+ "javascript",
+ "event",
+ "animation",
+ "touch"
],
"homepage": "http://calebevans.me/projects/jcanvas/",
"docs": "http://calebevans.me/projects/jcanvas/docs.php",
@@ -36,6 +39,7 @@
},
{
"name": "Dave Smith",
+ "email": "dave.k.smith@gmail.com",
"url": "https://twitter.com/dave_k_smith"
}
]
Oops, something went wrong.

0 comments on commit fcc3a29

Please sign in to comment.