Skip to content

Commit aaa3815

Browse files
kimberlycoyKhaledgarbaya
authored andcommitted
feat(contentful-import): add --skip-content-publishing option
1 parent 66e1775 commit aaa3815

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Options:
2727
--management-token Management API token for the destination space [string] [required]
2828
--content-file json file that contains data to be import to your space [string] [required]
2929
--skip-content-model Skips content types and locales. Copies only entries and assets [boolean]
30+
--skip-content-publishing Skips content publishing. Creates content but does not publish it [boolean]
3031
--skip-locales Skips locales. Must be used with content-model-only. Copies only content-types [boolean]
3132
--config Configuration file with required values
3233
```

lib/run-contentful-import.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ export default function runContentfulImport (usageParams) {
5151
prePublishDelay: opts.prePublishDelay,
5252
contentModelOnly: opts.contentModelOnly,
5353
skipLocales: opts.skipLocales,
54-
skipContentModel: opts.skipContentModel
54+
skipContentModel: opts.skipContentModel,
55+
skipContentPublishing: opts.skipContentPublishing
5556
})
5657
.then((responses) => {
5758
log.info('Successfully Imported all data')

lib/usageParams.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ const opts = yargs
3939
describe: 'Skips locales. Must be used with content-model-only. Copies only content-types',
4040
type: 'boolean'
4141
})
42+
.option('skip-content-publishing', {
43+
describe: 'Skips content publishing. Creates content but does not publish it',
44+
type: 'boolean'
45+
})
4246
.config('config', 'Configuration file with required values')
4347
.check(function (argv) {
4448
if (!argv.spaceId) {

0 commit comments

Comments
 (0)