npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

create-fivem-ts

v2.0.1

Published

- Fast build times - Separate client and server builds - Obfuscation support - Easy configuration - ... and more!

Downloads

7

Readme

Whitigol's FiveM TypeScript Boilerplate

Features

  • Fast build times
  • Separate client and server builds
  • Obfuscation support
  • Easy configuration
  • ... and more!

Requirements

  • Node.js
  • Yarn, NPM, PNPM, or Bun

Installation

Installation has been made easy with the use of our CLI tool. Simply run one of the following commands to install our FiveM TypeScript Boilerplate.

Note: PNPM is the recommended package manager for this project, as it has the best performance and disk space usage. This has not been tested with other package managers, so use them at your own risk.

PNPM

pnpm create fivem-ts@latest

NPM

npx create-fivem-ts@latest

Yarn

yarn create fivem-ts@latest

Bun

bun create fivem-ts@latest

Configuration

The configuration for the FiveM TypeScript Boilerplate is located in the build-config.json5 file. Not to be confused with the config.json file, which is meant for runtime configuration. The default configuration of the build-config.json5 file is shown below.

{
    obfuscate: false, // Enable obfuscation for the built files
    minify: true, // Enable minification for the built files (Recommended)

    output: "./output", // The directory where the built files will be placed (absolute or relative)

    /* 
        Below are the default files/folders that are copied to the output directory. "{OUT}" is replaced with the output directory.
        **WARNING**: If "{OUT}" is not present in the "to" field, this WILL BREAK THINGS. Be careful when editing these.
        If something below does not exist, it will not be copied.
        You can add/remove files/folders as you wish, but make sure it follows the format below.
    */

    copy: [
        { from: "fxmanifest.lua", to: "{OUT}/" },
        { from: "config.json", to: "{OUT}/" },
        { from: "dist/**/*", to: "{OUT}/dist/" },
        { from: "stream/**/*", to: "{OUT}/stream/" },
        { from: "nui/**/*", to: "{OUT}/nui/" },
        { from: "data/**/*", to: "{OUT}/data/" },
    ],
}

Usage

The FiveM TypeScript Boilerplate comes with a CLI tool to make your life easier. The CLI tool is used to build your client and server code, and to start your server. The commands are shown below.

# Build the client and server code
[PACKAGE_MANAGER] run build
# Run in development mode (watch for changes)
[PACKAGE_MANAGER] run dev

Adding UI

Our boilerplate comes with UI support out of the box if chosen during installation. But, if you didn't choose UI support during installation, you can add it later easily. Simply run the following command to add UI support to your project.

# Add UI support to your project
[PACKAGE_MANAGER] run add-ui

Made with ❤️ & TypeScript by Whitigol