Skip to content

Commit 7eb74ec

Browse files
fix: exclude .eslintignore, .prettierignore and .graphql files from deployment (#1252)
1 parent f9f35df commit 7eb74ec

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

packages/cli/src/commands/deploy.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,18 @@ const makeFilesDict = async (glob: string, ignoreGlobs?: string[]) => {
4949
};
5050

5151
const BUILD_FILE_BLOCK_LIST = ['**/*.*.map'];
52-
const SOURCE_FILE_BLOCK_LIST = ['.git', 'node_modules', 'dist', '.vscode', '.idea', 'README.md', '.DS_Store'];
52+
const SOURCE_FILE_BLOCK_LIST = [
53+
'.git',
54+
'node_modules',
55+
'dist',
56+
'.vscode',
57+
'.idea',
58+
'.eslintignore',
59+
'.prettierignore',
60+
'README.md',
61+
'.DS_Store',
62+
'**/*.graphql',
63+
];
5364

5465
export const createDeployment = async (
5566
entryFile: string,
@@ -112,9 +123,13 @@ export const createDeployment = async (
112123
const gitignoreEntries = readFileLinesAsArray(join(projectPath, '.gitignore')).filter(
113124
(entry) => entry !== 'manifest.json',
114125
);
115-
const sourceFilesToIgnore = [...gitignoreEntries, ...SOURCE_FILE_BLOCK_LIST].map((path) =>
116-
fastGlob.convertPathToPattern(`${projectPath}/${path}`),
117-
);
126+
127+
const sourceFilesToIgnore = [...gitignoreEntries, ...SOURCE_FILE_BLOCK_LIST].map((path) => {
128+
if (path.includes('*')) {
129+
return `${projectPath}/${path}`;
130+
}
131+
return fastGlob.convertPathToPattern(`${projectPath}/${path}`);
132+
});
118133

119134
const request = {
120135
build_files: await makeFilesDict(

0 commit comments

Comments
 (0)