Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "feat: TUP-700 @tacc/core-components - Storybook" #460

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ To bring containers down after development, run `npx nx down tup-cms`.

Other useful commands:

- `npx nx serve core-components` to run a demo of the library for the core components.
- `npx nx build core-components` to create a distributable library for the core components.

## Contributing
Expand All @@ -33,8 +32,6 @@ To contribute, first read [How to Contirbute](./docs/contributing.md).

---

<!-- NX -->

<p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="450"></p>

🔎 **Smart, Fast and Extensible Build System**
Expand Down
20 changes: 0 additions & 20 deletions libs/core-components/.storybook/main.ts

This file was deleted.

4 changes: 0 additions & 4 deletions libs/core-components/.storybook/preview.global.css

This file was deleted.

1 change: 0 additions & 1 deletion libs/core-components/.storybook/preview.ts

This file was deleted.

17 changes: 1 addition & 16 deletions libs/core-components/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,7 @@ Set up a new local CMS instance.
2. Install Dependencies:

```sh
npm install --include=optional --workspace=libs/core-components
```

3. Start demo:

```sh
npx nx serve core-components
npm install
```

## Developing
Expand All @@ -63,15 +57,6 @@ The components are [React components](https://react.dev/learn) that should be [w
| `npm test` | execute unit tests | [Vitest](https://vitest.dev/) |
| `npm run build` | build components | [Vite](https://vitejs.dev/) |

## Contributing

### to the Demo

| task | reference |
| ------------------ | ------------------------------------------------- |
| add/edit component | https://storybook.js.org/docs/writing-stories |
| change interaction | https://storybook.js.org/docs/essentials/controls |

## Testing

### Unit Tests
Expand Down
23 changes: 5 additions & 18 deletions libs/core-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,17 @@
"dist"
],
"scripts": {
"start": "nx serve",
"// start": "nx serve",
"build": "nx build",
"build:storbook": "nx build-storybook",
"test": "nx test",
"prepublishOnly": "npm run build"
},
"homepage": "https://github.com/TACC/tup-ui/libs/core-components",
"repository": "git@github.com:TACC/tup-ui.git",
"peerDependencies": {
"@nx/vite": "^17.2.8",
"@tacc/core-styles": "^2.25.1",
"@tacc/core-styles": "^2.23.1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^14.0.0",
"@vitejs/plugin-react-swc": "^3.5.0",
"formik": "^2.2.9",
"react": "18.2.0",
"react-dom": "18.2.0",
Expand All @@ -31,20 +29,9 @@
"react-step-wizard": "^5.3.11",
"react-table": "^7.8.0",
"reactstrap": "^9.1.5",
"uuid": "^8.3.2",
"vite-plugin-dts": "^2.3.0",
"vite-tsconfig-paths": "^4.2.0"
"uuid": "^8.3.2"
},
"sideEffects": [
"libs/core-componets/**/*.css"
],
"optionalDependencies": {
"@nx/storybook": "^17.2.8",
"@storybook/addon-essentials": "^7.6.19",
"@storybook/core-server": "^7.6.19",
"@storybook/react-vite": "^7.6.19"
},
"devDependencies": {
"vite-plugin-lib-inject-css": "^2.1.1"
}
]
}
37 changes: 0 additions & 37 deletions libs/core-components/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,6 @@
"passWithNoTests": true,
"reportsDirectory": "../../coverage/libs/core-components"
}
},
"serve": {
"executor": "@nx/storybook:storybook",
"options": {
"port": 4400,
"configDir": "libs/core-components/.storybook"
},
"configurations": {
"ci": {
"quiet": true
}
}
},
"storybook": {
"executor": "@nx/storybook:storybook",
"options": {
"port": 4400,
"configDir": "libs/core-components/.storybook"
},
"configurations": {
"ci": {
"quiet": true
}
}
},
"build-storybook": {
"executor": "@nx/storybook:build",
"outputs": ["{options.outputDir}"],
"options": {
"outputDir": "dist/storybook/core-components",
"configDir": "libs/core-components/.storybook"
},
"configurations": {
"ci": {
"quiet": true
}
}
}
}
}
3 changes: 0 additions & 3 deletions libs/core-components/src/lib/Button/Button.stories.module.css

This file was deleted.

44 changes: 0 additions & 44 deletions libs/core-components/src/lib/Button/Button.stories.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions libs/core-components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
},
{
"path": "./tsconfig.spec.json"
},
{
"path": "./tsconfig.storybook.json"
}
],
"extends": "../../tsconfig.base.json"
Expand Down
6 changes: 1 addition & 5 deletions libs/core-components/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
"**/*.spec.js",
"**/*.test.js",
"**/*.spec.jsx",
"**/*.test.jsx",
"**/*.stories.ts",
"**/*.stories.js",
"**/*.stories.jsx",
"**/*.stories.tsx"
"**/*.test.jsx"
],
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"]
}
33 changes: 0 additions & 33 deletions libs/core-components/tsconfig.storybook.json

This file was deleted.

4 changes: 1 addition & 3 deletions libs/core-components/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ export default defineConfig({
input: Object.fromEntries(
// https://rollupjs.org/configuration-options/#input
glob
.sync(resolve(__dirname, 'src/**/!(*.test).{ts,tsx,js,jsx}'), {
ignore: resolve(__dirname, 'src/**/*.stories.tsx'),
})
.sync(resolve(__dirname, 'src/**/!(*.test).{ts,tsx,js,jsx}'))
.map((file) => [
// This removes `...src/` as well as the file extension from each
// file, so e.g. ...src/nested/foo.js becomes nested/foo
Expand Down
21 changes: 1 addition & 20 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@
"@nx/vite:test": {
"inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
"cache": true
},
"build-storybook": {
"cache": true,
"inputs": [
"default",
"^production",
"{projectRoot}/.storybook/**/*",
"{projectRoot}/tsconfig.storybook.json"
]
}
},
"namedInputs": {
Expand All @@ -54,17 +45,7 @@
"!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
"!{projectRoot}/tsconfig.spec.json",
"!{projectRoot}/jest.config.[jt]s",
"!{projectRoot}/.eslintrc.json",
"!{projectRoot}/**/*.stories.@(js|jsx|ts|tsx|mdx)",
"!{projectRoot}/.storybook/**/*",
"!{projectRoot}/tsconfig.storybook.json"
"!{projectRoot}/.eslintrc.json"
]
},
"tasksRunnerOptions": {
"default": {
"options": {
"cacheableOperations": ["build-storybook"]
}
}
}
}
Loading
Loading