Skip to content

Commit

Permalink
Merge pull request #52 from togostanza/es5
Browse files Browse the repository at this point in the history
Keep compatible with IE 11
  • Loading branch information
darashi authored Jan 18, 2019
2 parents 7261c5c + e507a0b commit a08e678
Show file tree
Hide file tree
Showing 17 changed files with 1,799 additions and 107 deletions.
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
bindata.go
/provider/assets/components
/dist
/provider/assets/components/
/provider/assets/js/
/dist/
/node_modules/
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
language: go
sudo: false
go:
- '1.10'
go: '1.10'
install:
- npm install -g bower
- nvm install --lts
- npm ci
- go get github.com/jteeuwen/go-bindata/...
- go get github.com/laher/goxc
env:
- TS_VERSION=${TRAVIS_TAG#v}
script:
- bower install
- npm run build
- go generate ./...
- goxc -d dist -pv "$TS_VERSION"
cache: npm
deploy:
provider: releases
skip_cleanup: true
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
default: install

install:
bower install
npm run build
go generate ./...
go install .
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ See [Getting Started](doc/Getting-Started.md) and [Reference](doc/Reference.md).
TODO

```sh
$ npm install -g bower
$ npm install
$ go get -u github.com/jteeuwen/go-bindata/...
$ make
```
11 changes: 11 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
presets: [
[
'@babel/preset-env', {
targets: {
ie: '11'
}
}
]
]
};
7 changes: 0 additions & 7 deletions bower.json

This file was deleted.

9 changes: 9 additions & 0 deletions copy-webcomponentsjs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -eu

DESTDIR='provider/assets/components/webcomponentsjs'

rm -rf $DESTDIR
mkdir -p $DESTDIR
cp node_modules/@webcomponents/webcomponentsjs/webcomponents-*{.js,.js.map} $DESTDIR
2 changes: 1 addition & 1 deletion doc/Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ Thus we need polyfills, a kind of compatibility layer, provided by https://githu
Include the following line in `<head></head>` of your html file:

```html
<script src="https://example.org/stanza/assets/components/webcomponentsjs/webcomponents-loader.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@1.3.0/webcomponents-loader.js" crossorigin></script>
```

### Import stanza
Expand Down
Loading

0 comments on commit a08e678

Please sign in to comment.