-
⚛️ Declarative Components in React.
-
💅 Styled Components for the global styles control of the Desing System (components) and the ui.
-
✅ Unit testing with Jest and React Testing Library for the assertions.
git clone https://github.com/DavidPegueroles/improfit-dice-game-package-david-pegueroles.git
To install all dependencies. From the root project run
npm i
In order to run the app, you must run the following script:
npm start
This command will run a local server at port 3000 if available.
Follow these steps to use the npm package you've created:
Make sure you have Node.js and npm installed on your system. If you don't, download it from the official website: https://nodejs.org/
Open the terminal and navigate to the project folder where you want to use the package.
Install the package by running the following command:
npm install dice-game-david-pegueroles
Now that you have imported the Game
component from the package, you can use it in your project. Depending on the framework or library you are using, the way you incorporate the component might vary. Here's an example of how to use the Game
component in a React application:
import React from "react";
import { Game } from "dice-game-david-pegueroles";
function App() {
return (
<div className="App">
<h1>My Dice Game</h1>
<Game />
</div>
);
}
export default App;