Commit Graph

49 Commits

Author SHA1 Message Date
Ben Newman
5aee7a9a09 Use an appropriate module object in meteor shell. 2016-05-19 17:04:08 -04:00
Ben Newman
2f0aaa947a Make meteor shell help text robust across Node versions. 2016-05-16 18:21:13 -04:00
Ben Newman
52e2c6a36c Use setImmediate instead of process.nextTick in shell-server.js.
Since process.nextTick fires before IO events, it doesn't give the server
much chance to make progress starting up.
2016-05-16 18:21:13 -04:00
Ben Newman
355e850829 Avoid more uses of fs.exists and fs.existsSync.
Part of #6921.
2016-05-16 18:21:13 -04:00
Ben Newman
d94e7d812d Upgrade dev bundle meteor-promise to 0.7.1. 2016-05-16 18:21:11 -04:00
Tom Coleman
d6288aceed Fix name in skeleton
At some point I accidentally reset it to "simple"
2016-04-25 12:35:16 -07:00
Ben Newman
2b62539d9f Allow Galaxy users to disable npm rebuild if they really want to.
Part of #6537..
2016-04-08 15:20:09 -04:00
Ben Newman
65c8e65e77 Exit early from npm-rebuild.js when npm-rebuilds.json does not exist. 2016-04-07 13:05:50 -04:00
Ben Newman
c18c1f5278 Replace setup.sh with npm-rebuild.js, and run it on npm install.
Implements https://github.com/meteor/meteor/issues/6537#issuecomment-205954797

The setup.sh script was only sometimes written previously, so no existing
deployment logic should rely on it existing.

On the other hand, all apps built by `meteor build` require running
`npm install` in the programs/server/ directory, so the install hook I
added to programs/server/package.json will ensure npm-rebuild.js is
invoked reliably.

Using a pure Node script means this code will work just as well on Windows
as on Linux or Darwin, though Linux is by far the most common deployment
platform for Meteor apps.

TODO Remember to rebuild the dev bundle before the next release!
2016-04-07 13:05:50 -04:00
Ben Newman
d3e7aa9141 Revert enabling partial paths for files.pathRelative.
This reverts a change I made in 75f9214959.
I thought allowing partial paths would make files.pathRelative more
robust, but it had the unintended consequence of causing #6586.
2016-03-24 13:35:31 -04:00
Ben Newman
75f9214959 Use OS-specific absolute paths with require.resolve. 2016-03-24 00:48:40 -04:00
Ben Newman
420d001b75 Make sure findAppDir uses correct OS paths.
Fixes #6568.
2016-03-23 13:47:49 -04:00
Ben Newman
b8a0340dc9 Fix findAppDir when running from a temp test directory. 2016-03-22 18:13:25 -04:00
Ben Newman
67491a66dd Fix .npm/{package,plugin}/... parsing.
For package dependencies, the node_modules directory immediately follows
the /package/ part of the path, but for plugins the name of the plugin
comes before the node_modules directory.
2016-03-21 19:54:05 -04:00
Ben Newman
299db526f1 Revert "Bump $MIN_NODE_VERSION to v0.10.43."
This reverts commit 6985c47ea7.

Fixes #6533.
2016-03-19 13:13:22 -04:00
Ben Newman
ff023e9c37 Make npmRequire check node_modules paths from control files, too.
Because symlinking is impossible on Windows, and copying node_modules
files is too slow, we can't just symlink/copy all node_modules files into
.meteor/local/build/programs/server/npm like we do for other platforms, so
we have to search for them where they are.

