Skip to content
This repository was archived by the owner on Sep 12, 2019. It is now read-only.

remove --functions flag in netlify functions:create #123

Merged
merged 2 commits into from
Apr 16, 2019
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
9 changes: 1 addition & 8 deletions src/commands/functions/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,7 @@ FunctionsCreateCommand.examples = [
FunctionsCreateCommand.aliases = ["function:create"];
FunctionsCreateCommand.flags = {
name: flags.string({ char: "n", description: "function name" }),
functions: flags.string({ char: "f", description: "functions folder" }),
url: flags.string({ char: "u", description: "pull template from URL" })
// // SWYX: deprecated; every scaffolded function is a directory now
// dir: flags.boolean({
// char: 'd',
// description: 'create function as a directory'
// })
};
module.exports = FunctionsCreateCommand;

Expand Down Expand Up @@ -205,8 +199,7 @@ async function pickTemplate() {

/* get functions dir (and make it if necessary) */
function ensureFunctionDirExists(flags, config) {
const functionsDir =
flags.functions || (config.build && config.build.functions);
const functionsDir = config.build && config.build.functions;
if (!functionsDir) {
this.log(
`${NETLIFYDEVLOG} No functions folder specified in netlify.toml or as an argument`
Expand Down