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

amxxpack

v1.4.7

Published

AMXXPack

Downloads

122

Readme

📦 AMXXPack 🇺🇦 npm

Simple build system and CLI for AMX Mod X projects.

📄 About

This system will be useful for projects with multiple plugins and assets. Using the command-line interface you can build an entire project with a single command. It also supports hot rebuild to keep your plugins and assets up to date during the work.

📚 Features

  • ⚙ Flexible configuration
  • 🔥 Hot reload
  • 🧸 Assets builder

🔄Requirements

  • Node.js 10.0.0+

🔧 Installation

AMXXPack is available through the npm registry. Installation can be done using the npm install command:

npm install amxxpack

or install it globally to use as a system command

npm install -g amxxpack

▶ Quick start

  • Open a terminal inside the project directory (existing or create a new one)
  • Execute npm install amxxpack -g command to install amxxpack globally
  • Execute amxxpack create . command to create a new config
  • Execute amxxpack install to download project dependencies (compiler, thirdparty etc.)
  • Use amxxpack build command to build the project
  • Use amxxpack watch command to build the project and watch changes

📋 Commands

  • amxxpack create <name> - create new project
    • --git - initialize git
    • --nonpm - don't initialize the npm package
    • --version - project version
    • --author - project author
    • --description - project name
  • amxxpack config - initialize project config in the current workspace
  • amxxpack install - install project dependencies
    • --config - config file
  • amxxpack build - command to build the project
    • --watch - flag to watch changes
    • --config - config file
    • --ignore - ignore build errors
    • --no-cache - disable caching
  • amxxpack compile <path|glob> - compile specific plugin in the project
    • --config - config file
    • --no-cache - disable caching
  • amxxpack generate <script|lib|include> [name] - create a new file in the project workspace
    • --config - config file
    • --name - plugin name
    • --version - plugin version
    • --author - plugin author
    • --lib - library name
    • --include - include list separated by a comma
    • --overwrite - overwrite the file if it already exists
  • amxxpack cache clean - clean amxxpack cache
  • amxpack i - alias to install command
  • amxpack g - alias to generate command
  • amxpack b - alias to build command
  • amxpack c - alias to compile command

🦸 Advanced configuration

Third-party dependencies

In case your project requires third-party modules you can specify a link to third-party archives and these archives will be downloaded and extracted to the third-party directory.

{
  "thirdparty": {
    "dir": "./.thirdparty",
    "dependencies": [
      {
        "name": "somemodule",
        "url": "https://website/somemodule-v100.zip"
      }
    ]
  }
}

the configuration above will download somemodule-v100.zip archive and extract it to the ./.thirdparty/somemodule directory then you can use thirparty files in your project. For example, add a third-party directory to the include list:

{
    "include": [
      "./.thirdparty/somemodule/include"
    ]
}

Multiple directories as an input

You can use multiple directories as builder inputs, just specify an array of directories in the project configuration. Example:

  {
    "input": {
      "scripts": ["./src/scripts", "./src/extra-scripts"],
      "include": ["./src/include", "./src/extra-include"],
      "assets": ["./assets", "./extra-assets"]
    }
  }

Disabling output

Use null value for outputs to disable copying of specific output.

For example, in this case, include files will not be copied to the output folder:

  {
    "output": {
      "include": null
    }
  }

Assets filtering and subdirectories

Using glob filters you can specify which assets should be copied.

For example, you can exclude all assets except *.mdl:

  {
    "input": {
      "assets": [
        { "dir": "./assets", "filter": "*.mdl" }
      ]
    }
  }

or exclude *.tga and *.wav files:

  {
    "input": {
      "assets": [
        { "dir": "./assets", "filter": "*.!(tga|wav)" }
      ]
    }
  }

You can also specify subdirectories for copying. With this configuration, the builder will copy all files from ./assets/models to ./models/myproject of the project build directory.

  {
    "input": {
      "assets": [
        { "dir": "./assets/models", "dest": "./models/myproject" }
      ]
    }
  }

Compiler configuration

Using the compiler configuration you can specify the compiler version you want to use.

For example, if you want to use AmxModX 1.9 with cstrike addon in your project, then use this configuration:

{
  "compiler": {
    "version": "1.9",
    "addons": ["cstrike"]
  }
}

In case you want to use a dev build from amxxdrop you should set dev flag to true and specify the build you want to use in the version field:

{
  "compiler": {
    "version": "1.10.0-git5467",
    "dev": true,
    "addons": ["cstrike"]
  }
}