Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Commit

Permalink
update babel-compiler to 5.6.15
Browse files Browse the repository at this point in the history
  • Loading branch information
MacRusher committed Jul 13, 2015
1 parent 199d354 commit f967b8a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 25 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

## 0.2

### 0.2.1

- Update babel-compiler to 5.6.15

### 0.2.0

- Switch to MDG Babel compiler package

## 0.1

- Change name to `universe:modules`
- Add support for packages

42 changes: 20 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@

You can read more about new JavaScript modules and see some examples at [JSModules.io](http://jsmodules.io) or [2ality](http://www.2ality.com/2014/09/es6-modules-final.html)

This package add new file extensions: `*.import.js` and `*.import.jsx`.
**This package add new file extensions:** `*.import.js` and `*.import.jsx`.
These files will be bundled with your Meteor app, but won't get executed until you request them.
This is somewhat similar to `*.import.less` files, that you can include inside normal `*.less` files.

API is compatible with new ES6 modules spec.
Under the hood [Babel.js](https://babeljs.io) and [SystemJS](https://github.com/systemjs/systemjs) take care of everything,
so you can use modules today!
All `*.import.js` files **have full ES6 support** provided by Meteor's Babel.js implementation.
`*.import.jsx` files also have JSX/React support.

All `*.import.js` files have ES6 support provided by Meteor's Babel.js implementation.
`*.import.jsx` files have also JSX/React support.
API is compatible with new ES6 modules spec.
Under the hood [Babel.js](https://babeljs.io) and [SystemJS](https://github.com/systemjs/systemjs) take care of everything, so you can use modules today!

This package also adds SystemJS to your project.
This package adds SystemJS to your project.

## Benefits of this approach

Expand All @@ -24,7 +23,7 @@ Universe Modules allows you to write your code in modular way, something that Me
This is especially useful when working with React - creating lots of new components don't have to pollute global namespace.
Also code is much simpler to reason about, and syntax is more friendly.

Code you write inside `*.import.js(x)` is compiled using Babel, so you can also use other ES2015 features!
Code you write inside `*.import.js(x)` is compiled using Babel, so **you can also use other ES2015 features!**

#### Roadmap

Expand All @@ -40,7 +39,19 @@ Just add this package to your app:

## Usage

### Basic usage inside app
### Complete app example

If you want to see it in action, see our todo example app:

- Source code: https://github.com/vazco/demo_modules
- Live demo: http://universe-modules-demo.meteor.com

You can also check out great `meteor-react-example` app by [optilude](https://github.com/optilude).

- Source code: https://github.com/optilude/meteor-react-example/tree/modules


### Basic usage

Create file `firstComponent.import.js`:

Expand Down Expand Up @@ -82,19 +93,6 @@ This assumes that file `finalComponent.import.js` is inside main app directory.
If you have it somewhere else you have to provide full path relative to meteor app directory,
e.g. `client/components/finalComponent`.

### Complete app example

If you want to see it in action, we created a todo example app.

Source code: https://github.com/vazco/demo_modules
Live demo: http://universe-modules-demo.meteor.com

This demo make use of:

- core `react` package
- `universe:react-bootstrap`
- `meteorhacks:flow-router` and `kadira:react-layout`


### Loading modules from packages

Expand Down
2 changes: 1 addition & 1 deletion build-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var handler = function (compileStep) {

var extraWhitelist = ['es6.modules'];
if(path[1] === 'jsx'){
extraWhitelist.push('react')
extraWhitelist.push('react');
}

try {
Expand Down
4 changes: 2 additions & 2 deletions package.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Package.describe({
name: 'universe:modules',
version: '0.2.0',
version: '0.2.1',
summary: 'Use ES6 / ES2015 modules in Meteor with SystemJS!',
git: 'https://github.com/vazco/universe-modules',
documentation: 'README.md'
});

Package.registerBuildPlugin({
name: 'UniverseModulesBuilder',
use: ['babel-compiler@5.4.7'],
use: ['babel-compiler@5.6.15'],
sources: ['build-plugin.js']
});

Expand Down

0 comments on commit f967b8a

Please sign in to comment.