Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
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
41 changes: 36 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ console.log(await listFrameworks({ projectDir: './path/to/gatsby/website' }))
// commands: ['gatsby build'],
// directory: 'public'
// },
// env: { GATSBY_LOGGER: 'yurnalist' }
// env: { GATSBY_LOGGER: 'yurnalist' },
// plugins: []
// }
// ]

Expand All @@ -52,7 +53,8 @@ console.log(await listFrameworks({ projectDir: './path/to/vue/website' }))
// commands: ['vue-cli-service build'],
// directory: 'dist'
// },
// env: {}
// env: {},
// plugins: []
// }
// ]

Expand All @@ -71,7 +73,8 @@ console.log(await getFramework('vue', { projectDir: './path/to/vue/website' }))
// commands: ['vue-cli-service build'],
// directory: 'dist'
// },
// env: {}
// env: {},
// plugins: []
// }
```

Expand All @@ -94,7 +97,8 @@ $ framework-info --long ./path/to/vue/website
"commands": ["vue-cli-service build"],
"directory": "dist"
},
"env": {}
"env": {},
"plugins": []
}
]
```
Expand Down Expand Up @@ -182,6 +186,12 @@ _Type_: `object`

Environment variables that should be set when calling the dev command.

#### plugins

_Type_: `string[]`

A list of recommend Netlify build plugins to install for the framework.

## hasFramework(frameworkName, options?)

`options`: `object?`\
Expand Down Expand Up @@ -232,7 +242,8 @@ Each framework is a JSON file in the `/src/frameworks/` directory. For example:
"command": "gatsby build",
"directory": "public"
},
"env": { "GATSBY_LOGGER": "yurnalist" }
"env": { "GATSBY_LOGGER": "yurnalist" },
"plugins": []
}
```

Expand Down Expand Up @@ -324,3 +335,23 @@ Directory where built files are written to.
_Type_: `object`

Environment variables that should be set when running the dev command.

## plugins

_Type_: `object[]`

A list of Netlify build plugins package names and conditions. If a condition is met for a plugin it will be returned in
the framework's plugin's list.

For example

```json
{
"plugins": [
{
"packageName": "@netlify/plugin-nextjs",
"condition": { "minNodeVersion": "10.13.0" }
}
]
}
```
126 changes: 109 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,20 +73,21 @@
"prettier": "--ignore-path .gitignore --loglevel warn \"{src,site,scripts,test}/**/*.js\" \"*.{js,md,yml,json}\" \"!package-lock.json\" \"!CHANGELOG.md\""
},
"dependencies": {
"ajv": "^7.0.0",
"filter-obj": "^2.0.1",
"is-plain-obj": "^2.1.0",
"locate-path": "^5.0.0",
"p-filter": "^2.1.0",
"p-locate": "^4.1.0",
"read-pkg-up": "^7.0.1",
"semver": "^7.3.4",
"yargs": "^15.4.1"
},
"devDependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.10",
"@babel/preset-react": "^7.12.10",
"@netlify/eslint-config-node": "^2.2.2",
"ajv": "^7.0.0",
"ava": "^2.4.0",
"babel-loader": "^8.2.2",
"cpy": "^8.1.0",
Expand Down
Loading