Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ module.exports = ({config, mode}) => {
config.plugins.push({
apply: (compiler) => {
compiler.hooks.afterEmit.tap('AfterEmitPlugin', (compilation) => {
const spawnedProcess = spawn('yarn splash', {
spawn('yarn splash --show-disable-tip', {
shell: true,
stdio: 'inherit',
});
Expand Down
2 changes: 2 additions & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f

### Development workflow

- Enabled maintainers running `yarn dev` to hide [`yarn splash`](https://github.com/Shopify/polaris-react/tree/master/scripts/splash) reports from the console by running `DISABLE_SPLASH=1 yarn dev` ([#2372](https://github.com/Shopify/polaris-react/pull/2372))

### Dependency upgrades

### Code quality
Expand Down
2 changes: 2 additions & 0 deletions scripts/splash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ It answers the question:
1. Edit files in `src/`, such as components 🧩 and style sheets 🎨.
2. As you run `yarn dev`, `yarn splash` will run in the background. Keep an eye on the terminal to see the splash zone of your changes in the working directory.

💡 Tip: to disable these reports, run `DISABLE_SPLASH=1 yarn dev`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to indent this tip?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep 👍 (it's nested under the list item)


💡 Tip: <kbd>command</kbd> + click a file path to open it in your text editor

## Feedback and bug reports
Expand Down
15 changes: 15 additions & 0 deletions scripts/splash/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import {Box, Text, Color, render} from 'ink';
import sortBy from 'lodash/sortBy';
import {getGitStagedFiles, getDependencies} from './treebuilder';

if (process.env.DISABLE_SPLASH) {
process.exit(0);
}

const excludedFileNames = (fileName) =>
!fileName.includes('test') && !fileName.includes('types');

Expand Down Expand Up @@ -193,6 +197,17 @@ const App = () => {
</Box>
</Color>
</Box>
{process.argv.includes('--show-disable-tip') && (
<Box>
<Color dim>
<Box width={3}>💡</Box>
<Box>
Tip: to disable these reports, run{' '}
<Text bold>DISABLE_SPLASH=1 yarn dev</Text>
</Box>
</Color>
</Box>
)}
</React.Fragment>
);
};
Expand Down