Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

resourcepacker

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resourcepacker - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

4

changelog.md
# Changelog
## 1.0.2
*2020-08-08*
- Fixed special characters in custom parameter names not being escaped during substituting.
## 1.0.1

@@ -4,0 +8,0 @@ *2020-08-08*

7

index.js

@@ -9,2 +9,3 @@ #!/usr/bin/env node

const log = str => console.log('<resourcepacker> ' + str);
const escapeRegex = str => str.replace(/[.*+?^/${}()|[\]\\]/g, '\\$&');

@@ -74,3 +75,5 @@ const CONFIG = {

for (let item in config) {
description = description.replace(/&(?=[0-9a-fk-or])/g, '§').replace(RegExp(`<${item}>`, 'g'), config[item]);
description = description
.replace(/&(?=[0-9a-fk-or])/g, '§') // formatting codes
.replace(RegExp(`<${escapeRegex(item)}>`, 'g'), config[item]) // custom parameters
}

@@ -84,3 +87,3 @@

let [, name, region] = languages[lang].match(matchRegex);
mcmetaContent.language[lang] = { "name": name, "region": region};
mcmetaContent.language[lang] = { "name": name, "region": region };
}

@@ -87,0 +90,0 @@ }

{
"name": "resourcepacker",
"version": "1.0.1",
"version": "1.0.2",
"description": "Easily and cleanly packages Minecraft resource packs from a messy working directory",

@@ -29,2 +29,2 @@ "keywords": [

}
}
}

@@ -13,5 +13,5 @@ [![Latest version](https://img.shields.io/github/v/release/Nixinova/resourcepacker?label=latest&style=flat-square)](https://github.com/Nixinova/resourcepacker/releases)

After installing resourcepacker, type **`rpkr init`** to ready your directory with a configuration file (`.rpkr.json`). For information on how to use this configuration file, please see the **Configuration** section below.
After installing resourcepacker, `cd` to the directory your resource is located in, then type **`rpkr init`** to ready your directory with a configuration file (`.rpkr.json`). Customise the values in this configuration file to your liking. For information on how to use this configuration file, please see the **Configuration** section below.
To package a resource pack, simply type **`rpkr pack`** and your resource pack will be packaged into an output folder. You can control which directory the files are outputted to by placing the output folder name in quotes after this command; for example, `rpkr pack "My Pack 1.16"` outputs to folder "My Pack 1.16". If the output folder is not set, it defaults to the format "`<name>` `<packver>` (`<mcver>`)", where each value comes from the `.rpkr.json` file.
To package a resource pack, simply type **`rpkr pack`** and your resource pack will be packaged into an output folder. You can control which directory the files are outputted to by placing the output folder name in quotes after this command; for example, `rpkr pack "My Pack 1.16"` outputs to folder "My Pack 1.16". If the output folder is not set in the command line, it defaults to the format "`<name>` `<packver>` (`<mcver>`)", where each value comes from the `.rpkr.json` file.

@@ -60,2 +60,2 @@ ## Configuration

## Try it out
Clone [this repository](https://github.com/Nixinova/resourcepacker.git), `cd` into that directory, and then type **`node index.js pack`** to pack the contents of this repository into a clean output folder. You'll see that out of all of the messy files in this folder, only the `assets`, `pack.png`, and `pack.mcmeta` files are outputted.
Clone [this repository](https://github.com/Nixinova/resourcepacker.git) then type **`cd resourcepacker && npm install && node index.js pack`** to pack the contents of this repository into a clean output folder. You'll see that out of all of the messy files in this folder, only the `assets`, `pack.png`, and `pack.mcmeta` files are outputted.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc