Skip to content

Commit

Permalink
refactor: update build output directory and import paths
Browse files Browse the repository at this point in the history
Changed build output directory from 'lib' to 'dist' for consistency. Updated import paths to use '@/' alias for better readability and maintenance.
  • Loading branch information
mallikcheripally committed Aug 10, 2024
1 parent 3b64bca commit 05febf4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules/
lib/
dist/
coverage
reports

Expand Down
20 changes: 10 additions & 10 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
// Components
export { Focusable } from 'components/Focusable';
export { FocusRing } from 'components/FocusRing';
export { FocusTrap } from 'components/FocusTrap';
export { SkipLink } from 'components/SkipLink';
export { Focusable } from '@/components/Focusable';
export { FocusRing } from '@/components/FocusRing';
export { FocusTrap } from '@/components/FocusTrap';
export { SkipLink } from '@/components/SkipLink';


// Context
export { FocusProvider, useFocusContext } from 'context/FocusContext';
export { FocusProvider, useFocusContext } from '@/context/FocusContext';


// Hooks
export { useFocusOnMount } from 'hooks/useFocusOnMount';
export { useFocusOrder } from 'hooks/useFocusOrder';
export { useFocusReturn } from 'hooks/useFocusReturn';
export { useFocusVisible } from 'hooks/useFocusVisible';
export { useFocusWithin } from 'hooks/useFocusWithin';
export { useFocusOnMount } from '@/hooks/useFocusOnMount';
export { useFocusOrder } from '@/hooks/useFocusOrder';
export { useFocusReturn } from '@/hooks/useFocusReturn';
export { useFocusVisible } from '@/hooks/useFocusVisible';
export { useFocusWithin } from '@/hooks/useFocusWithin';
12 changes: 6 additions & 6 deletions webpack.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
module.exports = {
entry: './src/index.ts',
output: {
path: path.resolve(__dirname, 'lib'),
path: path.resolve(__dirname, 'dist'),
filename: 'index.js',
library: {
type: 'module',
Expand Down Expand Up @@ -66,11 +66,11 @@ module.exports = {
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx'],
alias: {
components: path.resolve(__dirname, 'src/components/'),
hooks: path.resolve(__dirname, 'src/hooks/'),
utils: path.resolve(__dirname, 'src/utils/'),
styles: path.resolve(__dirname, 'src/styles/'),
context: path.resolve(__dirname, 'src/context/'),
'@/components': path.resolve(__dirname, 'src/components/'),
'@/hooks': path.resolve(__dirname, 'src/hooks/'),
'@/utils': path.resolve(__dirname, 'src/utils/'),
'@/styles': path.resolve(__dirname, 'src/styles/'),
'@/context': path.resolve(__dirname, 'src/context/'),
},
},
};

0 comments on commit 05febf4

Please # to comment.