fix: use subdirectory for @excalidraw/excalidraw size limit (#6787)
* fix: use subdirectory for @excalidraw/excalidraw size limit * fix * update yml * update path * fix * fix * better
This commit is contained in:
parent
9fc15d81a0
commit
70888327a3
8
.github/workflows/size-limit.yml
vendored
8
.github/workflows/size-limit.yml
vendored
@ -15,10 +15,16 @@ jobs:
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
- name: Install
|
||||
run: yarn --frozen-lockfile
|
||||
- name: Install in src/packages/excalidraw
|
||||
run: yarn --frozen-lockfile
|
||||
working-directory: src/packages/excalidraw
|
||||
env:
|
||||
CI: true
|
||||
- uses: andresz1/size-limit-action@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
build_script: size
|
||||
build_script: build:umd
|
||||
skip_step: install
|
||||
directory: src/packages/excalidraw
|
||||
|
13
package.json
13
package.json
@ -145,15 +145,6 @@
|
||||
"test:coverage": "react-scripts test --passWithNoTests --coverage --watchAll",
|
||||
"autorelease": "node scripts/autorelease.js",
|
||||
"prerelease": "node scripts/prerelease.js",
|
||||
"release": "node scripts/release.js",
|
||||
"size": "node scripts/buildPackageExcalidraw.js && size-limit"
|
||||
},
|
||||
"size-limit": [
|
||||
{
|
||||
"path": [
|
||||
"src/packages/excalidraw/dist/excalidraw.development.js",
|
||||
"src/packages/excalidraw/dist/excalidraw.production.min.js"
|
||||
]
|
||||
}
|
||||
]
|
||||
"release": "node scripts/release.js"
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +0,0 @@
|
||||
const { execSync } = require("child_process");
|
||||
|
||||
const excalidrawDir = `${__dirname}/../src/packages/excalidraw`;
|
||||
|
||||
const build = () => {
|
||||
try {
|
||||
execSync(`yarn --frozen-lockfile`);
|
||||
execSync(`yarn --frozen-lockfile`, { cwd: excalidrawDir });
|
||||
execSync(`yarn run build:umd`, { cwd: excalidrawDir });
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
||||
|
||||
build();
|
@ -80,6 +80,15 @@
|
||||
"pack": "yarn build:umd && yarn pack",
|
||||
"start": "webpack serve --config webpack.dev-server.config.js",
|
||||
"install:deps": "yarn install --frozen-lockfile && yarn --cwd ../../../",
|
||||
"build:example": "EXAMPLE=true webpack --config webpack.dev-server.config.js && yarn gen:types"
|
||||
}
|
||||
"build:example": "EXAMPLE=true webpack --config webpack.dev-server.config.js && yarn gen:types",
|
||||
"size": "yarn build:umd && size-limit"
|
||||
},
|
||||
"size-limit": [
|
||||
{
|
||||
"path": "dist/excalidraw.development.js"
|
||||
},
|
||||
{
|
||||
"path": "dist/excalidraw.production.min.js"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user