Commit Graph

165 Commits

Author SHA1 Message Date
David Glasser
bc6239dfc1 vbump for rc9
Hopefully we won't have to do "bump for all the npm modules" again after
this
2014-08-15 12:34:47 -07:00
David Glasser
a9db15a9e6 vbump for 0.9.0-rc8 2014-08-14 12:02:08 -07:00
Matthew Arbesfeld
8bcbd65344 Separate "browser" target into web.browser/cordova
Cordova projects often have a different set of files than web targets,
so we would like to be able to target different client architectures in
our bundles. Ideally, we allow the user to use arbitrary client
architectures - but this patch is a step in the right direction by
abstracting out more of the hard coded "browser"/"os" lines.

We accomplish this separation in a backwards compatible way by allowing
api.___ commands to target a "client" architecture. For example,
api.addFiles('a.js', 'client') adds 'a.js' to both the 'client.browser'
and 'client.cordova' targets.

Effects on 0.9 packaging stuff: packages don't have to change, but the
"data.json" file in ".meteor0" has "browser" in some places. We think we
have to fix the troposphere code where this data.json is created.

Some plugins will also be backwards-incompatible with this change, since
many have a "clientArch.matches("browser")" line in the plugin
code. Ideally, we fix plugins so that this stops being an issue, but for
now package authors can just patch that line.

At the compiled (unipackage) level the new names are 'web.browser' and
'web.cordova', replacing 'browser'. In package.js, the new names are
'client.browser' and 'client.cordova', serving as an adjunct to 'client'.
2014-07-31 14:12:15 -07:00
David Glasser
e82be799be Further cleanup from devel->packaging merge
- Update package.js for new packages from devel
- Typo fix
2014-07-21 16:23:47 -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
Matthew Arbesfeld
f230eba62b Client CSS and template injection. 2014-07-09 10:31:44 -07:00
ekatek
b9a714f028 ripping out internal, name and test from package.js files 2014-07-07 20:50:50 -07:00
David Greenspan
dfbbde4aa7 Merge branch 'devel' into blaze-refactor
Conflicts:
	packages/webapp/webapp_server.js
