diff --git a/assets/js/core.ls b/assets/js/core.ls index 4f1cd8c..8877585 100644 --- a/assets/js/core.ls +++ b/assets/js/core.ls @@ -122,6 +122,7 @@ dyn-css = (window-di, document-di, jq-di) -> else window-di.dynCss.el.removeClass(cc) else + console.log "Assigning #{sct}.#{a.property} <= #{a.funct()}" if debug css[a.property] = a.funct() window-di.dynCss.el.css(css) diff --git a/complete-deploy b/complete-deploy index b766c2d..6a4c6ab 100755 --- a/complete-deploy +++ b/complete-deploy @@ -1,6 +1,27 @@ #!/usr/bin/env sh set -e + +function build_package { + phase "Building the library" + cult build-clean + cult default + rm -rf lib + mkdir -p lib + + phase "Copying the library" + run 'cp dist/js/client.js lib/dyncss.js' + + phase "Testing the library" + run "cd assets/js && make" +} + +function add_package_to_repo { + run "cd $dstdir" + phase "Adding the library to the repo" + run "git add lib/dyncss.js" +} + usage=" Usage: complete-deploy @@ -117,22 +138,9 @@ print_important_message "This will commit both the site and a new version of the print_important_message "Make sure you've committed all changes to master" ask_for_key -phase "Building the library" -cult build-clean -cult default -rm -rf lib -mkdir -p lib - -phase "Copying the library" -run 'cp dist/js/client.js lib/dyncss.js' - -phase "Testing the library" -run "cd assets/js && make" +build_package -run "cd $dstdir" -phase "Adding the library to the repo" -run "git status" -run "git add lib/dyncss.js" +add_package_to_repo phase "Updating bower package" name=$(node -p "require('$dstdir/bower.json').name" 2>/dev/null) || diff --git a/lib/dyncss.js b/lib/dyncss.js index 85e053f..514b5f8 100644 --- a/lib/dyncss.js +++ b/lib/dyncss.js @@ -134,6 +134,9 @@ windowDi.dynCss.el.removeClass(cc); } } else { + if (debug) { + console.log("Assigning " + sct + "." + a.property + " <= " + a.funct()); + } css[a.property] = a.funct(); } }