Skip to content

Commit

Permalink
feat: add support for image-cdn
Browse files Browse the repository at this point in the history
  • Loading branch information
wardpeet committed Feb 16, 2022
1 parent cfa9a86 commit 325109b
Show file tree
Hide file tree
Showing 33 changed files with 2,228 additions and 78 deletions.
1 change: 0 additions & 1 deletion package.json
Expand Up @@ -12,7 +12,6 @@
"@types/bluebird": "^3.5.35",
"@types/cache-manager": "^2.10.3",
"@types/common-tags": "^1.8.0",
"@types/express": "^4.17.3",
"@types/fs-extra": "^9.0.13",
"@types/jaeger-client": "^3.18.0",
"@types/jest": "^27.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-manifest/package.json
Expand Up @@ -47,4 +47,4 @@
"engines": {
"node": ">=14.15.0"
}
}
}
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-utils/.babelrc
@@ -1,5 +1,5 @@
{
"presets": [["babel-preset-gatsby-package", { "browser": true }]],
"presets": [["babel-preset-gatsby-package"]],
"overrides": [
{
"test": ["**/*.ts"],
Expand Down
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-utils/README.md
Expand Up @@ -76,7 +76,7 @@ Here's a list of features:
```js
const { hasFeature } = require(`gatsby-plugin-utils`)

if (!hasFeature(`image-service`)) {
// You can polyfill image-service here so older versions have support as well
if (!hasFeature(`image-cdn`)) {
// You can polyfill image-cdn here so older versions have support as well
}
```
33 changes: 29 additions & 4 deletions packages/gatsby-plugin-utils/package.json
Expand Up @@ -3,6 +3,30 @@
"version": "3.2.0-next.1",
"description": "Gatsby utils that help creating plugins",
"main": "dist/index.js",
"exports": {
".": "./dist/index.js",
"./*.js": "./dist/*.js",
"./dist/*": "./dist/*.js",
"./dist/polyfill-remote-file": null,
"./dist/utils": null,
"./polyfill-remote-file": "./dist/polyfill-remote-file/index.js",
"./dist/polyfill-remote-file/jobs/gatsby-worker.js": "./dist/polyfill-remote-file/jobs/gatsby-worker.js"
},
"typesVersions": {
"*": {
"*": [
"dist/*.d.ts",
"dist/index.d.ts"
],
"polyfill-remote-file": [
"dist/polyfill-remote-file/index.d.ts"
],
"dist/*": [
"dist/*.d.ts",
"dist/index.d.ts"
]
}
},
"scripts": {
"build": "babel src --out-dir dist/ --ignore \"**/__tests__\" --extensions \".ts,.js\"",
"watch": "babel -w src --out-dir dist/ --ignore \"**/__tests__\" --extensions \".ts,.js\"",
Expand All @@ -22,7 +46,9 @@
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-utils#readme",
"dependencies": {
"@babel/runtime": "^7.15.4",
"joi": "^17.4.2"
"gatsby-core-utils": "3.8.0-next.0",
"joi": "^17.4.2",
"mime": "^3.0.0"
},
"devDependencies": {
"@babel/cli": "^7.15.4",
Expand All @@ -36,10 +62,9 @@
"gatsby": "^4.0.0-next"
},
"files": [
"dist/",
"src/"
"dist/"
],
"engines": {
"node": ">=14.15.0"
}
}
}

0 comments on commit 325109b

Please sign in to comment.