2014-07-01 13:29:04 -07:00
David Greenspan
ab4bb8f993 Get rid of 3s/OLDSTYLE, start to exclude old code 2014-06-30 15:45:12 -07:00
David Greenspan
9dd5fac49c webapp_server works
This confirms that we can convert complicated templates (including #if, #each, and dynamic attributes) into HTML using Views.

Template#__lookup was moved to View#lookup, since webapp_server is an example of a case where we have lookup but no template!

Next steps: get rid of the “3” after some names, the OLDSTYLE flag, and dead code in the blaze package.  Then make Template features like events, `helper`, etc. work.
2014-06-30 15:36:33 -07:00
David Greenspan
c01a9df8de Introduce OLDSTYLE flag to not break webapp
Making webapp_server work requires #if and #each that work with toHTML.  Don’t want to have to write that code just to be able to run client code again.
2014-06-26 15:54:40 -07:00
Emily Stark
168f21654c Rename serveStaticFiles to staticFilesMiddleware 2014-06-26 15:15:24 -07:00
David Greenspan
d7ef9efe12 Support HTMLification
Breaks webapp_server pretty hard
2014-06-26 15:14:08 -07:00
Emily Stark
53936d3062 Wrap webapp test code in _noYieldsAllowed. 2014-06-26 15:08:41 -07:00
Emily Stark
afff81ffc5 New approach for reload safety belt testing.
Mutating global state in tests is still not a good idea. (Specifically,
in the previous version of the test, changing the value of
`WebAppInternals.inlineScriptsAllowed()` could mess with other
client-side tests that depend on it being one way or another -- of which
there are currently probably none, but there could be in theory.)

Instead, export the exact things we want to test (boilerplate HTML
generation and the static file handler). Now we are still mutating the
global `inlineScriptsAllowed()` state, but we don't yield before setting
it back to what it was.

Also simplify the reload-safetybelt test: instead of sending an HTTP
request, just check that the script gets adding to
`WebAppInternals.additionalStaticJs`.
2014-06-26 15:08:41 -07:00
Emily Stark
68b4c18627 Make more generic additionalStaticJs interface in webapp.
Now webapp doesn't need to know anything about the reload safetybelt; it
just exposes a generic interface that any package can use to include
additional static JS (inlined when possible) in the boilerplate
HTML. reload-safetybelt uses this interface, instead of webapp
weak-depending on reload-safetybelt.
2014-06-26 15:08:41 -07:00
Emily Stark
1c90d0410c galaxy-reload-safetybelt -> reload-safetybelt 2014-06-26 15:08:41 -07:00
Emily Stark
b76f3e67c8 Move reload safety belt into an opt-in package 2014-06-26 15:08:41 -07:00
ekatek
fb709c9563 remove versions files from core packages 2014-06-16 22:11:31 -07:00
David Greenspan
63b608a6a2 Port tests that were using old toHTML/materialize
Some tests were actually passing because they used old code!  Not anymore.

Create Blaze.toHTML(func) and Blaze.toText(func), like Blaze.render.  Generally you should always build the HTMLjs from inside the func — and our tests should always be wrapping test content in a function literal, not passing around unrendered HTMLjs trees — but if you’re just using tags and Isolate, it doesn’t matter.
2014-06-09 19:56:28 -07:00
David Greenspan
3df4e95845 Merge branch 'devel' into blaze-refactor
Conflicts:
	packages/spacebars-tests/template_tests.js
	packages/ui/domrange.js
2014-05-27 13:38:59 -07:00
David Glasser
e4000c6808 Merge branch 'devel' into packaging
Conflicts (around utils.quotemeta):
	tools/packages.js
	tools/utils.js
2014-05-12 17:06:11 -07:00
ekatek
beb0e59b9d new version files from teh new solver? Also, package.js correct with tests 2014-05-09 17:36:25 -07:00
Emily Stark
c044786e2f nim, glasser comments 2014-05-08 12:12:45 -07:00
Emily Stark
4afa54ca5a Set Content-Type header on js and css resources. 2014-05-08 12:12:45 -07:00
David Glasser
50b7f12922 Fix 0.8.1 regression in ROOT_URL with path
Fixes #2109.
2014-05-07 17:46:08 -07:00
David Glasser
08cf1e0974 shrinkwrap update from 314c8a1
Apparently not passing --force to npm install also allows us to do a
better job of not bundling duplicate npm packages.
2014-05-07 17:31:29 -07:00
David Greenspan
bc4339c1dc Replace old codegen with codegen2 2014-05-06 14:30:48 -07:00
David Greenspan
e5768a3c71 Port webapp_server 2014-05-06 14:21:19 -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 Glasser
3b21c2d9a7 Merge branch 'devel' into publish-packages
Conflicts:
	packages/domutils/package.js
	packages/handlebars/package.js
	packages/htmljs/package.js
	packages/liverange/package.js
	packages/madewith/package.js
	packages/meteor-developer/meteor_developer_server.js
	packages/preserve-inputs/package.js
	packages/spark/package.js
	packages/universal-events/package.js
	tools/commands.js
	tools/files.js
	tools/help.txt
	tools/packages.js
2014-04-24 16:27:21 -07:00
David Greenspan
fc64081c52 Move Spacebars compiler to SpacebarsCompiler
The pattern of one package defining Spacebars and another augmenting it with methods like Spacebars.parse is too confusing.

The symbols `parse`, `compile`, `TemplateTag` are now on `SpacebarsCompiler`.  You can now access `SpacebarsCompiler.optimize`, and we can start exposing more symbols.
2014-04-24 13:23:01 -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
ekatek
9f543d4d03 versions files for packages 2014-04-21 18:16:31 -07:00
David Glasser
c5f288be38 Fixes to app.html-in-webapp
- Depend on ui in webapp because we use UI.component

- Use eval rather than new Function because we *do* need the local
  environment (to get HTML, UI, etc)

- Log errors from running the template

These issues were not visible in normal apps because normal apps use
'ui' (implied by standard-app-packages) which makes UI a *global*. Ditto
for 'htmljs' (implied by ui) and the HTML symbol.
2014-03-27 17:22:18 -07:00
David Glasser
b2632d45c5 Move boilerplate HTML from tools to webapp
This breaks a strong dependency between the webapp package and the
bundler.  Now we can change the standard page format, add more hooks,
etc without changing the tools (and hot code push works properly).

This is an incompatible change to the definition of the
browser-program-pre1 format: it no longer contains a "page" field
pointing to a boilerplate defined using ad hoc ##FOO##
substitution. Instead, the manifest can contain "head" and "body"
entries for data added with compileStep.appendDocument().  (Note that in
Blaze, <body> in a template file no longer calls appendDocument.)

WebApp.addHtmlAttributeHook callbacks now return attribute objects (like
those that Spacebars supports) rather than strings.
2014-03-24 20:10:39 -07:00
Geoff Schmidt
4d114ef617 Set some (not all, yet) packages to version 1.0.0 2014-03-07 01:33:37 -08:00
Emily Stark
9aa4e53984 Run compress connect handler before raw connect handlers. 2014-02-20 11:47:53 -08:00
Emily Stark
36b7cd776d Add WebApp.rawConnectHandlers that run before other meteor handlers 2014-02-20 11:04:53 -08:00
Emily Stark
e4c02a5e3a Revert "Run user-supplied connect handlers earlier. They see the path before the prefix has been stripped and they take precedence over static assets."
This reverts commit c3c86a1b30.
2014-02-20 10:49:20 -08:00
David Glasser
153d84cb9f Drop optimist from the dev bundle
The tool no longer uses it.  Simplify webapp_server to do a dumb check
for a flag instead of using optimist.

ctl-helper still uses optimist; ideally it should use our parser from
main.js instead.

Also, remove a debugging "|| true" that was causing "LISTENING" to be
output even without --keepalive.

I am not actually planning to rebuild the dev bundle just to drop
optimist.
2014-02-07 18:26:29 -08:00
Naomi Seyfer
d91110bd9c Merge branch 'devel' into sso
Conflicts:
	packages/livedata/livedata_server.js
2014-02-04 14:04:30 -08:00
Andrew Wilcox
09029be917 Update client info API to just have connection.clientAddress and connection.httpHeaders.
Fix documentation.

Expose webapp's `identifyBrowser`, even though we aren't currently
using outside of webapp.
2014-02-04 01:08:36 -08:00
Andrew Wilcox
ca7a6929d7 Make information about the client available in the connection object. 2014-02-04 01:08:36 -08:00
Emily Stark
dd6d6a702b Fix eternal reload on pages with no stylesheets.
This fixes test-in-console, which was never completing test runs because
the page would reload constantly (or something).
2014-02-02 15:31:58 -08:00