Commit Graph

18 Commits

Author SHA1 Message Date
David Glasser
9538bec685 Replace "asset directory" concept with manifest of assets.
We were partway here already: the client served assets from the manifest instead
of from a static directory (since 5b8e1c1), and we already generated the list of
assets in the slice JSON file. But on the server, we ignored that list and
re-walked the asset directory at bundle time.

Now, the idea of asset directory is solely a part of initFromAppDir.

This also fixes a bug where assets that weren't associated with on-disk files
wouldn't work properly if Asset.get* is called in a package loaded with
unipackage.load. Not really sure how dev-bundle-fetcher even worked...

Also fixes a bug in builder where generated filenames didn't actually avoid
duplicate files.

This does not bump BUILT_BY because the previous commit did, and this commit
will not be pushed without the previous commit.
2013-07-17 00:01:06 -07:00
David Glasser
f786fd6fa5 Write (but don't use) sourceMaps (but not sources) for client programs.
Add builder.writeToGeneratedFilename helper and use it a lot.
2013-07-12 10:11:29 -07:00
David Glasser
d05e83d958 paths in program.json should not start with /. 2013-07-12 10:11:29 -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
f87a0ce09e Clean up commented-out code. 2013-06-10 22:44:16 -07:00
David Glasser
e838349cca Add missing var. 2013-06-10 22:21:07 -07:00
David Glasser
a578cb0c75 Fix symlinking bug revealed by parent commit.
With the precedence bug fixed, more directories are placed into
usedAsFile... enough to break nodeModulesMode=symlink. Fortunately bundler-test
did catch this.

The somewhat hacky fix is to look carefully for reserved empty directories and
replace them with symlinks. This may not be 100% correct; see the XXX comment.
2013-06-10 22:17:37 -07:00
David Glasser
b9e96ab2b7 Fix operator precedence bugs. 2013-06-10 20:55:37 -07:00
Geoff Schmidt
524daf4379 minor builder path sanitization tweaks 2013-05-13 11:57:48 -07:00
Geoff Schmidt
a780f9f427 rv commit of stale copy of builder.js 2013-05-13 11:56:51 -07:00
Geoff Schmidt
02e1b3b1c7 Make 'meteor --help' startup >3x faster, with the help of a require() tree profiler. The speedup is entirely due to lazy-loading third party modules. 2013-05-13 11:56:51 -07:00
Geoff Schmidt
9dd512e769 Remove builder.copyFile (it actually duplicates the file option to builder.write) 2013-05-13 11:54:20 -07:00
Geoff Schmidt
607e637b22 Generate dev_bundle trampoline scripts in star balls. Nothing uses them yet. 2013-05-13 11:53:51 -07:00
Geoff Schmidt
3abacc44f1 move server config info out of program.json into a separate config.json 2013-05-13 11:53:51 -07:00
Geoff Schmidt
54ca2a4463 Fix typos in bundler that prevented normal bundling 2013-05-13 11:51:53 -07:00
Geoff Schmidt
2c1b297dc1 Facility for including unipackages from non-Meteor-built command-line nodejs programs (eg, 'meteor'). Does not fully duplicate the server environment (specifically, does not provide a HTTP server) so livedata does not yet load. 2013-05-13 11:51:53 -07:00
Geoff Schmidt
503a84a3aa Compile and save packages to Unipackage format for faster startup. Move npm processing to package build time. Let npm dependencies vary per-slice (eg, don't include npm packages used only by tests in non-test builds) -- implemented on disk but not yet exposed via API. 2013-05-13 11:51:53 -07:00
Geoff Schmidt
e26732d3dd Factor out bundle file-handling logic into new Builder class 2013-05-13 11:51:52 -07:00