Commit Graph

68 Commits

Author SHA1 Message Date
David Glasser
6b204ca73a Bump package versions for 1.0.2 2014-12-19 10:31:59 -08:00
David Glasser
73b809c122 Bump versions for 1.0.2. 2014-12-11 22:44:41 -08:00
David Glasser
6ea8443f30 Update calls to addFiles, onUse, and onTest 2014-12-09 20:18:31 -08:00
David Glasser
de5f68cf70 bump all versions (due to source-map upgrade) 2014-11-25 09:06:26 -08:00
Avital Oliver
5103fbe197 Explain strict tag closing limitation in html-tools README 2014-10-28 10:12:23 -07:00
Avital Oliver
96b43c4b63 Remove XXXs from html-tools README
If anything, we should track these somewhere else.
And especially now, given that we publish READMEs
on Atmosphere these should definitely not be here.
2014-10-28 02:53:43 -07:00
Sashko Stubailo
36da5aecb4 Make all version numbers not have rc 2014-10-13 14:09:37 -07:00
Sashko Stubailo
698fbedb10 Bump all of the version numbers to rc.0 2014-10-07 17:10:48 -07:00
Sashko Stubailo
1e53f6b598 Bump all version numbers again after cherry-picking unipackage fix 2014-10-01 17:06:57 -07:00
Sashko Stubailo
0129c3f5ac Bump all of the version numbers again, to republish with the unipackage.json fix 2014-10-01 15:43:05 -07:00
Sashko Stubailo
eecc272e4a Bump every single package version number due to a change in compilation 2014-09-29 23:44:50 -07:00
ekatek
bab557d49b incrementing package versions for a clean release 2014-09-25 18:34:34 -07:00
ekatek
220cc69e31 package versions incremented 2014-09-19 21:16:14 -07:00
Sashko Stubailo
41910019e1 Renamed Deps to Tracker in all packages 2014-08-27 20:05:22 -07:00
David Glasser
996d347139 Merge branch 'devel' into packaging
Conflicts:
	docs/client/api.html
	docs/client/concepts.html
	docs/client/introduction.html
	meteor
	packages/html-tools/package.js
	packages/spacebars-common/package.js
	packages/webapp/webapp_server.js
	tools/bundler.js
2014-07-21 16:18:25 -07:00
David Greenspan
31fc5b0887 Add textarea parse tests
Test for bugs reported by Andrew and Vincent, concerning parsing of dynamic attributes and contents of textarea.
2014-07-16 14:04:12 -07:00
David Greenspan
ab9cae6123 Fix Vincent’s textarea bug
Textarea would get same content as previous tag in a template, because the variable wasn’t cleared!

Needs test
2014-07-14 20:04:12 -07:00
David Greenspan
924f379870 Fix textarea HTML parsing
In modifying getContent, we neglected the fact that parseAttrs wraps arrays in HTML.Attrs.  Now we wrap arrays outside of parseAttrs near the code that modifies the attributes array for textarea contents.

Needs tests
2014-07-14 16:36:28 -07:00
ekatek
b9a714f028 ripping out internal, name and test from package.js files 2014-07-07 20:50:50 -07:00
David Greenspan
e0d6a2ef00 Make events and textareas work! 2014-06-30 17:49:03 -07:00
ekatek
fb709c9563 remove versions files from core packages 2014-06-16 22:11:31 -07:00
David Glasser
c5e5305a3b Merge branch 'devel' into packaging
Conflicts:
	tools/bundler.js
	tools/packages.js
2014-06-11 12:02:57 -07:00
Emily Stark
ba0770a908 Merge remote-tracking branch 'origin/devel' into blaze-refactor
Conflicts:
	packages/html-tools/tokenize.js
	packages/spacebars-compiler/package.js
	packages/spacebars-compiler/spacebars-compiler.js
	packages/spacebars-tests/template_tests.html
	packages/spacebars-tests/template_tests.js
	packages/spacebars/package.js
	packages/spacebars/spacebars-runtime.js
	packages/ui/domrange.js
	packages/ui/render_tests.js
