Skip to content

Commit

Permalink
chore(client): fix build-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
alber70g committed Aug 8, 2023
1 parent b126bd1 commit d0bd416
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ jobs:
node common/scripts/install-run-rush.js install ${{ env.AFFECTED_OR_ALL }}
- name: Cache builds
if: ${{ false }}
# if: github.ref_name != 'main'
if: github.ref_name != 'main'
uses: actions/cache@v3
with:
path: |
Expand Down
79 changes: 79 additions & 0 deletions packages/libs/client/config/rush-project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/**
* The "config/rush-project.json" file configures Rush-specific settings for an individual project
* in a Rush monorepo. More documentation is available on the Rush website: https://rushjs.io
*/
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush-project.schema.json",

/**
* Optionally specifies another JSON config file that this file extends from. This provides a way for standard
* settings to be shared across multiple projects.
*/
// "extends": "my-rig/profiles/default/config/rush-project.json",

/**
* The incremental analyzer can skip Rush commands for projects whose input files have not changed since
* the last build. Normally, every Git-tracked file under the project folder is assumed to be an input.
* Use "incrementalBuildIgnoredGlobs" to ignore specific files, specified as globs relative to
* the project folder. The glob syntax is based on the .gitignore file format.
*/
"incrementalBuildIgnoredGlobs": [
// "etc/api-report/*.md"
],

/**
* Disable caching for this project. The project will never be restored from cache. This may be useful
* if this project affects state outside of its folder.
*
* Default value: false
*/
// "disableBuildCacheForProject": true,

/**
* Options for individual commands and phases.
*/
"operationSettings": [
{
/**
* (Required) The name of the operation.
* This should be a key in the "package.json" file's "scripts" section.
*/
"operationName": "build",

/**
* Specify the folders where this operation writes its output files. If enabled, the Rush build cache
* will restore these folders from the cache. The strings are folder names under the project root folder.
* These folders should not be tracked by Git. They must not contain symlinks.
*/
"outputFolderNames": ["dist", "fp", "lib"]

/**
* Disable caching for this operation. The operation will never be restored from cache.
* This may be useful if this operation affects state outside of its folder.
*/
// "disableBuildCacheForOperation": true
}
// {
// /**
// * (Required) The name of the operation.
// * This should be a key in the "package.json" file's "scripts" section.
// */
// "operationName": "build",
//
// /**
// * Specify the folders where this operation writes its output files. If enabled, the Rush build cache
// * will restore these folders from the cache. The strings are folder names under the project root folder.
// * These folders should not be tracked by Git. They must not contain symlinks.
// */
// "outputFolderNames": [
// "lib", "dist"
// ],
//
// /**
// * Disable caching for this operation. The operation will never be restored from cache.
// * This may be useful if this operation affects state outside of its folder.
// */
// // "disableBuildCacheForOperation": true
// }
]
}
2 changes: 1 addition & 1 deletion packages/libs/react-ui/config/rush-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
* will restore these folders from the cache. The strings are folder names under the project root folder.
* These folders should not be tracked by Git. They must not contain symlinks.
*/
"outputFolderNames": ["dist", "types"]
"outputFolderNames": ["dist", "types", "theme"]

/**
* Disable caching for this operation. The operation will never be restored from cache.
Expand Down

0 comments on commit d0bd416

Please sign in to comment.