Skip to content

Commit

Permalink
[email protected] for Meteor 1.3.3; #51, #97, #100
Browse files Browse the repository at this point in the history
Published gadicc:[email protected].
Published gadicc:[email protected].
Published gadicc:[email protected].
Published gadicc:[email protected].
Published gadicc:[email protected]
  • Loading branch information
gadicc committed Jun 6, 2016
1 parent c2db150 commit 5e73363
Show file tree
Hide file tree
Showing 9 changed files with 99 additions and 104 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

**`gadicc:[email protected]` is the last release for Meteor 1.3.2.4; later releases and the 2.0.0 final will target Meteor 1.3.3, using Meteor's new official babelrc support, and no longer includes our own `babel-compiler-babelrc` which we no longer support**.

**Since Meteor 1.3.3 we use Meteor's native babelrc support**. You should `npm rm --save-dev babel-preset-meteor` and remove the `meteor` preset from your `.babelrc`.

* Edit your react components and see changes instantly, while maintaining state.
* Catch react `render()` errors and show on your screen rather than crashing your app.
* Add your own `.babelrc` plugins and presets, like
Expand Down
2 changes: 1 addition & 1 deletion demo/.meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[email protected].1
[email protected].2
112 changes: 56 additions & 56 deletions demo/.meteor/versions
Original file line number Diff line number Diff line change
@@ -1,87 +1,87 @@
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].2
[email protected].2
[email protected].2
[email protected].2
[email protected].2
[email protected].2
[email protected].2
[email protected]
[email protected].1
[email protected].1
[email protected].2
[email protected].2
[email protected]
[email protected]
[email protected].1
[email protected].1
[email protected].1
[email protected].2
[email protected].2
[email protected].2
[email protected]
[email protected].1
[email protected].1
[email protected].1
[email protected].2
[email protected].2
[email protected].2
[email protected]
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].2
[email protected].2
[email protected].2
[email protected].2
[email protected].2
[email protected].2
gadicc:[email protected]
gadicc:[email protected].1
gadicc:[email protected].2
gadicc:[email protected]
gadicc:[email protected]
gadicc:[email protected]
gadicc:[email protected]
[email protected].1
[email protected].2
[email protected]
[email protected]
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].2
[email protected].2
[email protected].2
[email protected].2
[email protected].2
[email protected].2
[email protected]
[email protected].1
[email protected].1
[email protected].2
[email protected].2
[email protected]
meteorhacks:[email protected]
[email protected].1
[email protected].1
[email protected].1
[email protected].2
[email protected].2
[email protected].2
[email protected]
[email protected]
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].2
[email protected].2
[email protected].2
[email protected].2
[email protected].2
[email protected].2
[email protected].2
[email protected].2
practicalmeteor:[email protected]_1
practicalmeteor:[email protected]_2
practicalmeteor:[email protected]_2
practicalmeteor:[email protected]
practicalmeteor:[email protected]_2
[email protected].1
[email protected].2
[email protected]
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].1
[email protected].2
[email protected].2
[email protected].2
[email protected].2
[email protected].2
sanjo:[email protected]_1
sanjo:[email protected]
[email protected].1
[email protected].1
[email protected].1
[email protected].2
[email protected].2
[email protected].2
[email protected]
[email protected].1
[email protected].1
[email protected].2
[email protected].2
[email protected]
tmeasday:[email protected]
[email protected].1
[email protected].2
[email protected]
[email protected].1
[email protected].1
[email protected].2
[email protected].2
[email protected]
[email protected]
5 changes: 3 additions & 2 deletions docs/Upgrading.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## From 1.3.1_1 or .fast releases

* We now use React-Hot-Loader v3.
* We now rely on Meteor's official `.babelrc` support (from 1.3.3?) XXX
* We now rely on Meteor's official `.babelrc` support (from 1.3.3)
* We can now upgrade `hot` and the new `hot-build` independently of `ecmascript-hot`.

This project is now a general hot loading project, and includes sample instructions
Expand All @@ -11,7 +11,8 @@ there.

### Remove the old setup

1. `npm rm --save-dev babel-plugin-react-transform react-transform-hmr react-transform-catch-errors`
1. `npm rm --save-dev babel-plugin-react-transform react-transform-hmr react-transform-catch-errors babel-preset-meteor`.
1. Remove `meteor` from your `.babelrc` presets. Meteor includes it for you automatically.
1. Remove the entire `react-transform` section from your `client/.babelrc` env block (or delete the file completely if you never modified it)
1. Remove your `package.json`'s `ecmascript-hot` section completely, it's no longer used.

