From 3eafcc2e8fa0e5141b35eb58dae790184eddf819 Mon Sep 17 00:00:00 2001 From: AlexisG Date: Thu, 3 Aug 2023 12:47:12 +0200 Subject: [PATCH] chore: Add bundlemon config for transpiled folder Following the update of some subdependencies, the `baseDir` parameter of the bundlemon configuration no longer works if it is not filled in or simply with `"."` or `"./"`. As on `cozy-ui` we want to monitor 2 folders at the root of the project, the trick is to modify the main config file to only take care of one folder and create a second one running in parallel to take care of the second folder. --- .bundlemon_transpiled | 15 +++++++++++++++ .bundlemonrc | 15 +++------------ .travis.yml | 10 ++++++++++ package.json | 3 ++- 4 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 .bundlemon_transpiled diff --git a/.bundlemon_transpiled b/.bundlemon_transpiled new file mode 100644 index 0000000000..8c12384056 --- /dev/null +++ b/.bundlemon_transpiled @@ -0,0 +1,15 @@ +{ + "baseDir": "./transpiled", + "files": [ + { + "path": "react/stylesheet.css", + "maxPercentIncrease": 10 + } + ], + "groups": [ + { + "path": "react/**" + } +], + "reportOutput": ["github"] +} diff --git a/.bundlemonrc b/.bundlemonrc index 90f5d2cdc8..b6c2b413d6 100644 --- a/.bundlemonrc +++ b/.bundlemonrc @@ -1,23 +1,14 @@ { - "baseDir": ".", + "baseDir": "./dist", "files": [ { - "path": "dist/cozy-ui.min.css", + "path": "cozy-ui.min.css", "maxPercentIncrease": 10 }, { - "path": "dist/cozy-ui.utils.min.css", - "maxPercentIncrease": 10 - }, - { - "path": "transpiled/react/stylesheet.css", + "path": "cozy-ui.utils.min.css", "maxPercentIncrease": 10 } ], - "groups": [ - { - "path": "transpiled/react/**" - } -], "reportOutput": ["github"] } diff --git a/.travis.yml b/.travis.yml index e66766cf08..cee655a4a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -90,6 +90,16 @@ jobs: - js-binaries - css-binaries if: commit_message =~ /^((?!\[only argos\]).)*$/ # if commit message doesn't contain "[only argos]" string + - name: 'Bundlemon transpiled' + stage: 'test' + script: + - yarn bundlemon:transpiled + workspaces: + use: + - sprite-palette-binaries + - js-binaries + - css-binaries + if: commit_message =~ /^((?!\[only argos\]).)*$/ # if commit message doesn't contain "[only argos]" string - name: 'Argos desktop' stage: 'screenshots' script: | diff --git a/package.json b/package.json index 3ba5628d45..45a9c74fe5 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,8 @@ "start:doc:kss": "nodemon --ext styl,md --watch stylus --exec 'yarn build:doc:kss && http-server build/styleguide -p 4242'", "start": "yarn build --watch", "removeEmptyCss": "node scripts/removeEmptyCss.js", - "optimizeIcons": "svgo -r --folder assets/icons" + "optimizeIcons": "svgo -r --folder assets/icons", + "bundlemon:transpiled": "bundlemon --config .bundlemon_transpiled" }, "types": "dist/index.d.ts", "sideEffects": [