Skip to content

Commit

Permalink
version upped & added support for export from
Browse files Browse the repository at this point in the history
  • Loading branch information
LucHermkens committed Nov 4, 2019
1 parent 7c4889a commit 1155c44
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.1.0] - 2019-11-04
### Added
- Support for [Export From](https://babeljs.io/docs/en/next/babel-plugin-proposal-export-default-from.html)
- Tests for `export ... from`
- More keywords to [package.json]

## [2.0.1] - 2019-11-03
### Changed
- "React Native" to "React or React Native" in [README.md]
Expand Down Expand Up @@ -59,6 +65,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[Fooxly]: https://www.fooxly.com/
[pnpm]: https://github.com/pnpm/pnpm

[2.1.0]: https://github.com/Fooxly/babel-preset/compare/v2.0.1...v2.1.0
[2.0.1]: https://github.com/Fooxly/babel-preset/compare/v2.0.0...v2.0.1
[2.0.0]: https://github.com/Fooxly/babel-preset/compare/v1.0.3...v2.0.0
[1.0.3]: https://github.com/Fooxly/babel-preset/compare/v1.0.2...v1.0.3
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ The default [Babel](https://babeljs.io/) preset for [Fooxly](https://www.fooxly.
- [@babel/preset-env](https://www.npmjs.com/package/@babel/preset-env)
- [@babel/plugin-proposal-class-properties](https://www.npmjs.com/package/@babel/plugin-proposal-class-properties)
- [@babel/plugin-proposal-optional-chaining](https://www.npmjs.com/package/@babel/plugin-proposal-optional-chaining)
- [@babel/plugin-proposal-export-default-from](https://www.npmjs.com/package/@babel/plugin-proposal-export-default-from)
- [babel-plugin-module-resolver](https://www.npmjs.com/package/babel-plugin-module-resolver) (configured for all `.js`, `.jsx` & `.json` files in `./src`)

## :heart:  Support us
Expand Down
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var envPreset = require('@babel/preset-env')
var classProperties = require('@babel/plugin-proposal-class-properties')
var optionalChaining = require('@babel/plugin-proposal-optional-chaining')
var exportFrom = require('@babel/plugin-proposal-export-default-from')
var moduleResolver = require('babel-plugin-module-resolver')

module.exports = function (api) {
Expand All @@ -11,6 +12,7 @@ module.exports = function (api) {
useBuiltIns: 'usage'
}]],
plugins: [
exportFrom,
classProperties,
optionalChaining,
[moduleResolver, {
Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fooxly/babel-preset",
"version": "2.0.1",
"version": "2.1.0",
"description": "The default Babel preset for Fooxly projects.",
"keywords": [
"fooxly",
Expand All @@ -12,6 +12,9 @@
"module",
"resolver",
"plugin",
"export",
"default",
"from",
"src"
],
"author": "Fooxly <hello@fooxly.com> (https://developers.fooxly.com)",
Expand All @@ -34,6 +37,7 @@
},
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-export-default-from": "^7.5.2",
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
"@babel/preset-env": "^7.6.3",
"babel-plugin-module-resolver": "^3.2.0",
Expand Down
10 changes: 10 additions & 0 deletions test/snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ require("core-js/modules/es.promise");
require("core-js/modules/web.timers");
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "testExportFrom", {
enumerable: true,
get: function get() {
return _test["default"];
}
});
require("regenerator-runtime/runtime");
var _test = _interopRequireDefault(require("./src/components/test"));
Expand Down
2 changes: 2 additions & 0 deletions test/source.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module.exports = `
import testAbsoluteImports from 'components/test'
export testExportFrom from 'components/test'
const testOptionalChaining = ({ foo: { bar: 'test' } }).foo?.bar
class testClassProperties {
Expand Down
15 changes: 15 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,14 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-dynamic-import" "^7.2.0"

"@babel/plugin-proposal-export-default-from@^7.5.2":
version "7.5.2"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-default-from/-/plugin-proposal-export-default-from-7.5.2.tgz#2c0ac2dcc36e3b2443fead2c3c5fc796fb1b5145"
integrity sha512-wr9Itk05L1/wyyZKVEmXWCdcsp/e185WUNl6AfYZeEKYaUPPvHXRDqO5K1VH7/UamYqGJowFRuCv30aDYZawsg==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-export-default-from" "^7.2.0"

"@babel/plugin-proposal-json-strings@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317"
Expand Down Expand Up @@ -309,6 +317,13 @@
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"

"@babel/plugin-syntax-export-default-from@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-export-default-from/-/plugin-syntax-export-default-from-7.2.0.tgz#edd83b7adc2e0d059e2467ca96c650ab6d2f3820"
integrity sha512-c7nqUnNST97BWPtoe+Ssi+fJukc9P9/JMZ71IOMNQWza2E+Psrd46N6AEvtw6pqK+gt7ChjXyrw4SPDO79f3Lw==
dependencies:
"@babel/helper-plugin-utils" "^7.0.0"

"@babel/plugin-syntax-json-strings@^7.2.0":
version "7.2.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470"
Expand Down

0 comments on commit 1155c44

Please sign in to comment.