Part of #6500.
2016-03-17 20:59:48 -04:00
Ben Newman
6985c47ea7 Bump $MIN_NODE_VERSION to v0.10.43. 2016-03-17 19:55:29 -04:00
Ben Newman
c79da1be8a Convert module identifiers to OS paths in Npm.require.
Part of #6500.
2016-03-17 02:22:53 -04:00
Tom Coleman
f3957670ce Added a gitignore to the skeleton 2016-03-17 15:10:34 +11:00
Ben Newman
f595034e1a Allow npmRequire to load dev bundle and built-in modules. 2016-03-13 23:39:38 -04:00
Eric Dobbertin
134707be68 Add Assets.absoluteFilePath 2016-03-11 15:09:55 +11:00
Ben Newman
40857bdaff Propagate meteorEnv subset of process.env from server to client.
Fixes #6399.
2016-03-08 19:37:57 -05:00
Ben Newman
f8084682f5 Commit some accidentally unstaged changes. 2016-03-07 20:21:57 -05:00
Ben Newman
c9660d9f83 Implement module.useNode() for importing node_modules on the server.
Upgrading the install package to 0.5.6 was vital to enable support for
Module.prototype.useNode: 9eb8351e11
2016-03-07 19:41:15 -05:00
Ben Newman
26e3cd7df2 Make sure <bundle>/npm/ contains all node_modules directories. 2016-03-07 19:41:15 -05:00
Tom Coleman
9952d2b19b Properly remove version from skeleton package.json 2016-03-05 09:54:58 +11:00
Tom Coleman
42b8f41824 Revert "Remove version from the skeleton package.json"
This reverts commit 81e40d7301.
2016-03-05 09:54:35 +11:00
Ben Newman
cfdcc37e0d Make ImportScanner path manipulation more Windows-friendly. 2016-03-03 12:35:30 -05:00
Tom Coleman
81e40d7301 Remove version from the skeleton package.json
cc @benjamn -- as I mentioned I don't think this makes sense for applications. Please let me know if you disagree.
2016-03-03 11:43:45 +11:00
Tom Coleman
36e3e2e6d4 Remove main field as we don't use it (yet) 2016-03-02 13:50:52 +11:00
Tom Coleman
4476895022 Refactored skeleton:
- Split files into the correct place, given the guide
 - Import html file
 - Removed test [it's not a demo]
 - Use ReactiveVar rather than Session
 - Added an info section to guide people further
2016-03-01 15:39:06 +11:00
Ben Newman
5c47891489 Allow custom stubs to override meteor-node-stubs.
Part of #6056.
2016-02-29 19:45:52 -05:00
Ben Newman
c51b8cf7ff Update the app skeleton to include a package.json file. 2016-02-27 18:34:11 -05:00
Ben Newman
3c20ea603f Use meteorInstall's root require function in meteor shell.
Helps with #6271.
2016-02-26 12:36:58 -05:00
Avital Oliver
eadeb72e16 Merge branch 'devel' into release-1.3 2016-02-17 12:15:51 -08:00
SEKE
d4da2957a9 Rename separated minifiers to singular name and use separate versions from 1.3 onwards. 2016-02-10 12:32:17 +01:00
Martijn Walraven
711176a28f Merge branch 'release-1.3' into cordova-improvements 2016-02-09 12:43:39 +01:00
Ben Newman
ecf4fdb7b4 Update the package skeleton files to use modules. 2016-02-05 17:31:58 -05:00
Ben Newman
4c890ac20d Use Babel 6 to implement ECMAScript 2015+ in tool code.
Note that `export default` no longer modifies `module.exports`, but simply
defines `exports.default`, so these two import styles will work:

  import DefaultExport from "./export-default-module.js"; // preferred
  var DefaultExport = require("./export-default-module.js").default;

but this style will no longer work:

  var DefaultExport = require("./export-default-module.js");
2016-02-04 21:37:34 -05:00
Martijn Walraven
fb7e33de2e Include appId in __meteor_runtime_config__ for deployed apps
This adds `appId` to the `config.json` generated by the bundler, and uses that
in `boot.js` to initialize `process.env.APP_ID`. This is used by `autoupdate_server.js`
to set `__meteor_runtime_config__`.
2016-01-25 15:02:43 -08:00
Ben Newman
76609a615c Upgrade to Node v0.10.41. 2015-12-08 18:43:15 -05:00
Ben Newman
7bd0382ad9 Allow piping commands to meteor shell via stdin. 2015-11-12 16:33:21 -05:00
Ben Newman
7eafc55eb2 Improve meteor shell command evaluation.
Specific improvements:

- Parentheses are now stripped from commands that look like named classes
  so that they will be treated as class declarations rather than as named
  class expressions.

- When the `ecmascript` package is installed, `compileForShell` errors are
  now exposed to the `evalCommand` callback.

- Instead of using `vm.runInThisContext` to parse and evaluate commands at
  the same time, `evalCommand` now parses commands by creating a new
  `vm.Script` and later evaluates them using `script.runInThisContext()`,
  so that `SyntaxError`s can be reported immediately. Fixes #5131.
2015-09-11 18:32:39 -04:00
Martijn Walraven
f768cc7a3b Move Cordova assets and client files to tools/cordova directory 2015-08-26 19:26:44 +02:00
Ben Newman
5a880a00bb If Package.ecmascript is installed, use it to compile shell commands. 2015-08-13 20:01:01 -04:00
Ben Newman
0cd38690e9 Use a Promise to run shell commands using recycled Fibers. 2015-08-13 20:01:01 -04:00
Sashko Stubailo
cf3ea5c7db Add ecmascript to package onTest skeleton 2015-08-06 13:20:18 -07:00
Sashko Stubailo
3cfb718a91 Split meteor-platform into smaller umbrella packages
Discussion/plan here: https://github.com/meteor/meteor/pull/4851

`meteor-platform will no longer be a part of future Meteor releases. Apps
`upgraded to Meteor 1.2 will be automatically updated to use the packages listed
`above instead of meteor-platform. (Along with a set of packages like EJSON and
`Random that used to be in meteor platform but probably shouldn’t have been)

