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

Update package name #4

Merged
merged 2 commits into from
Mar 19, 2024
Merged
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
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# crosswalk-data-handler
# DataHandler

A crosswalk module to handle Player data.

Expand All @@ -8,24 +8,24 @@ Instead of having a centralized place where all the player data is contained and

## Installation

Add `crosswalk-data-handler` in your dependencies:
Add `@crosswalk-game/data-handler` in your dependencies:

```bash
yarn add crosswalk-data-handler
yarn add @crosswalk-game/data-handler
```

Or if you are using `npm`:

```bash
npm install crosswalk-data-handler
npm install @crosswalk-game/data-handler
```

## Initialization

In one of your crosswalk server module's `Init` function, call the `config` function to configure the data handling settings.

```lua
DataHandler.config({
Modules.DataHandler.config({
dataStoreName = "YourDataStoreName",
-- optional settings
autoSaveInterval = 45,
Expand Down Expand Up @@ -107,7 +107,7 @@ Updates the data associated with a specific player to match the default value.
local playerDatas

function module.Start()
playerDatas = DataHandler.register("stats", function()
playerDatas = Modules.DataHandler.register("stats", function()
return {
points = 0,
level = 1,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "crosswalk-data-handler",
"name": "@crosswalk-game/data-handler",
"version": "0.1.0",
"description": "A crosswalk module to handle Player data",
"license": "MIT",
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ __metadata:
version: 8
cacheKey: 10c0

"commander@npm:^11.0.0":
version: 11.1.0
resolution: "commander@npm:11.1.0"
checksum: 13cc6ac875e48780250f723fb81c1c1178d35c5decb1abb1b628b3177af08a8554e76b2c0f29de72d69eef7c864d12613272a71fabef8047922bc622ab75a179
languageName: node
linkType: hard

"crosswalk-data-handler@workspace:.":
"@crosswalk-game/data-handler@workspace:.":
version: 0.0.0-use.local
resolution: "crosswalk-data-handler@workspace:."
resolution: "@crosswalk-game/data-handler@workspace:."
dependencies:
luau-signal: "npm:^0.1.0"
npmluau: "npm:^0.1.1"
languageName: unknown
linkType: soft

"commander@npm:^11.0.0":
version: 11.1.0
resolution: "commander@npm:11.1.0"
checksum: 13cc6ac875e48780250f723fb81c1c1178d35c5decb1abb1b628b3177af08a8554e76b2c0f29de72d69eef7c864d12613272a71fabef8047922bc622ab75a179
languageName: node
linkType: hard

"luau-signal@npm:^0.1.0":
version: 0.1.0
resolution: "luau-signal@npm:0.1.0"
Expand Down
Loading