Skip to content

Commit 84eb4d0

Browse files
authored
TMB-112 | Scalable React Components (#12)
* SVGO options * New script to upload to s3 * 1.1.1 * Minor fix * set svg width and height to 100%
1 parent f2cf64e commit 84eb4d0

7 files changed

+50
-56
lines changed

.svgo.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins:
2+
- removeViewBox: false
3+
- removeDimensions: true

CHANGELOG.md

+30-13
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
99

10-
## [v1.1.0](https://github.com/oscarfonts/TMB-Icons/compare/v1.1.0...v1.1.0)
10+
## [v1.1.1](https://github.com/geomatico/TMB-Icons/compare/v1.1.0...v1.1.1)
1111

1212
### Merged
1313

14-
- TMB-68 | Add missing L10N and L10S icon combiations for link stations [`#9`](https://github.com/oscarfonts/TMB-Icons/pull/9)
15-
- 1.0.0 [`#7`](https://github.com/oscarfonts/TMB-Icons/pull/7)
16-
- update spritezero-cli [`#1`](https://github.com/oscarfonts/TMB-Icons/pull/1)
14+
- Script and npm run conf to upload to tmb s3 on every release [`#10`](https://github.com/geomatico/TMB-Icons/pull/10)
1715

1816
### Commits
1917

20-
- First commit. SVG icons and MapboxGL sprites. [`e25efec`](https://github.com/oscarfonts/TMB-Icons/commit/e25efec08a423be8f00852c3ee55e9fc795dd3b0)
21-
- Optimize SVG logos to workaround rendering issues on mpbox sprite generation [`4691bd2`](https://github.com/oscarfonts/TMB-Icons/commit/4691bd205a7d8efe5685727fdd99fc8e11d156b2)
22-
- Include icons for link stations [`18ddfea`](https://github.com/oscarfonts/TMB-Icons/commit/18ddfea57ff6a3f6fed2355e05b986608b820c22)
23-
- Added icons for bus alterations: parada-anulada, parada-actual, parada-nova [`da96631`](https://github.com/oscarfonts/TMB-Icons/commit/da966316f7cae52362ac4a7c77f6b31ab2a0a493)
24-
- Renamed metro => acces, add elevator and acces-elevator, fixed some icon sizes [`dd4c8f7`](https://github.com/oscarfonts/TMB-Icons/commit/dd4c8f7f4bddcd35e92aa267aa0ab4a35ffa8431)
25-
- Icones línies bus H, V, D i convencionals [`7e396e3`](https://github.com/oscarfonts/TMB-Icons/commit/7e396e36f6e45a871b0a00767566bb9346909214)
26-
- Added L9S link stations [`e5ff2a9`](https://github.com/oscarfonts/TMB-Icons/commit/e5ff2a932c78240b5cb5f2e63c601ca28e3e5e09)
27-
- Icones retocades línies bus [`7dc307d`](https://github.com/oscarfonts/TMB-Icons/commit/7dc307d274fa5d580aec1486b64a42e9062583d5)
28-
- Generate PNG icons [`52aba33`](https://github.com/oscarfonts/TMB-Icons/commit/52aba330225b8d1a9b43dd0312b8ba78b719397d)
18+
- New script to upload to s3 [`c6634b2`](https://github.com/geomatico/TMB-Icons/commit/c6634b271e9b6fa041562bdfd00d327500c65eca)
19+
- SVGO options [`ff0ead4`](https://github.com/geomatico/TMB-Icons/commit/ff0ead481281cb409d54d6d3c94a192e9a12f406)
20+
21+
## [v1.1.0](https://github.com/geomatico/TMB-Icons/compare/v1.0.0...v1.1.0) - 2020-11-18
22+
23+
### Merged
24+
25+
- TMB-68 | Add missing L10N and L10S icon combiations for link stations [`#9`](https://github.com/geomatico/TMB-Icons/pull/9)
26+
- 1.0.0 [`#7`](https://github.com/geomatico/TMB-Icons/pull/7)
27+
28+
## v1.0.0 - 2020-11-17
29+
30+
### Merged
31+
32+
- update spritezero-cli [`#1`](https://github.com/geomatico/TMB-Icons/pull/1)
33+
34+
### Commits
35+
36+
- Release flow and reorganize repo [`1b5500a`](https://github.com/geomatico/TMB-Icons/commit/1b5500ab2ef61eff2a7175f5e1a5dd9deb1573e2)
37+
- First commit. SVG icons and MapboxGL sprites. [`e25efec`](https://github.com/geomatico/TMB-Icons/commit/e25efec08a423be8f00852c3ee55e9fc795dd3b0)
38+
- Optimize SVG logos to workaround rendering issues on mpbox sprite generation [`4691bd2`](https://github.com/geomatico/TMB-Icons/commit/4691bd205a7d8efe5685727fdd99fc8e11d156b2)
39+
- Include icons for link stations [`18ddfea`](https://github.com/geomatico/TMB-Icons/commit/18ddfea57ff6a3f6fed2355e05b986608b820c22)
40+
- Added icons for bus alterations: parada-anulada, parada-actual, parada-nova [`da96631`](https://github.com/geomatico/TMB-Icons/commit/da966316f7cae52362ac4a7c77f6b31ab2a0a493)
41+
- Renamed metro => acces, add elevator and acces-elevator, fixed some icon sizes [`dd4c8f7`](https://github.com/geomatico/TMB-Icons/commit/dd4c8f7f4bddcd35e92aa267aa0ab4a35ffa8431)
42+
- Icones línies bus H, V, D i convencionals [`7e396e3`](https://github.com/geomatico/TMB-Icons/commit/7e396e36f6e45a871b0a00767566bb9346909214)
43+
- Added L9S link stations [`e5ff2a9`](https://github.com/geomatico/TMB-Icons/commit/e5ff2a932c78240b5cb5f2e63c601ca28e3e5e09)
44+
- Icones retocades línies bus [`7dc307d`](https://github.com/geomatico/TMB-Icons/commit/7dc307d274fa5d580aec1486b64a42e9062583d5)
45+
- Generate PNG icons [`52aba33`](https://github.com/geomatico/TMB-Icons/commit/52aba330225b8d1a9b43dd0312b8ba78b719397d)

README.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22

33
## Usage
44

5-
https://geomatico.github.io/TMB-Icons/
5+
* Latest Icons: https://tmb-barcelona.github.io/TMB-Icons/
6+
* TMB S3 CDN Examples:
7+
* Index: https://cdn.tmb.cat/icons/v1.1.1/static/index.html
8+
* SVGs: https://cdn.tmb.cat/icons/v1.1.1/static/svg/L1.svg
9+
* PNGs: https://cdn.tmb.cat/icons/v1.1.1/static/png/64/L1.png
10+
* Mapbox Sprites: https://cdn.tmb.cat/icons/v1.1.1/static/mapboxgl/sprites.json
11+
612

713
## Origin
814

@@ -40,6 +46,8 @@ To make a new version of library, we need to do it from master branch. For examp
4046
```bash
4147
npm version 0.0.2
4248
npm release
49+
npm run gh-pages
50+
npm run upload-to-s3
4351
```
4452

4553
This will do:

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tmb-icons",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "Icons for TMB-Barcelona",
55
"main": "dist/index.js",
66
"files": [
@@ -12,13 +12,15 @@
1212
"svg2png": "cd scripts && ./svg2png.js",
1313
"mapbox": "mkdir -p static/mapboxgl && spritezero static/mapboxgl/sprites svg/ && spritezero --retina static/mapboxgl/sprites@2x svg/",
1414
"index": "cp -r svg static/ && cd scripts && ./generate-index.js",
15-
"react": "svgr -d src/react/ svg/",
15+
"react": "svgr --svg-props width='100%',height='100%' -d src/react/ svg/",
1616
"build-static": "npm run svg2png && npm run mapbox && npm run index",
1717
"build-react": "npm run react && webpack --env prod",
1818
"gh-pages": "npm run build-static && gh-pages -d static",
1919
"version": "npm run build-static && npm run build-react && auto-changelog -p && git add CHANGELOG.md",
2020
"release": "git push --follow-tags && npm pack && gh-release -y -a *.tgz && npm run upload-to-s3",
21-
"upload-to-s3": "cd scripts && ./upload-to-s3.js"
21+
"s3-static": "aws s3 cp static s3://cdn.tmb.cat/icons/v$npm_package_version/static/ --recursive --acl public-read",
22+
"s3-dist": "aws s3 cp dist s3://cdn.tmb.cat/icons/v$npm_package_version/dist/ --recursive --acl public-read",
23+
"upload-to-s3": "npm run s3-static && npm run s3-dist"
2224
},
2325
"auto-changelog": {
2426
"template": "keepachangelog",

scripts/index-template.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<div class="container">
3535
<div class="navbar-header">
3636
<a class="navbar-brand" href="#">TMB-Icons</a>
37-
<p class="navbar-text navbar-right"><a class="navbar-link" href="https://github.com/geomatico/TMB-Icons/releases/{{version}}">{{version}}</a></p>
37+
<p class="navbar-text navbar-right"><a class="navbar-link" href="https://github.com/TMB-Barcelona/TMB-Icons/releases/{{version}}">{{version}}</a></p>
3838
</div>
3939
</div>
4040
</nav>
@@ -52,7 +52,7 @@ <h1>PNG Icons (64x64)</h1>
5252

5353
<h1>MapboxGL sprites</h1>
5454

55-
<p>Use <code>"sprite": "https://geomatico.github.io/TMB-Icons/mapboxgl/sprites"</code> in your mapboxgl style definition.
55+
<p>Use <code>"sprite": "https://TMB-Barcelona.github.io/TMB-Icons/mapboxgl/sprites"</code> in your mapboxgl style definition.
5656
Then use them as "icon-image" property in a layer:</p>
5757

5858
<pre><code>

scripts/upload-to-s3.js

-36
This file was deleted.

0 commit comments

Comments
 (0)