liithworks.js
TypeScript icon, indicating that this package has built-in type declarations

0.3.5 • Public • Published

Liithworks.js

An implementation of the Steamworks SDK for HTML/JS and NodeJS based applications.

API

const liithworks = require('liithworks.js')

// You can pass an appId, or don't pass anything and use a steam_appid.txt file
const client = liithworks.init(480)

// Print Steam username
console.log(client.localplayer.getName())

// Tries to activate an achievement
if (client.achievement.activate('ACHIEVEMENT')) {

}

You can refer to the declarations file to check the API support and get more detailed documentation of each function.

Installation

To use Liithworks.js you don't have to build anything, just install it from npm:

$: npm i liithworks.js

Electron

Liithworks.js is a native module and cannot be used by default in the renderer process. To enable the usage of native modules on the renderer process, the following configurations should be made on main.js:

const mainWindow = new BrowserWindow({
    webPreferences: {
        contextIsolation: false,
        nodeIntegration: true
    }
})

To make the steam overlay working, call the electronEnableSteamOverlay on the end of your main.js file:

require('Liithworks.js').electronEnableSteamOverlay()

/liithworks.js/

    Package Sidebar

    Install

    npm i liithworks.js

    Weekly Downloads

    1

    Version

    0.3.5

    License

    MIT

    Unpacked Size

    2.34 MB

    Total Files

    10

    Last publish

    Collaborators

    • tommy509