2014-06-06 14:05:44 -07:00
Emily Stark
4b6d3b2681 Reshuffle packages to allow ui to depend on ui-dynamic-template.
Remove the spacebars-compiler -> spacebars and spacebars-compiler -> ui
dependencies. With those dependencies, ui cannot depend on
ui-dynamic-template, because ui-dynamic-template depends on templating,
whose build plugin depends on spacebars-compiler, who depends on
spacebars who depends on ui.

spacebars-compiler doesn't actually need to depend on ui or spacebars;
it only needs to depend on spacebars to add things to the `Spacebars`
namespace, which this commit does by factoring out the Spacebars export
into a separate `spacebars-common` package.
2014-05-28 14:37:12 -07:00
Matthew Arbesfeld
f90e09fbe5 Fix for #2175 - Spacebars block comment cause unexpected errors
This fixes an edge case where a comment is followed immediately
by an {{else}} token.
2014-05-27 03:36:50 -04:00
ekatek
beb0e59b9d new version files from teh new solver? Also, package.js correct with tests 2014-05-09 17:36:25 -07:00
ekatek
031890d2c5 don't store buildtime deps in the catalog 2014-05-04 16:56:58 -07:00
ekatek
23ad149a78 better versions files 2014-04-25 15:06:45 -07:00
ekatek
10d2047d12 clean up 2014-04-25 15:01:20 -07:00
ekatek
c84c8d6097 alphabetize package version lock files 2014-04-24 18:18:21 -07:00
David Glasser
3d3bdd4f50 versions.json update (these should be sorted!) 2014-04-24 17:02:46 -07:00
David Glasser
fbde0a00a7 Merge branch 'publish-packages' into library-refactor
Conflicts:
	packages/domutils/package.js
	packages/handlebars/package.js
	packages/htmljs/package.js
	packages/liverange/package.js
	packages/spark/package.js
	packages/universal-events/package.js
	tools/bundler.js
	tools/help.txt
	tools/packages.js
	tools/run-app.js
	tools/run-mongo.js
	tools/skel/.meteor/packages
2014-04-24 17:01:36 -07:00
David Greenspan
a2552be8f8 HTMLTools: Kill "Special" as a TemplateTag wrapper
Remove the concept of a "Special" as a generalization of template tags in HTML parsing and the HTMLjs tree.  Just call something that's parsed by hooking the HTML parser a TemplateTag.  Don't wrap the return value of getSpecialTag (now getTemplateTag), just require that it be an instanceof HTMLTools.TemplateTag.

Spacebars.TemplateTag is now a subclass of HTMLTools.TemplateTag.  Both support `.toJS()`.  The same object returned by getTemplateTag is now inserted into the HTMLjs -- that is, the Spacebars compiler creates an HTMLTools.TemplateTag instead of it being created as a wrapper inside HTMLTools.  All usages of the words "special" or "special tag" are replaced with "template tag."
2014-04-24 10:18:02 -07:00
David Greenspan
54ce3ce4b3 Combine getQuoted- and getUnquotedAttributeValue 2014-04-24 08:46:31 -07:00
David Greenspan
1e7b91feaa Fix some tests 2014-04-22 15:55:56 -07:00
David Greenspan
43d672bd6a Use refactored html.js in "old" ui-package Blaze
Some failing tests, which are hopefully mostly just tests of the modified code that need to be ported.

The main work was replacing the use of pseudo-attributes $special and $dynamic with the new HTML.Attrs(...) / array representation.  Some functions were also rewritten to use Visitors (`toJS`, old `toHTML`/`toText`/`evaluateAttributes`, `replaceSpecials` in the compiler, but not `optimize` yet or `materialize`).

Create the "blaze-tools" package to hold toJS and other functions that are useful for template parsers/compilers that need to read or generate JS.
2014-04-22 13:47:57 -07:00
David Greenspan
6454067e66 Make Blaze packages internal 2014-04-02 09:56:33 -07:00
David Greenspan
1fcb33e61b parse.js: Add more comments 2014-03-22 09:57:46 -07:00
Avital Oliver
9ef97fc297 Better parsing for {{! }} comments
We now no longer check whether we're at a closing
HTML tag by peeking for "</" since that would fail
if there were a {{! }} comment directly before it.

