Skip to content

Commit

Permalink
fix(ngx-translate): updated build to fix "Unexpected token import err…
Browse files Browse the repository at this point in the history
…ors"

BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config.
I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0.
The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. 
It should also fix the "Unexpected token import errors" that some people were experiencing.
Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version.

Closes #724, Fixes #581
  • Loading branch information
ocombe committed Nov 23, 2017
1 parent b51544d commit 8dd86e6
Show file tree
Hide file tree
Showing 41 changed files with 2,731 additions and 1,156 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ npm-debug.log
coverage
*.metadata.json
bundles
build
dist

#################
## JetBrains
Expand Down
23 changes: 6 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
language: node_js

cache: yarn

sudo: false

notifications:
email: false

node_js:
- '7'

branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"

- '8'
before_install:
- export CHROME_BIN=chromium-browser

before_script:
- npm prune

after_success:
- npm run semantic-release

- yarn semantic-release
branches:
except:
- /^v\d+\.\d+\.\d+$/
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sh -e /etc/init.d/xvfb start
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# @ngx-translate/core [![Build Status](https://travis-ci.org/ngx-translate/core.svg?branch=master)](https://travis-ci.org/ngx-translate/core) [![npm version](https://img.shields.io/npm/v/@ngx-translate/core.svg)](https://www.npmjs.com/package/@ngx-translate/core)

The internationalization (i18n) library for Angular 2+.
The internationalization (i18n) library for Angular.

Simple example using ngx-translate: https://plnkr.co/edit/WccVZSBM0rUgq2sXSUbe?p=preview

Get the complete changelog here: https://github.com/ngx-translate/core/releases

**This is the documentation for the 6.x version, if you're using 5.x or less, refer to [this document](https://github.com/ngx-translate/core/blob/fb02ca5920aae405048ebab50e09db67d5bf12a2/README.md).**
**This is the documentation for the 6+ version, if you're using 5.x or less, refer to [this document](https://github.com/ngx-translate/core/blob/fb02ca5920aae405048ebab50e09db67d5bf12a2/README.md).**

* [Installation](#installation)
* [Usage](#usage)
Expand Down
2 changes: 1 addition & 1 deletion config/webpack.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ module.exports = {
// fix the warning in ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
new webpack.ContextReplacementPlugin(
/angular(\\|\/)core(\\|\/)@angular/,
helpers.root('./src')
helpers.root('src')
),

new LoaderOptionsPlugin({
Expand Down
4 changes: 0 additions & 4 deletions examples/systemjs/.gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions examples/systemjs/LICENSE

This file was deleted.

6 changes: 0 additions & 6 deletions examples/systemjs/i18n/en.json

This file was deleted.

6 changes: 0 additions & 6 deletions examples/systemjs/i18n/fr.json

This file was deleted.

24 changes: 0 additions & 24 deletions examples/systemjs/index.html

This file was deleted.

43 changes: 0 additions & 43 deletions examples/systemjs/package.json

This file was deleted.

28 changes: 0 additions & 28 deletions examples/systemjs/src/app.component.ts

This file was deleted.

17 changes: 0 additions & 17 deletions examples/systemjs/src/app.module.ts

This file was deleted.

5 changes: 0 additions & 5 deletions examples/systemjs/src/bootstrap.ts

This file was deleted.

54 changes: 0 additions & 54 deletions examples/systemjs/systemjs.config.js

This file was deleted.

18 changes: 0 additions & 18 deletions examples/systemjs/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions examples/webpack/.gitignore

This file was deleted.

21 changes: 0 additions & 21 deletions examples/webpack/LICENSE

This file was deleted.

7 changes: 0 additions & 7 deletions examples/webpack/i18n/en.json

This file was deleted.

7 changes: 0 additions & 7 deletions examples/webpack/i18n/fr.json

This file was deleted.

13 changes: 0 additions & 13 deletions examples/webpack/index.html

This file was deleted.

Loading

0 comments on commit 8dd86e6

Please sign in to comment.