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

feat: add gatsby detect #36

Merged
merged 1 commit into from
Jul 27, 2020
Merged
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
20 changes: 20 additions & 0 deletions packages/framework-core/src/detect-frameworks/frameworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,5 +193,25 @@ export default [
desc: "📦 本地静态文件目录",
},
},
{
name: "gatsby",
key: "gatsby",
detect: [
{
path: "package.json",
match:'"(dev)?(d|D)ependencies":\\s*{[^}]*"gatsby":\\s*".+?"[^}]*}',
}
],
plugin: "@cloudbase/framework-plugin-website",
config: {
buildCommand: {
value: "npx gatsby build",
desc: "🔨 构建脚本",
},
outputPath: {
value: "./public",
desc: "📦 本地静态文件目录",
},
},
}
];