Skip to content

Commit

Permalink
chore: expose types from index
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinH committed Apr 23, 2022
1 parent e7bce22 commit 4e31ef2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bili.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Config } from 'bili'

const config: Config = {
input: {
index: 'src/index.tsx',
index: 'src/index.ts',
},
output: {
format: ['cjs', 'umd', 'umd-min', 'esm'],
Expand Down
3 changes: 1 addition & 2 deletions examples/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ import queryString from 'query-string'
import * as React from 'react'
import ReactDOM from 'react-dom'
import debounce from 'lodash/debounce'
import Cropper from '../../src/index'
import { Area, Point } from '../../src/types'
import Cropper, { Area, Point } from '../../src/index'
import './styles.css'

const TEST_IMAGES = {
Expand Down
File renamed without changes.
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Cropper, { CropperProps } from './Cropper'
export * from './types'

export { CropperProps }

export default Cropper
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module.exports = {
},
plugins: [
htmlWebpackPlugin,
new CopyWebpackPlugin({patterns: [{ from: 'examples/src/images', to: 'images' }]}),
new CopyWebpackPlugin({ patterns: [{ from: 'examples/src/images', to: 'images' }] }),
],
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.css'],
Expand Down

0 comments on commit 4e31ef2

Please sign in to comment.