Skip to content

Commit

Permalink
Add optimise version of spinner in dist
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrunner committed Nov 17, 2021
1 parent 6bfedb7 commit 5dc7b0f
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ jobs:
- run: make jsdoc
- run: npm run build-api
- run: npm run dist
- run: npm run dist-spinner

- uses: actions/upload-artifact@v2
with:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"serve-gmf-apps": "DEV_SERVER=1 TARGET=gmf-apps webpack-dev-server --https --cert=private.crt --key=private.key --port=3000 --mode=development --progress --debug",
"serve-api": "webpack-dev-server --content-base=api/dist/apihelp/ --config=buildtools/webpack.api.js --https --cert=private.crt --key=private.key --port=3000 --mode=development --progress --watch --debug",
"dist": "TARGET=dist webpack --mode=production --progress --debug",
"dist-spinner": "svgo --config=svgo.js contribs/gmf/src/icons/spinner.svg --output=dist/spinner.svg",
"build-gmf-apps-profile": "TARGET=gmf-apps webpack --profile --json > profile.json",
"typecheck": "tsc --noEmit",
"doc": "typedoc",
Expand Down
35 changes: 35 additions & 0 deletions svgo.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// The MIT License (MIT)
//
// Copyright (c) 2021 Camptocamp SA
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

module.exports = {
js2svg: {
pretty: true,
},
plugins: [
'preset-default',
{
name: 'removeAttrs',
params: {
attrs: '(style)',
},
},
],
};

0 comments on commit 5dc7b0f

Please sign in to comment.