Commit Graph

398 Commits

Author SHA1 Message Date
Ben Newman
2468d17fec Allow creating Meteor apps with --typescript skeleton.
Just as developers can run

  meteor create --react my-react-app
  meteor create --minimal my-minimal-app
  meteor create --bare my-bare-app
  meteor create --full my-full-app

they can now run

  meteor create --typescript my-typescript-app

to produce a new TypeScript application, based on the --react application,
configured using a recommended tsconfig.json file.

This app represents the current best/simplest-known way to set up a
Meteor-compatible TypeScript application, but it is still very much a work
in progress. Please feel free to submit pull requests to improve it, or
create issues to discuss how it should work.

For example, the community-maintained @types/meteor package covers all the
core packages used by this starter application, but it has not been
updated in a while, so there will no doubt be meteor/* packages with
missing types. In future versions, Meteor should ideally generate the
appropriate .d.ts files from TypeScript package source code, so that no
separate @types/meteor/* declarations need to be maintained.
2019-09-19 09:27:23 -04:00
Paulo Mogollón
2ae2690f3a Convert tools/utils/archinfo.js to TypeScript. (#10624)
* Updated code to use modern JS
* Added types
* Stopped using 2 underscore functions (1 remaining)
2019-07-21 12:01:24 -04:00
afrokick
2db8d07791 Convert tools/shell-client.js to TypeScript (#10619) 2019-07-16 11:10:17 -04:00
Ben Newman
e299c86ecf Assume npx (as in meteor npx ...) is a valid command.
Sometimes, before dev_bundle/bin/.meteor-commands.json has been written, a
command like `./meteor npx tsc` can fail because `npx` is not blessed in
the same way `node` and `npm` are. Since `npx` is a core tool that we want
folks to be able to use without confusion, I think it makes sense to
include it in the list of known subcommands.
2019-07-15 12:32:49 -04:00
Ben Newman
769337551e Convert tools/tool-env/profile.js to TypeScript.
Unfortunately, this conversion triggered an error due to one of the
shortcomings of the Babel implementation of TypeScript:

SyntaxError: /tools/tool-env/profile.ts: Namespace not marked type-only declare. Non-declarative namespaces are only supported experimentally in Babel. To enable and review caveats see: https://babeljs.io/docs/en/babel-plugin-transform-typescript
  278 | }
  279 |
> 280 | export namespace Profile {
      |                  ^
  281 |   export let enabled = !! process.env.METEOR_PROFILE;
  282 |
  283 |   export function time<TResult>(bucket: string, f: () => TResult) {
    at File.buildCodeFrameError (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/core/lib/transformation/file/file.js:261:12)
    at transpileNamespace (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/plugin-transform-typescript/lib/namespace.js:25:25)
    at PluginPass.TSModuleDeclaration (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/plugin-transform-typescript/lib/index.js:271:32)
    at newFn (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/visitors.js:193:21)
    at NodePath._call (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/path/context.js:53:20)
    at NodePath.call (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/path/context.js:40:17)
    at NodePath.visit (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/path/context.js:88:12)
    at TraversalContext.visitQueue (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/context.js:118:16)
    at TraversalContext.visitMultiple (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/context.js:85:17)
    at TraversalContext.visit (/Users/ben/meteor/dev_bundle/lib/node_modules/@babel/traverse/lib/context.js:144:19)
2019-07-06 09:18:35 -04:00
Ben Newman
5ed64fb1db Remove explicit .js extension from tools/fs/files imports. 2019-07-04 10:32:09 -04:00
Ben Newman
bd89ac8d1b Merge branch 'devel' into release-1.8.2 2019-06-19 13:19:11 -04:00
Filipe Névola
ce14282304 Enable running multiple Cordova apps from same application source (#10577)
Fixes #10576.
2019-06-19 13:07:25 -04:00
Ben Newman
d9fd447e6f Avoid using fs.unlinkSync on directories.
Should help with #10549.
2019-05-05 19:37:45 -04:00
Ben Newman
f0192a82d9 Stop using mini-files.js in non-Babel-compiled code. 2019-04-23 19:21:57 -04:00
georgyberdyshev
65747fc29f Updated meteor create --list Angular boilerplate name and URL. (#10363) 2019-03-15 11:23:46 -04:00
Lisa Huang
0e899c4091 Fix LGTM testing errors (issue #10240, PR #10241)
* fix issue 10240: add variable declaration

* fix issue 10240: add semicolons to avoid automated semicolon insertion

* fix issue 10240: add semicolons to avoid automated semicolon insertion

* fix issue 10240: variable declaration in for...in statement, add semicolons

* fix issue 10240: variable declaration

* fix issue 10240: variable declaration
2018-10-02 10:53:50 -04:00
Ben Newman
46396a1156 Instrument build/bundle/deploy commands for METEOR_PROFILE.
https://github.com/meteor/meteor-feature-requests/issues/239
2018-09-18 09:59:14 -04:00
Ben Newman
deffd8ac2c Undo accidental reformatting of meteor create help text.
This broke a test that depends on the precise wording of this help
message: https://circleci.com/gh/meteor/meteor/27381
2018-09-13 12:38:02 -04:00
Ben Newman
914c18c181 Fully add --react to meteor create (with help text). 2018-09-13 11:53:23 -04:00
David Mihal
56553f0c3b Create React-based apps with meteor create --react (#10149) 2018-09-13 11:46:41 -04:00
Toine van Kampen
499bb7ea25 Merge remote-tracking branch 'meteor/devel' into devel
Rebaseline
2018-06-06 20:28:03 +10:00
Ben Newman
38f570abc0 Ensure npm scripts find correct meteor executable. (#9941)
In my local development environment, the `meteor` command resolves to my
Meteor checkout, and I use `~/.meteor/meteor` explicitly when I want to run
a released version of Meteor.

If I run

  ~/.meteor/meteor npm test

and the `package.json` file defines an npm `test` script that refers to
`meteor`, in my environment this `meteor` won't be the same as the one I
used to run `~/.meteor/meteor npm test`, which can introduce weirdness
such as pinning the versions of packages in `meteor/packages/non-core`,
and all the usual Meteor version inconsistency risks.

This commit fixes that problem by prepending the directory that contains
the `meteor` (or `meteor.bat`) executable to the `PATH` before running
`meteor npm ...` commands.
2018-06-05 13:06:51 -04:00
Ben Newman
6b7df3fb0d When checking for existing builds, tolerate web.browser.legacy better.
This is a follow-up to b4a68e99c1, which
allowed obtaining a simplified list of build architectures (without
web.browser.legacy) by calling isopack.buildArchitectures(true), which was
helpful for matching existing builds of packages that were published
before the web.browser.legacy architecture was introduced in Meteor 1.7.

Now that some packages have been published with the web.browser.legacy
architecture as part of the Meteor 1.7 release, it's important to try
matching the full unsimplified list of architectures, while still falling
back to the simplified list for other packages.
2018-05-29 18:13:19 -04:00
Ben Newman
a76e6da686 Update help text about minimal starter app to deemphasize emptiness. 2018-05-16 17:47:19 -04:00
Ben Newman
76e03f51f3 Update remaining mentions of Meteor 1.6.2 to 1.7. 2018-04-25 10:09:51 -04:00
Ben Newman
e1e2c2b490 Terminate SQLite database connection before springboarding.
https://github.com/meteor/meteor/issues/9703#issuecomment-383620007
2018-04-24 11:37:33 -04:00
Ben Newman
6bcf2fbee9 Default buildMode to development for meteor run command.
Another attempt to fix {debug,prod}Only package self-test failures:
https://circleci.com/gh/meteor/meteor/19960
2018-04-24 11:11:37 -04:00
Toine van Kampen
f28710ec23 Add PhantomJS option back in
Per feedback keep PhantomJS
2018-04-19 21:34:33 +10:00
Toine van Kampen
007d11ef26 Update CLI Command
Set default to puppeteer
2018-04-16 20:52:45 +10:00
Ben Newman
5fbb99ce5b Merge branch 'devel' into release-1.6.2 2018-04-05 20:29:02 -04:00
Aaron Curtis
90d5c1efc4 Correctly append branch locations (#9760)
Before this change,

  meteor create --list

would produce output containing the following line:

  todos-react: https://github.com/meteor/todos#react

but "meteor create --example todos-react" would create the blaze version of the todos example.

This was because for some reason the code is using a # to append the name of the branch, instead of /tree/.
2018-04-04 11:42:02 -04:00
Ben Newman
efdc66d614 Merge branch 'devel' into release-1.6.2 2018-03-27 12:15:11 -04:00
Ben Newman
e7ad5d2a42 Call files.cp_r with { preserveSymlinks: true } in more places.
Now that symlinks can be used to enable selective compilation of
node_modules, it's important to preserve them.
2018-03-26 12:04:12 -04:00
Ben Newman
f14d50538e Merge branch 'devel' into release-1.6.2 2018-03-01 18:02:08 -05:00
Ben Newman
601f0d6f9f Update 'meteor test' help text to explain meteor.testModule. 2018-03-01 14:27:31 -05:00
Ben Newman
0520200f90 Fix tools/tests/help.js self-test.
https://circleci.com/gh/meteor/meteor/16787
2018-02-21 20:22:12 -05:00
Ben Newman
590ca4d48b Support meteor create --minimal for creating very small apps.
Like `meteor create --bare`, except with even fewer Meteor core packages,
so that the client-side footprint of the app is as tiny as possible.
2018-02-21 19:39:24 -05:00
Ben Newman
eeb7baca8f Merge branch 'devel' into release-1.6.2 2018-02-13 15:08:58 -05:00
Ben Newman
ff8a1ef32a Better error when running test-packages for nonexistent packages. 2018-02-13 13:43:08 -05:00
Ben Newman
926743536e Merge branch 'devel' into release-1.6.2 2018-02-10 11:01:41 -05:00
Adam Zionts
d19f583e4f Make meteor deploy synchronous
- This changes meteor deploy to poll the /version-status/ REST endpoint
in Galaxy for the build and deploy status of the returned version
- Also fixes up a typo in a test
- Currently only configured to use a default polling configuration
- This change also adds a flag called --no-wait which allows users to
  specify that they want the deploy command to behave just as before
2018-02-07 13:30:21 -08:00
Ben Newman
b4a68e99c1 Avoid having to republish all core packages for web.browser.legacy.
I'm not entirely sure this will work, but the alternative is having to
bump the patch version of every core package, so I'd like to see if this
simplification works first.
2018-01-22 21:28:54 -05:00
Ben Newman
ed28140071 Support a new web.browser.legacy platform. 2018-01-22 17:54:42 -05:00
Ben Newman
da02835f0a Merge branch 'devel' into release-1.6.1 2018-01-03 10:49:37 -05:00
Hugh Willson
bdf8091687 Update meteor create --full to use meteortesting:mocha (#9489)
This commit updates the `meteor create --full` app skeleton to use `meteortesting:mocha`
(and npm based `chai`), instead of the deprecated `practicalmeteor:mocha` package.
2017-12-20 18:45:03 -05:00
Adam Zionts
cc47278564 Updates information about Meteor CLI usage (#9462) 2017-12-20 14:48:08 -05:00
Ben Newman
bf6d0dabc9 Merge branch 'devel' into release-1.6.1 2017-12-19 18:22:51 -05:00
Ben Newman
a7585da87c Bump MIN_NODE_VERSION to enforce Node >= 8 in production. (#9485)
Clearly we haven't remembered to bump this version for some time now,
which is too bad, because it could have provided a more helpful error for
developers using an older version of Node in their non-Galaxy deployment
environments: https://github.com/meteor/meteor/issues/9470
2017-12-19 13:10:54 -05:00
Jesse Rosenberger
9b056f5e91 Merge pull request #9341 from meteor/glasser/progress-status-only
Improved console behavior within the Emacs shell, and also general
Console refactoring to modernize ECMAScript use and remove Underscore.
2017-12-13 20:14:13 +02:00
Jesse Rosenberger
7268fb8ca0 Improve Emacs shell support by auto-detecting Emacs.
This adds a memoized helper function for detecting Emacs throughout the
CLI tool and automatically resorts to "ProgressDisplayStatus" mode when
Emacs is enabled.

In my tests with both Emacs 22 and 27, this nearly doubled performance
when using Meteor from within the Emacs shell (i.e. `M-x shell`).
2017-12-12 17:19:16 +02:00
Ben Newman
7d379aecf0 Merge branch 'devel' into release-1.6.1 2017-12-05 11:00:18 -05:00
David Brown
ed10ede29d Fix error message for invalid ROOT_URL #8026 (#9261) 2017-12-05 10:14:28 -05:00
Ben Newman
d10d3225ad Merge branch 'devel' into release-1.6.1 2017-12-05 09:31:20 -05:00
Jesse Rosenberger
6b27c69cd9 Remove unused meteor open-ide command from help.txt. 2017-11-29 23:16:52 +02:00