Skip to content

Commit

Permalink
chore: project housekeeping on the components folder
Browse files Browse the repository at this point in the history
Signed-off-by: Rai Siqueira <[email protected]>
  • Loading branch information
raisiqueira committed Dec 9, 2023
1 parent 8a9e487 commit ed205c5
Show file tree
Hide file tree
Showing 17 changed files with 20 additions and 60 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
node_modules
packages/headless-stepper/dist
packages/headless-stepper/components/dist
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"prebuild": "cp -r ./README.md ./packages/headless-stepper",
"build:lib-fast": "npm run prebuild && pnpm exec tsup --config packages/headless-stepper/tsup.config.ts",
"build:lib": "npm run prebuild && pnpm exec tsup --config packages/headless-stepper/tsup.config.ts --dts-resolve",
"build:components": "pnpm exec tsup --config packages/headless-stepper/components/tsup.config.ts --dts-resolve",
"build:components-fast": "pnpm exec tsup --config packages/headless-stepper/components/tsup.config.ts",
"build:all": "pnpm run build:lib && pnpm run build:components",
"build:all": "pnpm run build:lib",
"nx": "nx",
"publish:prod": "npm run build:all && cd ./packages/headless-stepper && npm publish",
"publish:dev": "npm run build:all && cd ./packages/headless-stepper && npm publish --tag next",
Expand Down Expand Up @@ -109,4 +107,4 @@
"nx": {
"includedScripts": []
}
}
}
1 change: 0 additions & 1 deletion packages/headless-stepper/components/index.ts

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions packages/headless-stepper/components/package.json

This file was deleted.

5 changes: 0 additions & 5 deletions packages/headless-stepper/components/scripts/post-build.sh

This file was deleted.

17 changes: 0 additions & 17 deletions packages/headless-stepper/components/tsup.config.ts

This file was deleted.

12 changes: 6 additions & 6 deletions packages/headless-stepper/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "headless-stepper",
"description": "Production ready React hook to create awesome stepper components. Effortless to use, easy to customize.",
"version": "1.10.0-beta.1",
"version": "1.10.0-beta.3",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
Expand Down Expand Up @@ -49,13 +49,13 @@
"default": "./dist/index.mjs"
},
"./components": {
"types": "./components/dist/index.d.ts",
"types": "./dist/components.d.ts",
"import": {
"types": "./components/dist/index.d.ts",
"default": "./components/dist/index.mjs"
"types": "./dist/components.d.ts",
"default": "./dist/components.mjs"
},
"module": "./components/dist/index.mjs",
"default": "./components/dist/index.mjs"
"module": "./dist/components.mjs",
"default": "./dist/components.mjs"
}
},
"sideEffects": false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import type { PolymorphicComponentType, Steps } from 'headless-stepper';
import type { PolymorphicComponentType, Steps } from '../types';

export type StepComponentProps = React.PropsWithChildren<
React.HTMLAttributes<HTMLElement> &
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import React from 'react';
import StepperContext from '../context';
import { useIsomorphicId, useStepper } from 'headless-stepper';
import type {
PolymorphicComponentType,
StepperOrientation,
} from 'headless-stepper';
import { useStepper } from '../hooks/useStepper';
import { useIsomorphicId } from '../hooks/useId';
import type { PolymorphicComponentType, StepperOrientation } from '../types';
import type { StepComponentProps } from './Step';

export type StepperComponentProps = React.PropsWithChildren<
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Stepper, Step, StepComponentProps } from '../';
import { Stepper, Step, StepComponentProps } from '..';

const StepperComponent = () => {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import type { UseStepper } from 'headless-stepper';
import type { UseStepper } from '../hooks/useStepper';

/**
* Context for the stepper.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// eslint-disable-next-line @nx/enforce-module-boundaries
import { Stepper, Step } from '../../../components/src/components';
import { Stepper, Step } from '../components';

const StepperComponent = () => {
return (
Expand Down
7 changes: 5 additions & 2 deletions packages/headless-stepper/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { defineConfig } from 'tsup';
import path from 'path';

const p = path.join(__dirname, 'src');
const p = path.join(__dirname);

export default defineConfig({
name: 'headless-stepper',
entry: [`${p}/index.ts`],
entry: {
index: `${p}/src/index.ts`,
components: `${p}/src/lib/components/index.ts`,
},
outDir: path.join(__dirname, 'dist'),
sourcemap: true,
dts: true,
Expand Down

0 comments on commit ed205c5

Please sign in to comment.