Skip to content

Commit

Permalink
feat(contentful-import): add --skip-content-publishing option
Browse files Browse the repository at this point in the history
  • Loading branch information
kimberlycoy authored and Khaledgarbaya committed Feb 6, 2017
1 parent 66e1775 commit aaa3815
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Options:
--management-token Management API token for the destination space [string] [required]
--content-file json file that contains data to be import to your space [string] [required]
--skip-content-model Skips content types and locales. Copies only entries and assets [boolean]
--skip-content-publishing Skips content publishing. Creates content but does not publish it [boolean]
--skip-locales Skips locales. Must be used with content-model-only. Copies only content-types [boolean]
--config Configuration file with required values
```
Expand Down
3 changes: 2 additions & 1 deletion lib/run-contentful-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export default function runContentfulImport (usageParams) {
prePublishDelay: opts.prePublishDelay,
contentModelOnly: opts.contentModelOnly,
skipLocales: opts.skipLocales,
skipContentModel: opts.skipContentModel
skipContentModel: opts.skipContentModel,
skipContentPublishing: opts.skipContentPublishing
})
.then((responses) => {
log.info('Successfully Imported all data')
Expand Down
4 changes: 4 additions & 0 deletions lib/usageParams.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ const opts = yargs
describe: 'Skips locales. Must be used with content-model-only. Copies only content-types',
type: 'boolean'
})
.option('skip-content-publishing', {
describe: 'Skips content publishing. Creates content but does not publish it',
type: 'boolean'
})
.config('config', 'Configuration file with required values')
.check(function (argv) {
if (!argv.spaceId) {
Expand Down

0 comments on commit aaa3815

Please sign in to comment.