Skip to content

Commit

Permalink
build: fix issues (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
amje authored Jan 19, 2023
1 parent e4df040 commit 9517036
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 21 deletions.
23 changes: 6 additions & 17 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ function compileTs(modules = false) {
});

return src([
'src/**/*.{js,jsx,ts,tsx}',
'!src/demo/**/*.{js,jsx,ts,tsx}',
'!src/stories/**/*.{js,jsx,ts,tsx}',
'!src/**/__stories__/**/*.{js,jsx,ts,tsx}',
'src/**/*.{ts,tsx}',
'!src/demo/**/*',
'!src/stories/**/*',
'!src/**/__stories__/**/*',
'!src/**/__tests__/**/*',
])
.pipe(
replace(/import '.+\.scss';/g, (match) =>
Expand All @@ -43,17 +44,6 @@ task('compile-to-cjs', () => {
return compileTs();
});

task('copy-js-declarations', () => {
return src([
'src/**/*.d.ts',
'!src/demo/**/*.d.ts',
'!src/stories/**/*.d.ts',
'!src/**/__stories__/**/*.d.ts',
])
.pipe(dest(path.resolve(BUILD_DIR, 'esm')))
.pipe(dest(path.resolve(BUILD_DIR, 'cjs')));
});

task('copy-i18n', () => {
return src(['src/**/i18n/*.json'])
.pipe(dest(path.resolve(BUILD_DIR, 'esm')))
Expand All @@ -65,7 +55,7 @@ task('styles-global', () => {
});

task('styles-components', () => {
return src(['src/components/**/*.scss', '!src/components/**/__stories__/**/*.scss'])
return src(['src/components/**/*.scss', '!src/components/**/__stories__/**/*'])
.pipe(sass().on('error', sass.logError))
.pipe(dest(path.resolve(BUILD_DIR, 'esm', 'components')))
.pipe(dest(path.resolve(BUILD_DIR, 'cjs', 'components')));
Expand All @@ -76,7 +66,6 @@ task(
series([
'clean',
parallel(['compile-to-esm', 'compile-to-cjs']),
'copy-js-declarations',
'copy-i18n',
parallel(['styles-global', 'styles-components']),
]),
Expand Down
2 changes: 1 addition & 1 deletion src/components/Popover/__tests__/Popover.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import {fireEvent, render, screen} from '@testing-library/react';

import {setupTimersMock} from '../../../tests/utils/setupTimersMock';
import {setupTimersMock} from '../../../../test-utils/setupTimersMock';
import {delayByBehavior, PopoverBehavior} from '../config';
import {Popover} from '../Popover';
import type {PopoverProps} from '../types';
Expand Down
5 changes: 3 additions & 2 deletions src/components/PromoSheet/PromoSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import type {FC} from 'react';
import React, {useState, useCallback, useEffect, useMemo} from 'react';
import {block} from '../utils/cn';
import {CrossIcon} from '../icons/CrossIcon';
import type {ButtonProps, SheetProps} from '../';
import {Button, Icon, Sheet} from '../';
import {Button, ButtonProps} from '../Button';
import {Sheet, SheetProps} from '../Sheet';
import {Icon} from '../Icon';

import './PromoSheet.scss';

Expand Down
2 changes: 1 addition & 1 deletion src/components/Sheet/SheetContent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import {MobileContextProps, Platform, withMobile, History, Location} from '../';
import {MobileContextProps, Platform, withMobile, History, Location} from '../mobile';
import {VelocityTracker} from './utils';
import {sheetBlock} from './constants';

Expand Down
File renamed without changes.

0 comments on commit 9517036

Please sign in to comment.