Skip to content

Commit 9ddc8df

Browse files
committed
Align hash with expo command options
1 parent 86f84c7 commit 9ddc8df

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "expo-native-dependency-hash",
3-
"version": "3.0.0",
3+
"version": "3.0.1",
44
"license": "MIT",
55
"author": {
66
"name": "Robert Herber",

src/cli.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ void yargs(hideBin(process.argv))
8585
{
8686
verbose,
8787
rootDir,
88+
includeAppJson: argv.includeAppJson,
89+
includeLocalNativeFolders: argv.includeLocalNativeFolders,
8890
},
8991
);
9092

@@ -134,6 +136,8 @@ void yargs(hideBin(process.argv))
134136
{
135137
rootDir,
136138
verbose,
139+
includeAppJson: argv.includeAppJson,
140+
includeLocalNativeFolders: argv.includeLocalNativeFolders,
137141
},
138142
);
139143
},
@@ -279,6 +283,14 @@ void yargs(hideBin(process.argv))
279283
default: false,
280284
description: 'Skip including node_modules, useful for libraries',
281285
})
286+
.option('includeAppJson', {
287+
describe: 'include app.json in the hash',
288+
default: false,
289+
})
290+
.option('includeLocalNativeFolders', {
291+
describe: 'include iOS/Android contents in the hash',
292+
default: false,
293+
})
282294
.option('force', {
283295
type: 'boolean',
284296
description: 'Ignore if git is dirty',
@@ -287,6 +299,8 @@ void yargs(hideBin(process.argv))
287299
const verbose = argv.verbose || argv.v as boolean || false;
288300
const skipNodeModules = argv.skipNodeModules || false;
289301
const platform = argv.platform as Platform || argv.p as Platform || Platform.all;
302+
const includeAppJson = argv.includeAppJson ?? false;
303+
const includeLocalNativeFolders = argv.includeLocalNativeFolders ?? false;
290304

291305
const { force } = argv;
292306

@@ -305,6 +319,8 @@ void yargs(hideBin(process.argv))
305319
rootDir,
306320
verbose,
307321
skipNodeModules,
322+
skipAppJson: !includeAppJson,
323+
skipLocalNativeFolders: !includeLocalNativeFolders,
308324
});
309325
process.stdout.write(hash);
310326
})

0 commit comments

Comments
 (0)