After this project, here is the set of packages that will be included by default
in a newly created Meteor app:

1. `meteor-base` is the set of packages that basically every single Meteor app will have. If you don’t have these packages, you are probably doing something that isn’t really supported, like building a command line tool or switching out the whole web server stack. It comes with the following packages:
    1. `meteor` - this includes stuff like `Meteor.isClient`, a default handler for `css` files, etc.
    2. `webapp` - this is responsible for handling actual HTTP connections, Websockets, and serving files
    3. `underscore` - almost all of Meteor is built on top of underscore, so it makes sense to let people assume that most or all Meteor apps right now will have this included
    4. `autoupdate` - refreshing the client is a core part of the Meteor development experience, and it’s integrated into several layers of the stack
    5. `ddp` - lots of core parts of Meteor assume that DDP can be used to communicate between client and server
2. `standard-minifiers` minifies your JS and CSS code in production
3. `ecmascript` allows you to write your app using new ES2015 JavaScript features
4. `es5-shim` polyfills some newer APIs in old and non-compliant browsers, in particular IE8
5. `mobile-experience` is a set of cordova-specific packages that set some good defaults when building for mobile. These packages only activate when you are building a native Android or iOS app.
    1. `fastclick` - avoid the 300ms touch delay
    2. `mobile-status-bar` - avoid the status bar information covering up your app content
    3. `launch-screen` - cover the app with a launch image so that people don’t have to see things loading
6. `mongo` is the package that enables Meteor to connect to MongoDB on the server and watch queries in real-time. It also includes Minimongo for the client so that you can publish Mongo documents over DDP. This package will be removable in case you want to use one of the community-supported drivers for alternate databases, and for the desirable future where Meteor supports other databases officially.
7. `blaze-html-templates` compiles your `html` files with Spacebars and includes the Blaze runtime on the client so that the templates can run. If you remove this, you might want to include a different view layer like `react`, or `angular`, and use a package for rendering the starter HTML like `static-html` (also coming out in Meteor 1.2)
8. `tracker` the package that powers a lot of Meteor’s reactive APIs on the client. Including it in the app allows you to use `Tracker.autorun` directly.
9. `session` a simple global reactive dictionary for the client.
10. `jquery` a convenient utility library for the client.
11. `insecure` a prototyping package that lets you make any database modifications from the client.
12. `autopublish` a prototyping package that lets you access the whole database (except sensitive user data) from the client.
2015-08-04 10:15:04 -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