Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

feat: add Gatsby logo to returned framework info #797

Merged
merged 13 commits into from
Aug 9, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ const getFrameworkInfo = function (
build: { command: frameworkBuildCommand, directory },
staticAssetsDirectory,
env,
logos,
plugins,
},
{ scripts, runScriptCommand, nodeVersion },
Expand All @@ -161,6 +162,7 @@ const getFrameworkInfo = function (
build: { commands: [frameworkBuildCommand], directory },
staticAssetsDirectory,
env,
logos,
plugins: recommendedPlugins,
}
}
5 changes: 5 additions & 0 deletions src/frameworks/gatsby.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
"AWS_LAMBDA_JS_RUNTIME": "nodejs14.x",
"NODE_VERSION": "14"
},
"logos": {
"default": "Gatsby_Default.svg",
"light": "Gatsby_Black.svg",
"dark": "Gatsby_White.svg"
},
"plugins": [
{
"packageName": "@netlify/plugin-gatsby",
Expand Down
Binary file added src/frameworks/logos/Gatsby_Black.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/frameworks/logos/Gatsby_Black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/frameworks/logos/Gatsby_Default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions src/frameworks/logos/Gatsby_Default.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/frameworks/logos/Gatsby_White.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/frameworks/logos/Gatsby_White.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions test/frameworks.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,15 @@ const FRAMEWORK_JSON_SCHEMA = {
type: 'object',
additionalProperties: { type: 'string' },
},
logos: {
type: 'object',
additionalProperties: false,
properties: {
default: { type: 'string' },
light: { type: 'string' },
dark: { type: 'string' },
},
},
plugins: {
type: 'array',
items: PLUGIN_SCHEMA,
Expand Down
2 changes: 2 additions & 0 deletions test/snapshots/main.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Generated by [AVA](https://avajs.dev).
},
env: {},
id: 'sapper',
logos: undefined,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Question: Are we ok with leaving logos as undefined until they're all added?

name: 'Sapper',
plugins: [],
staticAssetsDirectory: 'static',
Expand Down Expand Up @@ -67,6 +68,7 @@ Generated by [AVA](https://avajs.dev).
},
env: {},
id: 'sapper',
logos: undefined,
name: 'Sapper',
plugins: [],
staticAssetsDirectory: 'static',
Expand Down
Binary file modified test/snapshots/main.js.snap
Binary file not shown.