Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move gatsby-admin to postbuild of gatsby #25940

Merged
merged 5 commits into from
Jul 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = {
`<rootDir>/www/`,
`<rootDir>/dist/`,
`<rootDir>/node_modules/`,
`<rootDir>/packages/gatsby-admin/.cache/`,
`__tests__/fixtures`,
],
transform: {
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"scripts": {
"develop": "gatsby develop",
"build": "gatsby build --prefix-paths",
"build": "node ../gatsby/dist/bin/gatsby.js build --prefix-paths",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mxstbr You should cleanup the the previous assets as well cause gatsby we'll keep getting bigger and bigger.

"postbuild": "ncp public ../gatsby/gatsby-admin-public",
"watch": "nodemon --watch src --ext js,ts,tsx,json --exec \"yarn run build\""
}
Expand Down
3 changes: 1 addition & 2 deletions packages/gatsby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
},
"scripts": {
"build": "npm run build:src && npm run build:internal-plugins && npm run build:rawfiles && npm run build:cjs",
"postbuild": "node scripts/output-api-file.js",
"postbuild": "node scripts/output-api-file.js && yarn workspace gatsby-admin build",
"build:internal-plugins": "copyfiles -u 1 src/internal-plugins/**/package.json dist",
"build:rawfiles": "copyfiles -u 1 src/internal-plugins/**/raw_* dist",
"build:cjs": "babel cache-dir --out-dir cache-dir/commonjs --ignore \"**/__tests__\"",
Expand All @@ -228,7 +228,6 @@
"prebuild": "rimraf dist && rimraf cache-dir/commonjs",
"postinstall": "node scripts/postinstall.js",
"prepare": "cross-env NODE_ENV=production npm run build",
"prepublishOnly": "yarn workspace gatsby-admin run build",
"watch": "rimraf dist && mkdir dist && npm run build:internal-plugins && npm run build:rawfiles && npm run build:src -- --watch"
},
"types": "index.d.ts",
Expand Down