@fully-studios/cookie-consent
TypeScript icon, indicating that this package has built-in type declarations

0.5.5 • Public • Published

Cookie-consent

This is a reusable cookie consent library, with components for displaying cookie policy popups and managing cookie consent.

It uses:

An example of a reusable component that can be created with this template is a Cookie Consent component that can be used in multiple different projects.

Prerequisites

  • Node.js >18
  • npm >9
  • Git

Getting Started

To use this template, follow these steps:

  1. Navigate to the Cookie-consent on GitLab.

  2. Click on the "Fork" button at the top right of the page. Pick a name for the library you're making.

  3. Clone the forked repository to your local machine

  4. Navigate into the cloned repository:

cd cookie-consent
  1. Install the dependencies:
npm install

Customizing the Template

To customize the template for your specific library, you need to change the name in the package.json file and the build.lib.name in the vite.config.ts file.

  • Open the package.json file and change the name field to the name of your library.

  • Open the vite.config.ts file and change the build.lib.name field to the name of your library.

Publishing a New Version

To publish a new version of your library, you need to be logged into an npm account that is part of the @fully-studios organization. Then, follow these steps:

  1. Update the version of your library:
npm version [major|minor|patch]
  1. Build your library:
npm run build
  1. Publish your library:
npm run publish --access public

Using the library

  1. Install the library with npm
npm i @fully-studios/cookie-consent
  1. Import and use a component from the library, along with the styles (optional)
import { Box } from '@fully-studios/cookie-consent';
// Optional style import, not all libraries will necessarily export these
import '@fully-studios/cookie-consent/style.css';

export default function App() {
  return (
    <Box>
      Something
    </Box>
  );
}

Contributing

Contributions are always welcome! Please feel free to submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.5.50latest

Version History

VersionDownloads (Last 7 Days)Published
0.5.50
0.5.40

Package Sidebar

Install

npm i @fully-studios/cookie-consent

Weekly Downloads

0

Version

0.5.5

License

none

Unpacked Size

243 kB

Total Files

12

Last publish

Collaborators

  • fullyherge