Skip to content

Commit

Permalink
Merge pull request #143 from wpmudev/package-build
Browse files Browse the repository at this point in the history
Package build
  • Loading branch information
emgk authored Oct 11, 2023
2 parents a4ff585 + abf33f2 commit 32fad18
Show file tree
Hide file tree
Showing 115 changed files with 472 additions and 288 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules
.npmrc
.changelog
.dccache
dist

# Ignore all error logs.
*.log
7 changes: 5 additions & 2 deletions packages/common/advanced/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test": "__tests__"
},
"files": [
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -29,7 +29,10 @@
"directory": "packages/compound-elements"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"clean" : "rm -rf dist",
"build" : "npx tsup src --dts",
"build:fast": "npx tsup src",
"dev": "npm build:fast -- --watch"
},
"bugs": {
"url": "https://github.com/wpmudev/sui-react/issues"
Expand Down
7 changes: 5 additions & 2 deletions packages/common/collections/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test": "__tests__"
},
"files": [
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -29,7 +29,10 @@
"directory": "packages/simple-elements"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"clean" : "rm -rf dist",
"build" : "npx tsup src --dts",
"build:fast": "npx tsup src",
"dev": "npm build:fast -- --watch"
},
"bugs": {
"url": "https://github.com/wpmudev/sui-react/issues"
Expand Down
7 changes: 5 additions & 2 deletions packages/common/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test": "__tests__"
},
"files": [
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -29,7 +29,10 @@
"directory": "packages/core-elements"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"clean" : "rm -rf dist",
"build" : "npx tsup src --dts",
"build:fast": "npx tsup src",
"dev": "npm build:fast -- --watch"
},
"bugs": {
"url": "https://github.com/wpmudev/sui-react/issues"
Expand Down
7 changes: 5 additions & 2 deletions packages/common/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test": "__tests__"
},
"files": [
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -29,7 +29,10 @@
"directory": "packages/simple-elements"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"clean" : "rm -rf dist",
"build" : "npx tsup src --dts",
"build:fast": "npx tsup src",
"dev": "npm build:fast -- --watch"
},
"bugs": {
"url": "https://github.com/wpmudev/sui-react/issues"
Expand Down
7 changes: 5 additions & 2 deletions packages/common/modules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test": "__tests__"
},
"files": [
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -29,7 +29,10 @@
"directory": "packages/simple-elements"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"clean" : "rm -rf dist",
"build" : "npx tsup src --dts",
"build:fast": "npx tsup src",
"dev": "npm build:fast -- --watch"
},
"bugs": {
"url": "https://github.com/wpmudev/sui-react/issues"
Expand Down
7 changes: 5 additions & 2 deletions packages/components/accordion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"test": "__tests__"
},
"files": [
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -39,7 +39,10 @@
"url": "git+https://github.com/wpmudev/sui-react.git"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"clean" : "rm -rf dist",
"build" : "npx tsup src --dts",
"build:fast": "npx tsup src",
"dev": "npm build:fast -- --watch"
},
"bugs": {
"url": "https://github.com/wpmudev/sui-docs/issues"
Expand Down
4 changes: 2 additions & 2 deletions packages/components/accordion/src/accordion.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { HTMLProps } from "react"
* This interface defines the props for the Score component.
* It extends the HTMLProps<HTMLDivElement> type to inherit standard HTML div element props.
*/
interface AccordionProps extends HTMLProps<HTMLDivElement> {
interface AccordionProps extends Omit<HTMLProps<HTMLDivElement>, "className"> {
/** Additional CSS class name for styling the accordion component. */
className?: string
/** Remove border-radius when true */
Expand All @@ -23,7 +23,7 @@ type AccordionCheckboxProps =
| { onCheck: never; hasCheckBox: false } // If `hasCheckbox` is false, the `onCheck` prop should not be provided.

// The AccordionItemProps interface extends the AccordionCheckboxProps, adding additional props for the AccordionItem component.
interface AccordionItemBaseProps extends AccordionCheckboxProps {
interface AccordionItemBaseProps {
title?: string // The title of the accordion item.
description?: string // The description of the accordion item.
children?: React.ReactNode // The content of the accordion item, which can be any valid React node.
Expand Down
7 changes: 5 additions & 2 deletions packages/components/advanced-banner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"test": "__tests__"
},
"files": [
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -34,7 +34,10 @@
"url": "git+https://github.com/wpmudev/sui-react.git"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"clean" : "rm -rf dist",
"build" : "npx tsup src --dts",
"build:fast": "npx tsup src",
"dev": "npm build:fast -- --watch"
},
"bugs": {
"url": "https://github.com/wpmudev/sui-docs/issues"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { HTMLProps, ReactNode } from "react"

interface AdvancedBannerBasePros extends HTMLProps<HTMLSpanElement> {
interface AdvancedBannerBasePros
extends Omit<HTMLProps<HTMLSpanElement>, "title" | "children" | "className"> {
/**
* Sets the headline text
*/
Expand Down
7 changes: 5 additions & 2 deletions packages/components/alert-banner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test": "__tests__"
},
"files": [
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -29,7 +29,10 @@
"directory": "packages/react-notification"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"clean" : "rm -rf dist",
"build" : "npx tsup src --dts",
"build:fast": "npx tsup src",
"dev": "npm build:fast -- --watch"
},
"bugs": {
"url": "https://github.com/wpmudev/sui-react/issues"
Expand Down
20 changes: 6 additions & 14 deletions packages/components/avatar/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "@wpmudev/sui-avatar",
"version": "0.0.0",
"private": true,
"description": "WPMU DEV Shared UI React Button Component",
"keywords": [],
"author": "WPMU DEV (https://wpmudev.com)",
Expand All @@ -10,26 +9,16 @@
"name": "Leighton Sapir",
"email": "[email protected]",
"url": "https://iamleigh.com"
},
{
"name": "Pawan Kumar",
"email": "[email protected]",
"url": "https://creador.dev/"
},
{
"name": "Govind Kumar",
"email": "[email protected]",
"url": "https://govind.js.org/"
}
],
"license": "GPL-2.0",
"license": "ISC",
"main": "src/index.ts",
"directories": {
"src": "src",
"test": "__tests__"
},
"files": [
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -39,7 +28,10 @@
"url": "git+https://github.com/wpmudev/sui-react.git"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"clean" : "rm -rf dist",
"build" : "npx tsup src --dts",
"build:fast": "npx tsup src",
"dev": "npm build:fast -- --watch"
},
"bugs": {
"url": "https://github.com/wpmudev/sui-docs/issues"
Expand Down
1 change: 0 additions & 1 deletion packages/components/avatar/src/avatar.types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { HTMLProps } from "react"
import image from "../stories/images/unreal-person.jpg"

/**
* Represents the properties for an avatar component.
Expand Down
7 changes: 5 additions & 2 deletions packages/components/basic-box/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test": "__tests__"
},
"files": [
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -29,7 +29,10 @@
"url": "git+https://github.com/wpmudev/sui-react.git"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"clean" : "rm -rf dist",
"build" : "npx tsup src --dts",
"build:fast": "npx tsup src",
"dev": "npm build:fast -- --watch"
},
"bugs": {
"url": "https://github.com/wpmudev/sui-docs/issues"
Expand Down
5 changes: 0 additions & 5 deletions packages/components/basic-box/src/basic-box.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ interface BasicBoxProps {
* Should be a string.
*/
className?: string

/**
* Sets the type of the box
*/
isPro?: boolean
}

export type { BasicBoxProps }
7 changes: 5 additions & 2 deletions packages/components/box/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test": "__tests__"
},
"files": [
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -29,7 +29,10 @@
"directory": "packages/react-box"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"clean" : "rm -rf dist",
"build" : "npx tsup src --dts",
"build:fast": "npx tsup src",
"dev": "npm build:fast -- --watch"
},
"bugs": {
"url": "https://github.com/wpmudev/sui-react/issues"
Expand Down
7 changes: 5 additions & 2 deletions packages/components/builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"test": "__tests__"
},
"files": [
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -21,7 +21,10 @@
"url": "git+https://[email protected]/wpmudev/sui-docs.git"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"clean" : "rm -rf dist",
"build" : "npx tsup src --dts",
"build:fast": "npx tsup src",
"dev": "npm build:fast -- --watch"
},
"bugs": {
"url": "https://github.com/wpmudev/sui-docs/issues"
Expand Down
2 changes: 1 addition & 1 deletion packages/components/builder/src/builder.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ interface BuilderWrapperProps {
children: React.ReactNode
}

export {
export type {
BuilderProps,
BuilderButtonProps,
BuilderEmptyProps,
Expand Down
7 changes: 5 additions & 2 deletions packages/components/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test": "__tests__"
},
"files": [
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -28,7 +28,10 @@
"url": "git+https://github.com/wpmudev/sui-react.git"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"clean" : "rm -rf dist",
"build" : "npx tsup src --dts",
"build:fast": "npx tsup src",
"dev": "npm build:fast -- --watch"
},
"bugs": {
"url": "https://github.com/wpmudev/sui-docs/issues"
Expand Down
1 change: 1 addition & 0 deletions packages/components/button/src/button-loading.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ButtonProps } from "./button.types"
import React from "react"

/**
* Represents the properties for a loading button component.
Expand Down
2 changes: 1 addition & 1 deletion packages/components/button/src/button-toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import { Button as Base } from "./button"
import { ToggleButtonProps } from "./button-toggle.types"

// Build "Loading Button" component.
// Build "Toggle Button" component.
const ToggleButton: React.FC<ToggleButtonProps> = ({
href,
htmlFor,
Expand Down
7 changes: 5 additions & 2 deletions packages/components/checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"test": "__tests__"
},
"files": [
"src"
"dist"
],
"publishConfig": {
"access": "public"
Expand All @@ -28,7 +28,10 @@
"url": "git+https://github.com/wpmudev/sui-react.git"
},
"scripts": {
"test": "echo \"Error: run tests from root\" && exit 1"
"clean" : "rm -rf dist",
"build" : "npx tsup src --dts",
"build:fast": "npx tsup src",
"dev": "npm build:fast -- --watch"
},
"bugs": {
"url": "https://github.com/wpmudev/sui-react/issues"
Expand Down
Loading

0 comments on commit 32fad18

Please sign in to comment.