-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
05be5c1
commit 4025d0b
Showing
5 changed files
with
66 additions
and
6 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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { files } from '../../content/metadata.html.stories'; | ||
import uploadingMetadata from './uploadingMetadata'; | ||
|
||
export default { | ||
title: 'CLI/Messages/Info', | ||
}; | ||
|
||
const directoryUrl = 'https://5d67dc0374b2e300209c41e7-dlmmxasauj.chromatic.com/.chromatic/'; | ||
|
||
export const UploadingMetadata = () => uploadingMetadata(directoryUrl, files); |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import chalk from 'chalk'; | ||
import pluralize from 'pluralize'; | ||
|
||
import { info } from '../../components/icons'; | ||
import { FileDesc } from '../../../types'; | ||
import link from '../../components/link'; | ||
|
||
export default (directoryUrl: string, files: FileDesc[]) => { | ||
const count = pluralize('metadata file', files.length, true); | ||
const list = `- ${files.map((f) => f.targetPath.replace(/^\.chromatic\//, '')).join('\n- ')}`; | ||
return chalk`${info} Uploading {bold ${count}} to ${link(directoryUrl)}\n${list}`; | ||
}; |