Skip to content

Commit

Permalink
Removed es5 shim function and support for ie < 10 (#3722)
Browse files Browse the repository at this point in the history
* removed es5 part
* removed json shim
* removed node 5
* removed node 5
  • Loading branch information
asturur authored Feb 20, 2017
1 parent f85bdc7 commit 214a169
Show file tree
Hide file tree
Showing 10 changed files with 5 additions and 1,991 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ language: node_js
node_js:
- "7"
- "6"
- "5"
- "4"
env:
- CXX=g++-4.9
Expand Down
26 changes: 5 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Fabric.js allows you to easily create simple shapes like rectangles, circles, tr
- Encapsulated in one object
- No browser sniffing for critical functionality
- Runs under ES5 strict mode
- Runs on a server under [Node.js](http://nodejs.org/) (0.8, 0.10, 0.11, 0.12) (see [Node.js limitations](https://github.com/kangax/fabric.js/wiki/Fabric-limitations-in-node.js))
- Runs on a server under [Node.js](http://nodejs.org/) (stable releases and latest of current) (see [Node.js limitations](https://github.com/kangax/fabric.js/wiki/Fabric-limitations-in-node.js))
- Follows [Semantic Versioning](http://semver.org/)

### Supported browsers
Expand All @@ -59,23 +59,7 @@ Fabric.js allows you to easily create simple shapes like rectangles, circles, tr
- Safari 3+
- Opera 9.64+
- Chrome (all versions)
- IE9, IE10, IE11, Edge

#### With help of [Explorer Canvas](http://code.google.com/p/explorercanvas/)

- IE8 (incomplete — about 17 failing tests at the moment)
- IE7,6 (incomplete - about 27 failing tests at the moment)

See [Fabric limitations in Old IE](https://github.com/kangax/fabric.js/wiki/Fabric-limitations-in-oldIE).

Note: to properly make old IE work, you will need to add [html5shiv](https://github.com/aFarkas/html5shiv) as a conditional comment in your HEAD, particularly `html5shiv-printshiv.js` to allow for children elements:

```
<!--[if lt IE 9]>
<script src="path/to/your/html5shiv-printshiv.js"></script>
<![endif]-->
```
Remember to add [Explorer Canvas](http://code.google.com/p/explorercanvas/) as well.
- IE10, IE11, Edge

You can [run automated unit tests](http://fabricjs.com/test/unit/) right in the browser.

Expand Down Expand Up @@ -194,7 +178,7 @@ Also see [official 4-part intro series](http://fabricjs.com/articles), [presenta
These are the optional modules that could be specified for inclusion, when building custom version of fabric:

- **text** — Adds support for static text (`fabric.Text`)
- **itext** — Adds support for interactive text (`fabric.IText`)
- **itext** — Adds support for interactive text (`fabric.IText`, `fabric.Textbox`)
- **serialization** — Adds support for `loadFromJSON`, `loadFromDatalessJSON`, and `clone` methods on `fabric.Canvas`
- **interaction** — Adds support for interactive features of fabric — selecting/transforming objects/groups via mouse/touch devices.
- **parser** — Adds support for `fabric.parseSVGDocument`, `fabric.loadSVGFromURL`, and `fabric.loadSVGFromString`
Expand All @@ -211,7 +195,6 @@ Additional flags for build script are:
- **requirejs** — Makes fabric requirejs AMD-compatible in `dist/fabric.js`. *Note:* an unminified, requirejs-compatible version is always created in `dist/fabric.require.js`
- **no-strict** — Strips "use strict" directives from source
- **no-svg-export** — Removes svg exporting functionality
- **no-es5-compat** - Removes ES5 compat methods (Array.prototype.*, String.prototype.*, Function.prototype.*)
- **sourcemap** - Generates a sourceMap file and adds the `sourceMappingURL` (only if uglifyjs is used) to `dist/fabric.min.js`

For example:
Expand Down Expand Up @@ -255,7 +238,7 @@ For example:

### Staying in touch

Follow [@fabric.js](http://twitter.com/fabricjs) or [@kangax](http://twitter.com/kangax) on twitter.
Follow [@fabric.js](http://twitter.com/fabricjs), [@kangax](http://twitter.com/kangax) or or [@AndreaBogazzi](http://twitter.com/AndreaBogazzi) on twitter.

Questions, suggestions — [fabric.js on Google Groups](http://groups.google.com/group/fabricjs).

Expand All @@ -273,6 +256,7 @@ Get help in Fabric's IRC channel — irc://irc.freenode.net/#fabric.js
- [Maxim "hakunin" Chernyak](http://twitter.com/hakunin) for ideas, and help with various parts of the library throughout its life
- [Sergey Nisnevich](http://nisnya.com) for help with geometry logic
- [Stefan Kienzle](https://twitter.com/kienzle_s) for help with bugs, features, documentation, github issues
- [Andrea Bogazzi](https://twitter.com/AndreaBogazzi) for help with bugs, new features, documentation, github issues
- [And all the other GitHub contributors](https://github.com/kangax/fabric.js/graphs/contributors)

### MIT License
Expand Down
17 changes: 0 additions & 17 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ var mininfierCmd;

var noStrict = 'no-strict' in buildArgsAsObject;
var noSVGExport = 'no-svg-export' in buildArgsAsObject;
var noES5Compat = 'no-es5-compat' in buildArgsAsObject;
var requirejs = 'requirejs' in buildArgsAsObject ? 'requirejs' : false;
var sourceMap = 'sourcemap' in buildArgsAsObject;

Expand Down Expand Up @@ -69,7 +68,6 @@ var distFileContents =
(modulesToExclude.length ? (' exclude=' + modulesToExclude.join(',')) : '') +
(noStrict ? ' no-strict' : '') +
(noSVGExport ? ' no-svg-export' : '') +
(noES5Compat ? ' no-es5-compat' : '') +
(requirejs ? ' requirejs' : '') +
(sourceMap ? ' sourcemap' : '') +
' minifier=' + minifier +
Expand Down Expand Up @@ -98,9 +96,6 @@ function appendFileContents(fileNames, callback) {
if (noSVGExport) {
strData = strData.replace(/\/\* _TO_SVG_START_ \*\/[\s\S]*?\/\* _TO_SVG_END_ \*\//g, '');
}
if (noES5Compat) {
strData = strData.replace(/\/\* _ES5_COMPAT_START_ \*\/[\s\S]*?\/\* _ES5_COMPAT_END_ \*\//g, '');
}
if (noSVGImport) {
strData = strData.replace(/\/\* _FROM_SVG_START_ \*\/[\s\S]*?\/\* _FROM_SVG_END_ \*\//g, '');
}
Expand All @@ -119,16 +114,6 @@ function ifSpecifiedInclude(moduleName, fileName) {
return ((isInIncludedList || includeAllModules) && !isInExcludedList) ? fileName : '';
}

function ifSpecifiedDependencyInclude(included, excluded, fileName) {
return (
(
(modulesToInclude.indexOf(included) > -1 || includeAllModules) &&
(modulesToExclude.indexOf(excluded) == -1))
? fileName
: ''
);
}

function ifSpecifiedAMDInclude(amdLib) {
var supportedLibraries = ['requirejs'];
if (supportedLibraries.indexOf(amdLib) > -1) {
Expand All @@ -140,7 +125,6 @@ function ifSpecifiedAMDInclude(amdLib) {
var filesToInclude = [
'HEADER.js',

ifSpecifiedDependencyInclude('serialization', 'json', 'lib/json2.js'),
ifSpecifiedInclude('gestures', 'lib/event.js'),

'src/mixins/observable.mixin.js',
Expand All @@ -151,7 +135,6 @@ var filesToInclude = [
'src/util/lang_array.js',
'src/util/lang_object.js',
'src/util/lang_string.js',
'src/util/lang_function.js',
'src/util/lang_class.js',
'src/util/dom_event.js',
'src/util/dom_style.js',
Expand Down
1 change: 0 additions & 1 deletion build.sh

This file was deleted.

19 changes: 0 additions & 19 deletions build_all

This file was deleted.

Loading

0 comments on commit 214a169

Please sign in to comment.