Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client Side Debugging #279

Merged
merged 17 commits into from
Oct 1, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@ parser:
SRC = lib
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should bump the package.json to 2.1.0

VERSION = ${shell cat package.json | grep version | grep -o '[0-9]\.[0-9]\.[0-9]\+'}
CORE = dist/dust-core-${VERSION}.js
CORE_DEBUG = dist/dust-core-debug-${VERSION}.js
CORE_MIN = dist/dust-core-${VERSION}.min.js
CORE_DEBUG_MIN = dist/dust-core-debug-${VERSION}.min.js
FULL = dist/dust-full-${VERSION}.js
FULL_DEBUG = dist/dust-full-debug-${VERSION}.js
FULL_MIN = dist/dust-full-${VERSION}.min.js
FULL_DEBUG_MIN = dist/dust-full-debug-${VERSION}.min.js

define HEADER
//
Expand All @@ -60,24 +64,34 @@ export HEADER
#TODO: REMOVE THE HELPERS IN THE NEXT RELEASE
dust:
@@mkdir -p dist
@@touch ${CORE}
@@echo "$$HEADER" > ${CORE}
@@cat ${SRC}/dust.js >> ${CORE}
@@touch ${CORE_DEBUG}
@@echo "$$HEADER" > ${CORE_DEBUG}
@@cat ${SRC}/dust.js >> ${CORE_DEBUG}
@@echo ${CORE_DEBUG} built

node utils/debug_strip ${CORE_DEBUG} ${CORE}
@@echo ${CORE} built

@@touch ${FULL}
@@echo "$$HEADER" > ${FULL}
@@touch ${FULL_DEBUG}
@@echo "$$HEADER" > ${FULL_DEBUG}
@@cat ${SRC}/dust.js\
${SRC}/compiler.js\
${SRC}/parser.js >> ${FULL}
${SRC}/parser.js >> ${FULL_DEBUG}
@@echo ${FULL_DEBUG} built

node utils/debug_strip ${FULL_DEBUG} ${FULL}
@@echo ${FULL} built

min: dust
@@echo minifying...
@@echo "$$HEADER" > ${CORE_MIN}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something is redundant here. you're pushing CORE into CORE_MIN below

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's ok, it's just minifying the core. What I did find is the HEADER has always been overwritten by the minifier, so I'm fixing that in the next commit.

@@echo "$$HEADER" > ${CORE_DEBUG_MIN}
@@echo "$$HEADER" > ${FULL_MIN}
@@echo "$$HEADER" > ${FULL_DEBUG_MIN}
node utils/minifier ${CORE} ${CORE_MIN}
node utils/minifier ${CORE_DEBUG} ${CORE_DEBUG_MIN}
node utils/minifier ${FULL} ${FULL_MIN}
node utils/minifier ${FULL_DEBUG} ${FULL_DEBUG_MIN}

clean:
git rm dist/*
Expand Down
Loading