Simple build system and CLI for AMX Mod X projects

Overview

📦 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 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 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 - create new project
    • --git - initialize git
    • --nonpm - don't initialize npm pacakge
    • --version - project version
    • --author - project author
    • --description - project name
  • amxxpack config - initialize project config in 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
  • amxxpack compile - compile specific plugin in the project
    • --config - config file
  • amxxpack new [name] - create 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 file if it already exists
  • amxpack i - alias to install command
  • amxpack n - alias to new command
  • amxpack b - alias to build command
  • amxpack c - alias to compile command
Comments
  • Make the assets configuration more powerful

    Make the assets configuration more powerful

    Right now the way the assets are copied works fine for simple projects, it will just copy the entire folder. But for more complex projects, it will be useful to have the ability to exclude some folders, to add more folders for copying, maybe the ability to avoid copying sub-dirs inside that dir. Doing this will avoid the necessity to use external scripts.

    To put it more clear, these are some of the options I would like to see implemented:

    • Exclude folders for copying
    • Being able to add more folders for copying
    • Have the ability to choose if we need to copy also subdirs
    • Limit copying by file extension.

    For example, I have my project (AG Mod X) which has assets like maps, models and sprites which are fine for those, but I have too files that are platform dependent like the server binaries (custom DLLs, Metamod, etc.). We need to have the ability to export assets by platform, like having two folders inside dist, one for Windows for Linux. Right now this stops me from using AMXXPack to its full potential.

    How can this be implemented? I'm not sure, maybe I can give a draft how this will look inside the .amxxpack.json if you are interested.

    opened by rtxa 4
  • Skip bad plugins when building

    Skip bad plugins when building

    The whole assembly breaks off if at least 1 plugin is not approved by the compiler (Compilation aborted...). It is extremely inconvenient when building a large project - I would like to skip such plugins and continue building the following plugins.

    opened by ufame 2
  • Allow to disable some config options in .amxxpack.json

    Allow to disable some config options in .amxxpack.json

    When the project is not gonna use some of the config options (like assets), you probably will try to disable it by making the field empty or removing it. This currently is not possible and it will trigger an error with the parser in resolve.js

    For example, you just want to build the .sma files only, then when everything is ready, you build the entire project with the assets included.

    A possible fix for this problem would be to provide a default value for these options (to avoid triggering an error when the field isn't isn't defined), and to check that when it's empty, don't do any copying.

    // --------------- Case 1 -------------------
    "input": {
        "scripts": "./src/scripts",
        "include": "./src/include",
        "assets": "" // Leaving this empty will use the "node_modules" folder instead.
    },
    "output": {
        "scripts": "./dist/addons/amxmodx/scripting",
        "plugins": "./dist/addons/amxmodx/plugins",
        "include": "./dist/addons/amxmodx/scripting/include",
        "assets": "./dist"
    },
    
    // ------------ Case 2 -------------------
    "input": {
        "scripts": "./src/scripts",
        "include": "./src/include",
        // Removing the field will trigger a parser error
        // "assets": ""
    },
    "output": {
        "scripts": "./dist/addons/amxmodx/scripting",
        "plugins": "./dist/addons/amxmodx/plugins",
        "include": "./dist/addons/amxmodx/scripting/include",
        // Removing the field will trigger a parser error
        // "assets": ""
    },
    

    This can be workarounded to input to some empty directory like "assets": "./empty", but still it would be good to be able to disable this.

    Some options I found useful to disable by the moment are:

    • assets in both input/output: Sometimes you want to disable temporarily the copying of the assets
    • output.scripts: Sometimes you don't need to distribute the scripting files
    opened by rtxa 1
  • Cache files to avoid rebuilding the entire project

    Cache files to avoid rebuilding the entire project

    Sometimes when your project has a lot of resources (like models, sounds, maps), the building process will get a slowdown.
    It will be useful to cache the files for the next amxxpack build command call to avoid wasting any precious time and save it only for the compiling part.

    The command amxxpack build --watch help with this issue but the caching is only stored in-memory and not in the disk storage, as soon as you stop the task for some reason, you have to go back to the rebuilding process again.

    Maybe this article can help you with this: https://medium.com/@wlarch/avoid-long-running-and-killed-gulp-tasks-with-this-simple-caching-gulp-plugin-67ec8bbf466b

    Do not waste time during your build process when there is no reason to.

    This plugin will process all files in gulp.src() if at least one file was changed. This plugin uses the features of node-file-cache to keep track of the assets SHA1 hashed content in a cache.json file.

    opened by rtxa 1
  • Improve docs on how to use different AMXX compiler versions

    Improve docs on how to use different AMXX compiler versions

    It would be useful to make clear that information to newcorners because right now I'm not sure exactly how to set up the AMXX compiler to version 1.10 - build 5465. I read somewhere in the official thread in alliedmods that is not longer necessary to specify the complete build, but README.MD doesn't specify that.

    opened by rtxa 0
