Skip to content

Commit

Permalink
chore(gatsby-admin): build in postbuild of gatsby instead of prepubli…
Browse files Browse the repository at this point in the history
…sh (#25940)

* Move admin to postbuild of gatsby

* Remove prepublish gatsby-admin build

* Dont run tests in .cache

* Ignore _tests_ in .cache

* Use local copy of Gatsby to build gatsby-admin
  • Loading branch information
mxstbr authored and KyleAMathews committed Jul 29, 2020
1 parent 8ac84a6 commit a010c34
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
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",
"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 @@ -224,7 +224,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 @@ -233,7 +233,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

0 comments on commit a010c34

Please sign in to comment.