Skip to content

Commit bfad3f1

Browse files
eduardoboucasehmicky
authored andcommitted
Use new default functions directory
Related: netlify/build#2188
1 parent a3cd371 commit bfad3f1

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Diff for: .gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Test
44
test/sample/node_modules
55
test/sample/out_functions
6-
test/sample/netlify-automatic-functions
6+
test/sample/netlify/functions
77
test/sample/my-publish-dir
88
test/sample/.next
99
test/sample/.netlify

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ If you'd like to build and deploy your project using the [Netlify CLI](https://d
6969
2. Run any number of builds and deploys freely (i.e. `netlify build`, `netlify deploy --build`, `netlify deploy --prod`)
7070
3. Run `git stash --include-unstaged` to easily ignore plugin-generated files
7171

72-
Plugin-generated files will output into either (a) the default functions and publish directories (`netlify-automatic-functions` and `.`, respectively) or (b) whichever custom functions and publish directories you configure. See below for custom directory configuration. It's important to note that, in both cases (a) and (b), the CLI may mix your project's source code and plugin-generated files; this is why we recommend committing all project source files before running CLI builds.
72+
Plugin-generated files will output into either (a) the default functions and publish directories (`netlify/functions` and `.`, respectively) or (b) whichever custom functions and publish directories you configure. See below for custom directory configuration. It's important to note that, in both cases (a) and (b), the CLI may mix your project's source code and plugin-generated files; this is why we recommend committing all project source files before running CLI builds.
7373

7474
**Debugging CLI builds:**
7575
- If you're seeing a `{FILE_NAME} already exists` error running a CLI build, this may be because your `node_modules` got purged between builds or because of lingering unstashed files from outdated builds. To resolve, you need to manually remove any plugin-generated files from your project directory.

Diff for: index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ module.exports = {
5656
},
5757
}
5858

59-
const DEFAULT_FUNCTIONS_SRC = 'netlify-automatic-functions'
59+
const DEFAULT_FUNCTIONS_SRC = 'netlify/functions'

Diff for: test/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ describe('onBuild()', () => {
195195

196196
test.each([
197197
{ FUNCTIONS_SRC: 'functions', resolvedFunctions: 'functions' },
198-
{ FUNCTIONS_SRC: undefined, resolvedFunctions: 'netlify-automatic-functions' },
198+
{ FUNCTIONS_SRC: undefined, resolvedFunctions: 'netlify/functions' },
199199
])('copy files to the functions directory', async ({ FUNCTIONS_SRC, resolvedFunctions }) => {
200200
await useFixture('functions_copy_files')
201201
await moveNextDist()

0 commit comments

Comments
 (0)