Commit Graph

64 Commits

Author SHA1 Message Date
Ben Newman
0674fc0714 Call plugin.setDiskCacheDirectory with OS-appropriate path.
Fixes #4990.
2015-08-19 12:37:41 -04:00
David Glasser
f02cc00b5d Write node version to built bundles
Since server/.bundle_version.txt is mostly used to determine the node
version, writing it more directly can help too.

(Arguably this should be MIN_NODE_VERSION rather than process.version
but that value is not easily accessed.)
2015-08-14 19:15:09 -07:00
David Glasser
4c20f0d296 Fix failure to write legacy isopack-1 on download
When we download a package that's only isopack-1, we're supposed to
write it as a "fat" isopack-1/isopack-2 package, by using the same
includePreCompilerPluginIsopackVersions flag used for publishing
packages. However, the internal representation of the "prelink" resource
contained in legacy packages didn't have a flag set that is later used
to see if includePreCompilerPluginIsopackVersions is allowed to be
effective. This meant that we'd download packages published as
isopack-1-only and save them as isopack-2-only. And then old meteor
releases would fail to use them.

Fixes #4923.
2015-08-12 23:27:42 -07:00
David Glasser
2120669f46 Remove XXX comment 2015-08-11 19:33:06 -07:00
Slava Kim
303052be68 Update README.md 2015-08-10 14:40:43 -07:00
David Greenspan
c3c07f74a1 Don't add imports of prodOnly packages in compiler
The compiler inserts code that imports the exports of used packages.
It's important that we don't do this for the exports of used
debugOnly and prodOnly packages, because the inserted code will
fail at runtime if the packages are not linked in because we aren't
in dev mode or aren't in prod mode.
2015-08-07 09:28:37 -07:00
Sashko Stubailo
90dec37c54 Fix bundler cordova stuff 2015-08-06 17:09:26 -07:00
David Greenspan
621617d868 Document debugOnly and prodOnly 2015-08-06 16:49:27 -07:00
David Greenspan
67b9da63ad Throw error if package is prodOnly and debugOnly
With self-test.
2015-08-06 16:49:26 -07:00
David Greenspan
a34d040229 Fix wrong type in doc comment 2015-08-06 16:49:26 -07:00
David Greenspan
a63dc1f5c2 Support prodOnly in addition to debugOnly
It's very useful to be able to include code only in production.  It's
useful for React integration, but presumably also for many apps.

* Add prodOnly boolean flag alongside debugOnly in Package.describe