Instead, we tokenize and then rewind. Presumably
this does have an effect on compilation time but it's
probably fine. An alternative would have been to
explicitly parse {{! }} comments rather than implicitly
skipping them before generally parsing tokens.
2014-03-21 22:08:02 -07:00
David Greenspan
cf4d9ad175 Let tags containing ':' self-close
They won't be rendered to HTML as self-closing, but that should be ok.

This is so that weird XML tags in SVG can be parsed.
2014-03-06 16:51:26 -08:00
David Greenspan
57f11cb961 Use HTMLTools namespace for all of html-tools 2014-03-03 15:51:35 -08:00
David Greenspan
5e85c32ea6 Move asciiLowerCase to html-tools 2014-03-03 15:51:35 -08:00
David Greenspan
f6c766ae06 Start html.js refactor; case-fold at compile time
- Start shrinking html.js down to the 150-line file it can be
- Move "proper case" logic to the template compiler; the tagName of an HTMLjs tag is now in proper case.  This is both for better performance and reduced size and complexity of runtime code (i.e. blaze.js).
- Start moving html-tools to the HTMLTools namespace
2014-03-03 15:51:35 -08:00
David Greenspan
5038c63d08 Merge shark, including shark-isolate-helpers work 2014-01-27 15:21:23 -08:00
David Greenspan
599ac16632 Treat null/undefined/false attributes as absent
So, in HTML, the following are equivalent, and both mean that a checkbox is checked, because the `checked` attribute is present:

- `<input type="checkbox" checked>`
- `<input type="checkbox" checked="">`

We can't mess with that.  On the other hand, in Spacebars before this commit, the following would *also* result in the checkbox being checked, regardless of whether `foo` evaluates to null, undefined, false, or the empty string:

- `<input type="checkbox" checked={{foo}}>`
- `<input type="checkbox" checked="{{foo}}">`

With this commit, the checkbox will NOT be checked if `foo` evaluates to null, undefined, or false.

To achieve this:

- In HTMLjs, an attribute is considered absent if its value is "nully" after being fully evaluated (i.e. after expanding functions and components via HTML.evaluateDynamicAttributes / HTML.evaluate).  A nully value is one consisting of null, undefined, an empty array, or an array of those things.  `false` is not nully and renders as "false".  An empty string is not nully, and will "prop open" an attribute that would otherwise collapse into absence.

- Spacebars.mustache converts null, undefined, and false to null.  So if you use {{foo}} anywhere in a template and foo evaluates to "false", that gets to converted to a null in HTMLjs (which is ignored).  (true is rendered as "true".)

- When parsing HTML, an attribute that consists of *no tokens* becomes an empty string in the HTMLjs, which props open the attribute (unlike null or an empty array).  (Since comment tokens are stripped during tokenization, if there are only comments in an attribute value that counts as no tokens.)
2014-01-27 14:44:19 -08:00
David Greenspan
43cb4f8cc8 Rename tests in html-tools package to html-tools 2014-01-27 14:44:19 -08:00
David Greenspan
635b2c3910 Merge branch 'shark' into shark-newargs 2014-01-25 19:43:28 -08:00
David Greenspan
0e0d8f218c Better error message for <circle r={{r}}/>
Now we tell you to put a space before the slash.  HTML allows slash as part of a bare attribute value.
2014-01-25 19:41:21 -08:00
David Greenspan
b9378d02b7 remove duplicate test 2014-01-25 17:52:37 -08:00
David Greenspan
7be0250867 Fix CRLF handling in HTML tokenizer
We would choke on CR line endings, because we didn't implement the preprocessing step of converting CR(LF)? to LF.  Now we correctly convert (or ignore) CR inside tags, in text nodes, in attributes, and in comments.
2014-01-20 19:19:07 -08:00