<script> and {%script} processing changes #5

Closed
wants to merge 16 commits into
from

Projects

None yet

5 participants

@romanrudenko

Changes:
minify {%script}{/script} contents only in production mode (that is, when client is invoked with -m or builds a bundle to production).
Remove leading <!-- and <![CDATA for the purpose of minification. This ensures that copy/pasted scripts with those HTML comments will be minified properly.
Make script pragma minification forgiving. If minification fails, emit original code and code snippet that emits error to browser console.
Recognize and disable normal Dust whitespace suppression inside.

Roman Rudenko added some commits Jun 8, 2012
Roman Rudenko <script> and {%script} processing changes 4bd3cd5
Roman Rudenko Separate minify (-m) and production stripping (-s) flags. That way, 1…
….2 changes involving removal of logging from production builds would be easier to test and debug.
f52714b
@rrjamie

Is stuff between

@romanrudenko

No. imposes whitespace preservation and no further processing. {%script}{/script} is minified if -m parameter is passed, and not minified otherwise.

@rrjamie

Can we get a test up in here?

Roman Rudenko added some commits Sep 25, 2012
Roman Rudenko Add new require-based builder 107df0b
Roman Rudenko Add customizable exclusion of logging modules 396296e
Roman Rudenko Client updates to play nicely with almond alterations. 70f2d00
Roman Rudenko New window.stop() reliant tag 5c7241b
Roman Rudenko Merge branch 'master' of github.com:mobify/mobify-client into improve…
…-script-tags

Conflicts:
	lib/compile.js
	package.json
	src/build.coffee
	src/mobify.coffee
	vendor/tags/7/bootstrap.html
3c524b4
Roman Rudenko Fix stupid merge errors. Now, once again, we have a variant of compil…
…er that can understand and process requireJS dependencies and bundle them with almond.
5d5e0a0
Roman Rudenko Make execution of compiled mobify.js synchronous, allowing it to corr…
…ectly respond to Mobify.api loading check
fba5fed
Roman Rudenko Stop from gobbling up and processing unrelated JS files. Sniffing yay! 4888293
Roman Rudenko tag upgrade: add guess function d3e33e0
Roman Rudenko Be explicit in sync/async separation 29104f9
Roman Rudenko Stop tripping on {<scripts} ac19640
@tedtate

@romanrudenko @rrjamie are we just missing tests before this can be merged in? Seems like it would be a useful update.

@jansepar
Mobify Research & Development Inc. member

@tedtate yep, pretty much. This is a pretty big change, so tests are essential here.

Roman Rudenko added some commits Mar 26, 2013
Roman Rudenko Merge branch 'master' of github.com:mobify/mobify-client into improve…
…-script-tags

Conflicts:
	vendor/tags/7/bootstrap.html
cb260da
Roman Rudenko Update mobifyjs API subversion de571b0
Roman Rudenko Added test 512fea2
@romanrudenko

Now with 100% more tests.

@jansepar
Mobify Research & Development Inc. member

@romanrudenko thanks for the tests! This is a great change to get merged in, but it doesn't look like anyone noticed the added tests. Usually the rule we have for pull requests is that the person who wants to get some code merged in should harass someone until it gets done :) Please do that next week and we can get this sucker merged!

@ericmuyser
Mobify Research & Development Inc. member

Cool to close this @jansepar ?

@jansepar
Mobify Research & Development Inc. member

Haha, oh man, this is still open? Yes I think it's safe to close :) Thanks for going through all of this old PRs btw!!

@jansepar jansepar closed this Jun 12, 2015
@rrjamie
@tedtate

Get me off this wild ride!

@jansepar
Mobify Research & Development Inc. member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment