2.0.2 • Published 5 months ago

@vactorynext/core v2.0.2

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

@vactorynext/core

The @vactorynext/core package centralizes various components and functionalities used across Vactory and other VOID projects. This package includes a wide range of elements such as Contexts, Hooks, Lib, Block, and Paragraph components, ensuring consistency and ease of maintenance across different implementations.

The introduction of @vactorynext/core addresses the challenge of manual updates in multiple projects for any changes, refactorings, or fixes. It serves as a central workspace, allowing for easy synchronization across projects through package updates.

Features

The @vactorynext/core package offers a comprehensive set of methods and components:

  • Blocks: JSX components for block elements.
  • Paragraphs: JSX components for paragraph elements.
  • Drupal: Functionalities specific to Drupal integration.
  • Hooks: A collection of custom React hooks.
  • Context: React custom context functionalities.
  • Lib: Library functions for various features.
  • Utils: Utility functions including date formatting, UI elements functionalities, and more.
  • Webform: Hooks and functions for webform management.
  • Server: Server-only functions, optimized for SSR processes.
  • Config: For importing config functionalities related to server side ( next.config.js for example )
  • Config Client: For importing config functionalities related to client side ( _app.jsx for example )
  • Storybook-client: Storybook client side functionalities
  • Storybook-server: Storybook server side functionalities
  • Web-server: for server and server-dev
  • Webpack: Webpack functionalities

Installation

To install the package, use the following command with yarn:

yarn add @vactorynext/core -W

Usage

To use @vactorynext/core, simply import the desired functionality or component into your project. Below are examples for each type of import provided by the package. Make sure to specify the correct path related to each feature:

Importing Blocks

import { BlocksController } from "@vactorynext/core/blocks"

Importing Paragraphs

import { ParagraphsController } from "@vactorynext/core/paragraphs"

Drupal Integration

import { drupal } from "@vactorynext/core/drupal"

Custom Hooks

import { useI18n } from "@vactorynext/core/hooks"

Context Usage

import { MenuProvider } from "@vactorynext/core/context"

Library Functions

import { removeQueryParamValue } from "@vactorynext/core/lib"

Utility Functions

import { vclsx } from "@vactorynext/core/utils"
import { ErrorBoundary } from "@vactorynext/core/utils"

Webform Hooks and Functions

import { useErrorMessage } from "@vactorynext/core/webform"

Server-only Functions

import { redis } from "@vactorynext/core/server"

Config

const { createNextConfig } = require("@vactorynext/core/config")

Config Client

import { NodeDefault } from "@vactorynext/core/config-client"

Storybook-client

import { PlaceholderSections, SharedPreview } from "@vactorynext/core/storybook-client"

Storybook-server

const { getSharedConfig } = require("@vactorynext/core/storybook-server")

Web-server

const { startDevWebServer } = require("@vactorynext/core/web-server")

Webpack

const { createWebpackConfig } = require("@vactorynext/core/webpack")

Contributing

We warmly welcome contributions to the @vactorynext/core package. If you're looking to contribute, please follow these steps to ensure a smooth process:

  1. Clone: The change can only be made in Vactory Next project

  2. Make Changes Locally:

    • Navigate to the packages/core/src folder in your local repository.
    • Implement your changes or enhancements here.
    • For new path alias folders, ensure to add these in the files array in package.json to include them in the package.
  3. Run Tests:

    • Before committing your changes, run any existing tests to make sure everything still works as expected (dev, build, storybook:dev, storybook:build, lint & docker for production environment).
  4. Update Documentation:

    • If your changes involve adding new features or modifying existing ones, update the relevant documentation and examples in the README.md or other documentation files.
  5. Commit Your Changes:

    • Commit your changes with a clear and descriptive commit message. This helps others understand the purpose and context of your changes.
  6. Create a Pull Request (PR):

    • Push your changes to your branch and create a pull request against the feature/v3 repository.
    • In the PR description, provide detailed information about your changes. Highlight any important aspects or considerations related to your contribution.
    • Make sure your PR title and description are clear and concise, giving maintainers a good understanding of your contribution.
  7. PR Review:

    • Once submitted, your PR will be reviewed by the maintainers or the package's responsible person.
    • Engage in discussions or make further changes if requested by the reviewers.
  8. Merging and Publishing:

    • After your PR is approved and merged, the package's maintainer will handle publishing a new version with your changes.

Notes for Contributors:

  • Please adhere to the coding style and standards used in the project.

License

@vactorynext/core is licensed under MIT License.

2.0.2

5 months ago

2.0.1

5 months ago

2.0.0

7 months ago

2.0.0-test.0

7 months ago

1.0.21

8 months ago

1.0.20

8 months ago

1.0.19

9 months ago

1.0.18

9 months ago

1.0.17

9 months ago

1.0.16

10 months ago

1.0.15

10 months ago

1.0.14

11 months ago

1.0.13

12 months ago

1.0.12

12 months ago

1.0.9

12 months ago

1.0.8

12 months ago

1.0.7

1 year ago

1.0.11

12 months ago

1.0.10

12 months ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago