-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[core] Improve help text for deploy, build and import commands
- Loading branch information
Showing
5 changed files
with
46 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
import lazyRequire from '@sanity/util/lib/lazyRequire' | ||
|
||
const helpText = ` | ||
Options | ||
--source-maps Enable source maps for built bundles (increases size of bundle) | ||
--no-minify Skip minifying built Javascript (speeds up build, increases size of bundle) | ||
Examples | ||
sanity build | ||
sanity build --no-minify --source-maps | ||
` | ||
|
||
export default { | ||
name: 'build', | ||
signature: '[OUTPUT_DIR]', | ||
description: 'Builds the current Sanity configuration to a static bundle', | ||
action: lazyRequire(require.resolve('../../actions/build/buildStaticAssets')) | ||
action: lazyRequire(require.resolve('../../actions/build/buildStaticAssets')), | ||
helpText | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 14 additions & 2 deletions
16
packages/@sanity/core/src/commands/deploy/deployCommand.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
import lazyRequire from '@sanity/util/lib/lazyRequire' | ||
|
||
const helpText = ` | ||
Options | ||
--source-maps Enable source maps for built bundles (increases size of bundle) | ||
--no-minify Skip minifying built Javascript (speeds up build, increases size of bundle) | ||
--no-build Don't build the studio prior to deploy, instead deploying the version currently in \`dist/\` | ||
Examples | ||
sanity deploy | ||
sanity deploy --no-minify --source-maps | ||
` | ||
|
||
export default { | ||
name: 'deploy', | ||
signature: '[SOURCE_DIR]', | ||
signature: '[SOURCE_DIR] [--no-build] [--source-maps] [--no-minify]', | ||
description: 'Deploys a statically built Sanity studio', | ||
action: lazyRequire(require.resolve('../../actions/deploy/deployAction')) | ||
action: lazyRequire(require.resolve('../../actions/deploy/deployAction')), | ||
helpText | ||
} |