Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/csev/tsugi-react-base
My patternfly seed playground
https://github.com/csev/tsugi-react-base
Last synced: 18 days ago
JSON representation
My patternfly seed playground
- Host: GitHub
- URL: https://github.com/csev/tsugi-react-base
- Owner: csev
- License: mit
- Created: 2021-07-28T18:59:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-11T12:57:29.000Z (over 3 years ago)
- Last Synced: 2024-11-07T11:11:42.923Z (2 months ago)
- Language: TypeScript
- Size: 3.48 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Tsugi React Base Tool
=====================## Quick-start
```bash
# Get into your Tsugi mod folder
cd ... /mod
git clone https://github.com/csev/tsugi-react-base
cd tsugi-react-base
npm install && npm run start:dev
```
## Development scripts
```sh
# Install development/build dependencies
npm install# Start the development server
npm run start:dev# Before you run the `tsugi` build process, you must edit the `webpack.prod.js`
# file and edit the `publicPath` and `replace` field to reflect
# the actual path on your web server where the folder will be available
# TODO: Automate this :)# Run a tsugi build (outputs to "dist" dir)
npm run build
```## Other Scripts
```sh
# Run the test suite
npm run test# Run the test suite with coverage
npm run test:coverage# Run the linter
npm run lint# Run the code formatter
npm run format# Launch a tool to inspect the bundle size
npm run bundle-profile:analyze# Start the express server (run a production build first)
npm run start# Start storybook component explorer
npm run storybook# Build storybook component explorer as standalone app (outputs to "storybook-static" dir)
npm run build:storybook
```## Configurations
* [TypeScript Config](./tsconfig.json)
* [Webpack Config](./webpack.common.js)
* [Jest Config](./jest.config.js)
* [Editor Config](./.editorconfig)## Raster image support
To use an image asset that's shipped with PatternFly core, you'll prefix the paths with "@assets". `@assets` is an alias for the PatternFly assets directory in node_modules.
For example:
```js
import imgSrc from '@assets/images/g_sizing.png';
```You can use a similar technique to import assets from your local app, just prefix the paths with "@app". `@app` is an alias for the main src/app directory.
```js
import loader from '@app/assets/images/loader.gif';