Skip to content

Commit

Permalink
[NO_TICKET] Prevent copying setupJs and "styles" build folder (#818)
Browse files Browse the repository at this point in the history
* Prevent copying setupJs and build folders

* Prevent copying test files

* Update comment

* Rename ChoiceList definition omit
  • Loading branch information
bernardwang authored Sep 17, 2020
1 parent 33d9a59 commit dea1919
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions packages/design-system-scripts/gulp/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,21 @@ function copySass(dir) {
}

/**
* Copy any files not processed by the build scripts
* Generically copy any non test files that arent already processed by the build scripts
*/
function copyMiscFiles(dir) {
const src = path.join(dir, 'src');
return streamPromise(
gulp
.src([
`${src}/**/*`,
`!${src}/components/**/*`,
`!${src}/fonts/**/*`,
`!${src}/images/**/*`,
`!${src}/styles/**/*`,
`!${src}/components/**`,
`!${src}/fonts/**`,
`!${src}/images/**`,
`!${src}/styles/**`,
`!${src}/setupTests.{js,jsx,ts,tsx}`,
`!${src}/**/*{.test,.spec}.{js,jsx,ts,tsx}`,
`!${src}/**/{__mocks__,__tests__,helpers}/**/*`,
])
.pipe(gulp.dest(path.join(dir, 'dist')))
);
Expand Down
4 changes: 2 additions & 2 deletions packages/design-system/src/types/ChoiceList/ChoiceList.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ export type ChoiceListSize = 'small';
export type ChoiceListType = 'checkbox' | 'radio';

// Omit props that we override with values from the ChoiceList
type OverridenChoiceProp =
type OmitChoiceProp =
| 'inversed'
| 'name'
| 'onBlur'
| 'onChange'
| 'size'
| 'type'
| 'inputRef';
export type ChoiceProps = Omit<ChoiceComponentProps, OverridenChoiceProp>;
export type ChoiceProps = Omit<ChoiceComponentProps, OmitChoiceProp>;

export interface ChoiceListProps {
/**
Expand Down

0 comments on commit dea1919

Please sign in to comment.