Skip to content

Commit

Permalink
Added debug
Browse files Browse the repository at this point in the history
  • Loading branch information
vzaccaria committed May 12, 2014
1 parent 7f48df7 commit a81b1a7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 15 deletions.
1 change: 1 addition & 0 deletions assets/js/core.ls
Expand Up @@ -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)
Expand Down
38 changes: 23 additions & 15 deletions 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
Expand Down Expand Up @@ -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) ||
Expand Down
3 changes: 3 additions & 0 deletions lib/dyncss.js
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit a81b1a7

Please sign in to comment.