Commit Graph

414 Commits

Author SHA1 Message Date
David Greenspan
21ed1bdbe0 Merge branch 'linker' into shark 2013-07-01 18:54:51 -07:00
David Glasser
50392a5a17 Bare is only allowed on the client. 2013-07-01 13:01:34 -07:00
David Glasser
9293e7164a Implement bare in linker. 2013-06-28 16:32:36 -07:00
David Glasser
b8bb929e79 No-op refactor to internal linker interface. 2013-06-28 16:32:36 -07:00
David Glasser
2b2e60bbad Pass bare through to the linker. 2013-06-28 16:32:36 -07:00
David Glasser
ec34962e6f rename raw -> bare at Avi's suggestion
This matches what CoffeeScript calls the same thing.

For compatibility we'll make raw work too, for now.
2013-06-28 16:32:36 -07:00
David Glasser
698de75b12 Checkpoint: generate raw option 2013-06-28 16:32:36 -07:00
David Glasser
1f2a770117 Display stdout and stderr in a test that had been failing (but mysteriously stopped failing) 2013-06-28 16:32:27 -07:00
Avital Oliver
56359db24d Fix 'meteor logs' against an ssh tunnel 2013-06-28 16:03:09 -07:00
Avital Oliver
86669dc44c 'meteor logs' now works on localhost w/o ssh tunnel 2013-06-27 11:44:02 -07:00
Naomi Seyfer
09e468ebc5 Allow you to use GALAXY=localhost:9414 for interacting w/ a galaxy w/o an ssh tunnel 2013-06-27 10:11:57 -07:00
David Glasser
7e4f720e8e Implement weak dependencies.
A normal dependency of X on Y consists of a "must-use" constraint ("if X is
loaded, Y must be loaded too") and an "ordering" constraint ("if X and Y are
both loaded, Y must be loaded before X").

The previously-existing support for "unordered" dependencies allows you to
create a dependency with "must-use" but not "ordering".  This commit adds "weak"
dependencies, which have "ordering" but not "must-use".

As an example, the accounts-base package wants to define some Handlebars helpers
like {{currentUser}} if the handlebars package is being used, but it's fine to
use accounts-base without handlebars. So it should declare a weak dependency on
handlebars.

A package can tell if another package has already been loaded by checking to see
if `Packages.foo` exists. (So as a result, even slices which export no variables
get a `Packages.foo = {}` line.) Weak dependencies do not import symbols into
your namespace; you must access their symbols through
`Packages.foo.someExportedSymbol`. You don't get to use plugins from your weak
dependency.
2013-06-26 12:34:42 -07:00
David Glasser
e33694874d Test slices now never contain exports.
@export is now an error in test slices.

This is preparation for ensuring that any slice with exports has at least
"Package.foo = {}"; without this commit, both the use and test slice would (with
that change) try to overwrite Package.foo.

Remove the attempt to allow @export in 'use strict' CoffeeScript files:
ECMAScript 'use strict' is fundamentally incompatible with our implementation of
exports, and it was probably a bug that this used to work at all.
2013-06-26 12:26:12 -07:00
David Glasser
11c8fcd341 "meteor rebuild-all" should exit 1 on error 2013-06-26 12:26:11 -07:00
David Glasser
d82bb3a8c1 Remove old "weak" name for unordered dependencies. 2013-06-26 10:43:24 -07:00
David Greenspan
1e854ebb31 Merge branch 'linker' into shark 2013-06-25 15:18:42 -07:00
David Glasser
f04df9262e * tools/packages.js: change an array to an object, since that's how it's used. 2013-06-25 09:55:23 -07:00
Emily Stark
210f5f8539 Don't exit logs command when we want to keep tunnel open 2013-06-20 11:41:50 -07:00
David Glasser
974bc116be Refactor coffeescript export support: move CS-specific parsing
into CS package.
2013-06-20 11:06:33 -07:00
David Glasser
18ce0c63e9 coffeescript munging: If the line contains an assignment, assume it contains no
declarations instead of possibly munging inside some function.
2013-06-20 08:50:35 -07:00
David Glasser
d40ff521ef Support @export in CoffeeScript.
You must declare your @exports using single-line ### comments:

   ### @export x ###
   x = 5

This involves some ugly and not 100% correct low-level source hackery, making
some assumptions about the format that CoffeeScript generates.
2013-06-19 23:14:58 -07:00
David Glasser
a38f19ad05 Parse @export/etc lines in /*comments*/ too. 2013-06-19 12:33:01 -07:00
Emily Stark
e66ad0a182 Avoid making Asset calls before Meteor is loaded, might need to revisit 2013-06-19 12:22:39 -07:00
Emily Stark
7a0c3b7ad8 Include files with no extension handlers as server assets.
Also some miscellaneous test cleanup.
2013-06-18 17:58:06 -07:00
Emily Stark
a97138f04f Don't allow .. in Assets inputs 2013-06-18 17:13:06 -07:00
Emily Stark
3ca046729a Make Assets API usable from unipackage; use it for dev-bundle-fetcher.
This involves saving the source directory (not just the bundle location) for
static assets so that they can be loaded when unipackages are run.
2013-06-18 13:55:28 -07:00
David Glasser
ed6adc370a When removing the last NPM dependency, delete the NPM directory too.
Apply this to the current tree, which deletes the unused .npm directory from the
ctl package.

Specifically, this deletes the ".npm/package" or ".npm/plugin/foo" directory. We
don't attempt to also clean up the ".npm/plugin" or ".npm" directory, but a "git
clean -df" will do the trick if you really care.
2013-06-17 23:37:08 -07:00
David Glasser
7dcb53c4bd Merge branch 'devel' into linker 2013-06-17 18:19:39 -07:00
David Glasser
2e9aecdf84 Fix 'meteor test-packages --production onepackage'.
We were looking at "argv._" to find package names, where that was the argv that
was parsed at the top level, where we had no idea that "--production" was a
boolean, so it was pased as "--production=onepackage" and "onepackage" was not
included in argv._.
2013-06-17 18:02:38 -07:00
David Greenspan
dc75e8877b use spacebars for templating in build 2013-06-17 17:18:38 -07:00
Naomi Seyfer
a8910ffbf1 add port specification option to ssh tunnel url 2013-06-17 15:25:18 -07:00
Emily Stark
790deed8b4 Clean up mongo command 2013-06-14 17:01:47 -07:00
Emily Stark
df9ceed07e Change temp to temporary in meteor mongo 2013-06-14 16:30:47 -07:00
Emily Stark
985cea3277 Clean up (Avi's comments) 2013-06-14 15:30:25 -07:00
Emily Stark
c444451279 Galaxy version of meteor mongo 2013-06-14 15:30:25 -07:00
David Glasser
9bafe2f881 builder: create ".build" slightly more atomically.
Now there never is a moment where ".build" contains a fraction of a unipackage.
2013-06-14 14:04:55 -07:00
David Glasser
8f193b2cc0 In unipackages, move node_modules into npm/node_modules.
This makes them invisible from plugins.
2013-06-14 13:29:55 -07:00
David Glasser
6108cc298c Fix infinite loop caused by watcher fix. 2013-06-14 12:25:45 -07:00
David Glasser
ea82e7c4b4 Move PACKAGE/.npm/ to PACKAGE/.npm/package/
This is to isolate the NPM dependencies of the package at runtime from the NPM
dependencies of any build-time plugins in the package, which live in
PACKAGE/.npm/plugin/foo.

Before, plugins could see the node modules at PACKAGE/.npm/node_modules, which
was not isolated enough.

(One issue would be that if you happened to switch a package from having runtime
dependencies to having buildtime dependencies, the buildtime dependencies would
not get installed. This is partially an issue because we don't know to uninstall
all dependencies if they are all removed, but even if that is fixed it would
enforce an unnecessary ordering semantics on NPM updates.)
2013-06-14 11:12:31 -07:00
David Glasser
42e015d2c0 Remove extra log from assets test 2013-06-14 11:12:30 -07:00
estark37
b50a1bf12f Add server static assets and an API for retrieving them.
Server assets can be included in a bundle by putting them in the private/
directory of an application, or by registering a build plugin that calls
compileStep.addAsset with a server file. The Assets API (Assets.getText and
Assets.getBinary) allows an application or package to retrieve the contents of
its own server assets.
2013-06-13 22:53:25 -07:00
Naomi Seyfer
0ccba277cf oops accidentally delted half a line or something 2013-06-13 18:28:04 -07:00
Naomi Seyfer
6eeec29398 fix tests that rely on structure of bundled html generated 2013-06-13 18:05:05 -07:00
David Glasser
719e4c4700 Fix typo in buildinfo dependency serialization. 2013-06-13 17:44:15 -07:00
Naomi Seyfer
aa4fe7ec17 version check deduplication; resolved conflict wrong before 2013-06-13 16:24:08 -07:00
Naomi Seyfer
2e608e3abf Glasser comments on ssh-auth branch 2013-06-13 16:23:24 -07:00
Emily Stark
69d51abd4c Configure at /panel, not /proxy 2013-06-13 16:22:32 -07:00
Naomi Seyfer
66695a75d0 all things served on path prefix always 2013-06-13 16:22:32 -07:00
Naomi Seyfer
bd53fbe089 Rearrange proxying so that apps find their proxy themselves. 2013-06-13 16:22:32 -07:00
Naomi Seyfer
213cd94129 Add initial mechanics for serving an app on a path other than /
For now, this requires the ABSOLUTE_URL environment to be set to true.  More
considered ABI possibly coming.
2013-06-13 16:22:32 -07:00