* Packages the set prodOnly to true auto-depend on isobuild:prod-only
  (making them error in the old tool where prodOnly isn't supported)

* The `includeDebug` boolean build option is replaced by a string
  named buildMode, which can be 'development' or 'production', just
  like minifyMode.

Tested by self-test.
2015-08-06 16:49:26 -07:00
Slava Kim
afee6b07c7 move catalog/ into packaging/ 2015-08-06 16:39:01 -07:00
Slava Kim
39d8aef3d9 move files into console/ tool-testing/ 2015-08-06 16:39:00 -07:00
Slava Kim
924b1b40e0 Remove an extra execFile ref 2015-08-06 16:00:39 -07:00
Slava Kim
f49de5b9ac Move files connecting to Meteor-provided services
to a separate folder
2015-08-06 16:00:39 -07:00
Slava Kim
8d1d4a50ac More info on various parts of the build process 2015-08-06 14:52:34 -07:00
Slava Kim
83ecb5ef45 Expand the isobuild readme 2015-08-06 13:57:46 -07:00
Christoph Herbst
58aa67f779 fix using minifiers when creating app bundles 2015-08-06 13:21:45 -07:00
Slava Kim
c9eeec7469 remove a dead import 2015-08-05 20:10:11 -07:00
Slava Kim
6dc2e0b9c5 Explain JsImage in practical terms 2015-08-05 20:03:00 -07:00
Slava Kim
b9b329e91d Make bundler a bit classier 2015-08-05 19:49:42 -07:00
Slava Kim
76b001d0da Kill some dead code 2015-08-05 15:03:53 -07:00
Slava Kim
56fa19d098 fix for cordova plugins [not real] conflict
Band-aidy, but fixes the case when two packages add the same plugin with
the same version that can't be parsed by semver (like github url).

For some reason, after the build plugins refactoring the same plugin
from the same package can now be added twice from `webapp`.

Since this feature is not well designed to begin with, decided to spend
too much time investigating it.
2015-08-04 17:42:36 -07:00
Slava Kim
6b1bb038d8 Move files into tools/fs 2015-08-03 22:09:28 -07:00
Slava Kim
8a8db83d29 Move files into tools/utils 2015-08-03 20:32:38 -07:00
Slava Kim
36b542f822 move files into tools/packaging 2015-08-03 16:03:15 -07:00
Rahul
d45b7bddd0 Grammar
Also, "marketing material" doesn't seem like an accurate description of the page on the Meteor site as it's more of a high level description of the component.
2015-08-01 17:11:55 -07:00
Slava Kim
176b862085 minimal readme for isobuild 2015-08-01 14:54:07 -07:00
Slava Kim
5472331fc5 Move isopackets.js to tool-env
Because it is only used in tool to load packages, so it is sort of a
setup environment file.
2015-08-01 14:13:53 -07:00
Slava Kim
08005bfe0a move runners into folder 'runners' 2015-08-01 13:01:49 -07:00
Slava Kim
e8abced83d fix git call back to ls-tree 2015-08-01 11:57:06 -07:00
Slava Kim
49a7088c30 Create a folder "tool-env"
Contains uninteresting setup and cleanup files
2015-07-31 18:38:25 -07:00
Slava Kim
35aef2b296 Create 'static-assets' folder in tools
To keep files that are not run by tool itself, but are used by generated code.
2015-07-31 17:12:38 -07:00
Slava Kim
3ddd281d8c Move catalog files into tools/catalog/ 2015-07-30 12:12:07 -07:00
David Glasser
122093bc58 On-disk cache for linker.fullLink 2015-07-23 20:33:02 -07:00
David Glasser
97f3781f5a js-analyze should not analyze in strict mode
because this finds errors in things that we already compiled
successfully (eg, using 'package' as a variable name, which iron:core
does).
2015-07-23 20:27:10 -07:00
David Glasser
1e3ad0dddd Display js-analyze errors correctly 2015-07-23 20:26:48 -07:00
Slava Kim
95ae655c4e Expose wrapped fs functions for plugins
Unlike the wrapped files.* functions, files.fsFixPath is closer to fs.*
in API or async/sync and callbacks.
2015-07-23 18:10:27 -07:00
Slava Kim
c51212ed82 Builder should always write a temp file first
To avoid a situation when a file is half-written
2015-07-23 16:35:35 -07:00
Ben Newman
bf353fc66e Upgrade escope and use the new API in js-analyze.js. 2015-07-23 16:45:14 -04:00
Ben Newman
8b9a1f590b Use require("meteor-babel").parse for js-analyze instead of Esprima.
The Babel parser is faster, it has to be installed (unlike Esprima, which
can be removed after a few more changes like this), and better matches the
parsing we do for ECMAScript transpilation.
2015-07-23 16:45:14 -04:00
Slava Kim
173bfb7c03 Expose and use wrapped fs/path moduldes in Plugins 2015-07-23 13:10:26 -07:00
Slava Kim
d5586d0126 Disable in-place builder on Windows 2015-07-23 12:07:18 -07:00
Slava Kim
8975ae6a34 Write file after removing the old directory on file rewrite 2015-07-23 11:57:53 -07:00
David Glasser
3da4e611c9 Get JSDoc working again
- Upgrade to a newer (unreleased) version which supports
     function k({} = {}) {}
  and doesn't also crash

- Filter out boring warnings

- Don't use ES7 syntax that JSDoc doesn't support in one file that
  has JSDoc in it
2015-07-22 22:29:08 -07:00
David Glasser
abce1797da fix bad jsdoc 2015-07-22 22:06:38 -07:00
David Glasser
cdd71b8312 fewer negatives in canWriteLegacyBuilds 2015-07-22 21:48:07 -07:00
David Glasser
d4a8c491c1 some more comments on compiler-plugin.js 2015-07-22 21:40:52 -07:00
Martijn Walraven
12366fc4dc Remove now unnecessary runLog calls in meteor-npm.js 2015-07-22 21:07:15 -07:00
David Glasser
7b0c4f1950 Stop old tools from taking isopack-2-only versions
I thought we could rely on isobuild:compiler-plugin for this, but it's
not good enough: a package could have dependencies that are satisfiable
without choosing a dependency version with a compiler plugin, yet choose
that dependency version at publish time and become ineligble for legacy
builds.
2015-07-22 20:54:07 -07:00