Owner
Hedgehog Fog
C++, Qt, JavaScript, TypeScript, Node.js, AMXX
Hedgehog Fog
Clarity is a scalable, accessible, customizable, open source design system built with web components

Clarity is an open source design system that brings together UX guidelines, design resources, and coding implementations with Web Components

VMware 6.5k Dec 31, 2022
Build node packages into deployable applications

strong-build Build a node application package, preparing it for deploy to production. It is useful standalone, but is commonly used to build applicati

StrongLoop and IBM API Connect 47 Mar 3, 2022
Creates ES6 ./index.js file in target directories that imports and exports all sibling files and directories.

create-index create-index program creates (and maintains) ES6 ./index.js file in target directories that imports and exports sibling files and directo

Gajus Kuizinas 270 Nov 25, 2022
A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.

InversifyJS A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript. About InversifyJS is a ligh

inversify 9.5k Jan 4, 2023
Task toolkit. For when `npm run` isn't enough and everything else is too much.

For when npm run isn't enough and everything else is too much. Ygor is a no-frills toolkit consisting of a task runner and a file transformer. Enjoy a

Shannon Moeller 68 Nov 12, 2022
This template is designed for compiling Rust libraries into WebAssembly and publishing the resulting package to NPM.

This template is designed for compiling Rust libraries into WebAssembly and publishing the resulting package to NPM.

Keith 2 Jul 5, 2022
Yet-Another-Relog-Mod - Just another relog mod. Call it YARM!

Yet Another Relog Mod A relog mod with a name so long, you can just call it YARM for short. Features An aesthetic relog list design that follows my "p

Hail 0 Oct 19, 2022
A Mindustry mod that is public for anyone to contribute. Star the mod for access.

Star the mod and I will add you as a contributor. Rules for contributors Only delete or edit content if you have permission, or if you made the conten

null 6 Jul 25, 2022
Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

Svante Jonsson IT-Högskolan 3 May 18, 2022
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
The Frontend of Escobar's Inventory Management System, Employee Management System, Ordering System, and Income & Expense System

Usage Create an App # with npx $ npx create-nextron-app my-app --example with-javascript # with yarn $ yarn create nextron-app my-app --example with-

Viver Bungag 4 Jan 2, 2023
A Simple mod for the TIDAL Client

Waves, a (VERY) simple mod for the TIDAL client Features (so far) Partial Analytic Blocking devTools (toggled with CTRL + Shift + I) React devTools In

Sammy 12 Aug 16, 2022
A simple mod that researches content automatically!

Auto Research A simple mod that researches content automatically! Algorithm Description Looks up for avaliable tech nodes with all the objectives comp

Flin 11 Sep 7, 2022
A mod for Mindustry that adds a few items and liquids, and a whole new tier of upgrades, along with arc

A mod that adds a few items and liquids, and a whole new tier of upgrades, along with arc. Made by Chickenloser and Oreo with help from Duvent.

null 5 Nov 25, 2022
Minecraft 1.8.9 mod which steals the access token and more things from the targetted user and sends to a backend server for processing. Disclaimer: For educational purposes only.

R.A.T Retrieve Access Token Check DxxxxY/TokenAuth to login into an MC account with a name, token and uuid combo. Features Grabs the username, uuid, t

null 45 Jan 9, 2023
A lightweight @discord client mod focused on simplicity and performance.

Replugged Maintained fork of powercord - a lightweight @discord client mod focused on simplicity and performance. Installation/Uninstallation See the

Replugged 401 Jan 9, 2023
TechDawn is a Tcehnology mod for PowerNukkit

TechDawn 简介 科技黎明 (TechDawn) 是一个运行在PowerNukkit上的科技模组,为原版游戏添加了许多不可思议的新玩法,爆肝++。 特点 矿物筛出 木桶 木炭堆 铁砧合成 炼药锅淘洗 电路系统 机器交互 安装 下载BlocklyNukkit.jar作为前置,放入plugins文

null 14 Dec 26, 2022