Skip to content

Commit 02287d8

Browse files
committed
delete es6-shim
1 parent 2775786 commit 02287d8

7 files changed

+44
-6
lines changed

.npmignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ test
99
docs
1010
READMEAPI.md
1111
gulpfile.js
12-
TESTS-Firefox_59.0.0_(Linux_0.0.0).xml
12+
TESTS-Firefox_59.0.0_(Linux_0.0.0).xml
13+
tsconfig.json

README.md

+35
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,41 @@ describe('Component', () => {
261261
})
262262
```
263263

264+
## Make compatible with ES5 browsers
265+
266+
tsconfig.json:
267+
268+
```json
269+
{
270+
"compilerOptions": {
271+
"target": "es5",
272+
"module": "commonjs",
273+
"sourceMap": true,
274+
"strict": true,
275+
"emitDecoratorMetadata": true,
276+
"experimentalDecorators": true,
277+
"declaration": true,
278+
"outDir": "./lib",
279+
"rootDir": ".",
280+
"jsx": "react",
281+
"jsxFactory": "h"
282+
},
283+
"include": [
284+
"./src",
285+
"./example"
286+
],
287+
"exclude": [
288+
"node_modules"
289+
]
290+
}
291+
```
292+
293+
In your code:
294+
```typescript
295+
import 'es6-shim'; // or every polyfill which you need
296+
import { srouter, ConfigRouters } from 'spiel-client';
297+
```
298+
264299
## Run Spiel Client tests
265300

266301
`npm test`

gulpfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ gulp.task("typedoc", function() {
55
.src(["src/**/*.ts"])
66
.pipe(typedoc({
77
module: "commonjs",
8-
target: "es5",
8+
target: "es6",
99
out: "docs/",
1010
name: "Spiel Client",
1111
readme: "READMEAPI.md"

karma.conf.js

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ module.exports = function(config) {
2222
karmaTypescriptConfig: {
2323
compilerOptions: {
2424
"target": "es5",
25+
"lib": ["es6", "dom"],
2526
"module": "commonjs",
2627
"strict": true,
2728
"emitDecoratorMetadata": true,

package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "spiel-client",
3-
"version": "0.4.1",
3+
"version": "0.4.3",
44
"description": "Spiel Framework Frontend",
55
"main": "lib/src/index.js",
66
"types": "lib/src/index.d.ts",
@@ -25,10 +25,8 @@
2525
},
2626
"homepage": "https://github.com/spiel-framework/spiel-client#readme",
2727
"dependencies": {
28-
"@types/es6-shim": "^0.31.35",
2928
"@types/navigo": "^7.0.0",
3029
"@types/reflect-metadata": "0.0.5",
31-
"es6-shim": "^0.35.3",
3230
"injection-js": "^2.2.1",
3331
"navigo": "^7.0.0",
3432
"picodom": "^1.0.2",

src/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import 'es6-shim';
21
export { srouter, Router} from './router';
32
export { patch, h, Component, VNode } from "picodom";
43
export { render } from "./render";

tsconfig.json

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4+
"lib": [
5+
"es6",
6+
"dom"
7+
],
48
"module": "commonjs",
59
"strict": true,
610
"emitDecoratorMetadata": true,

0 commit comments

Comments
 (0)