Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Framework: Add Component Storybook (tweaks) #17762

Merged
merged 2 commits into from
Oct 8, 2019
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
5 changes: 3 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,9 @@ module.exports = {
},
excludedFiles: [
'**/*.@(android|ios|native).js',
'**/@(benchmark|test|__tests__)/**/*.js',
'**/{storybook,stories}\/*\.js',
'**/benchmark/**/*.js',
'**/@(__mocks__|__tests__|test)/**/*.js',
'**/storybook/**/*.js',
],
},
{
Expand Down
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,9 @@ jobs:
if: branch = master
name: Deploy Playground
env: INSTALL_WORDPRESS=false
install:
Copy link
Member Author

Choose a reason for hiding this comment

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

How about we override install here to skip npm run build?

Copy link
Contributor

Choose a reason for hiding this comment

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

if: branch = master stops the entire stage from running outside of master, right?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh I see what you mean, because the playground already runs build. Yeah, good catch!

- npm ci
before_deploy:
- npm install
- npm run playground:build -- --public-url '/gutenberg'
- npm run design-system:build
deploy:
Expand Down
5 changes: 3 additions & 2 deletions bin/packages/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ if ( files.length ) {
`${ PACKAGES_DIR }/*/src/*.scss`,
], {
ignore: [
`**/test/**`,
`**/__mocks__/**`,
`**/benchmark/**`,
`**/{__mocks__,__tests__,test}/**`,
gziolo marked this conversation as resolved.
Show resolved Hide resolved
`**/{storybook,stories}/**`,
],
onlyFiles: true,
} );
Expand Down
2 changes: 1 addition & 1 deletion bin/packages/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const exists = ( filename ) => {
// and files with a suffix of .test or .spec (e.g. blocks.test.js),
// and deceitful source-like files, such as editor swap files.
const isSourceFile = ( filename ) => {
return ! [ /\/(__tests__|test)\/.+.js$/, /.\.(spec|test)\.js$/ ].some( ( regex ) => regex.test( filename ) ) && /.\.(js|json|scss)$/.test( filename );
return ! [ /\/(benchmark|__mocks__|__tests__|test|storybook|stories)\/.+.js$/, /.\.(spec|test)\.js$/ ].some( ( regex ) => regex.test( filename ) ) && /.\.(js|json|scss)$/.test( filename );
};

const rebuild = ( filename ) => filesToBuild.set( filename, true );
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"ignoreChanges": [
"**/benchmark/*.js",
"**/CHANGELOG.md",
"**/test/**",
"**/{__mocks__,__tests__,test}/**",
"**/{storybook,stories}/**"
],
"packages": [
Expand Down
Loading