Expand Down
54 changes: 18 additions & 36 deletions docs/babelrc.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,19 @@ it. Pay attention to existing plugins & presets, such as `babel-root-slash-impo
and `es2015` -- you don't want either! All this features are handled already -
correctly - by the `meteor` preset.

If you don't already have a `.babelrc`, one will be created for you. Otherwise,
ensure that it contains at least the following (unless you know what you're doing):
If you're upgrading from an earlier release, you should remove the `meteor`
preset from your `.babelrc` and `npm rm --save-dev babel-preset-meteor`.
Meteor includes this for you.

In general, your `.babelrc` should be *empty* aside from plugins and presets
that *you know you need* (e.g. `react-hot-loader`):

```js
{
"presets": [ "meteor" ]
"plugins": [ "react-hot-loader/babel" ]
}
```

Install the Meteor preset if you don't have it installed already:

```sh
$ meteor npm install --save-dev babel-preset-meteor
```

## Adding presets and plugins

Please understand that babel presets and plugins modify your code in transit.
Expand Down Expand Up @@ -58,27 +56,12 @@ proposals that are subject to change so should be used **with extreme caution**.
Code that works *now* with these plugins may break on future releases or once
the spec is finalized.

## Client and server-specific .babelrc

If `/server/.babelrc` or `/client/.babelrc` exist, they'll be used
preferentially for these architectures. We suggest you extend your
root `.babelrc` and only keep target-specific config in these files, e.g.
## Client/server and per-directory .babelrc

**/client/.babelrc:**

```js
{
"extends": "../.babelrc",

"env": {
"development": {
"plugins": [
"some-special-plugin-that-you-only-want-on-the-client-and-in-devel"
]
}
}
}
```
Meteor 1.3.3's babel support will look for a `.babelrc` in the directory of
the file being transpiled, and in every parent directory up to your project
root. You can leverage this fact to create a a `client/.babelrc` which will
be used for `client/**/files.js`:

## Troubleshooting

Expand Down Expand Up @@ -127,14 +110,12 @@ on these features when the respective spec is updated or finalized.
For more information see https://babeljs.io/docs/plugins/#stage-x-experimental-presets.

```sh
$ meteor npm install --save-dev babel-preset-es2015 babel-preset-stage0
$ meteor npm install --save-dev babel-preset-stage0

```js
{
"presets": [
"meteor",
"stage-0",
"react",
"stage-0"
],
"plugins": [
"transform-decorators-legacy"
Expand All @@ -148,12 +129,13 @@ $ meteor npm install --save-dev babel-preset-es2015 babel-preset-stage0

And similar errors.

This can occur due to your load order in your `.babelrc`. For a straight
Meteor experience, you should just have:
This can occur due to your load order in your `.babelrc`. Make sure you don't
have any presets that you don't need or that conflict with Meteor's own
`meteor` preset, like `es2015` (you don't want or need it). Try an empty
`.babelrc` like:

```js
{
"presets": [ "meteor" ]
}
```

Expand Down
2 changes: 1 addition & 1 deletion packages/ecmascript-hot/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Package.onUse(function (api) {
api.imply('babel-runtime');
api.imply('promise');

api.use('gadicc:[email protected].1');
api.use('gadicc:[email protected].2');
api.imply('gadicc:hot');

api.use('sanjo:[email protected]_1', 'server');
Expand Down
20 changes: 15 additions & 5 deletions packages/hot-build/.npm/package/npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/hot/package.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package.describe({
name: 'gadicc:hot',
version: '2.0.0-beta.1',
version: '2.0.0-beta.2',
summary: 'React hotloading, used by gadicc:ecmascript-hot.',
git: 'https://github.com/gadicc/meteor-react-hotloader',
documentation: '../README.md'
Expand All @@ -14,7 +14,7 @@ Npm.depends({
*/

Package.onUse(function(api) {
api.versionsFrom('1.3-rc.4');
api.versionsFrom('1.3.3-beta.1');

api.use('modules');
api.use('ecmascript');
Expand Down
2 changes: 1 addition & 1 deletion packages/node-modules-hot/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ Package.registerBuildPlugin({

Package.onUse(function(api) {
api.use('isobuild:[email protected]');
api.use('gadicc:[email protected].1');
api.use('gadicc:[email protected].2');
});

0 comments on commit 5e73363

Please sign in to comment.