amxxpack 0.0.9 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -32,7 +32,7 @@ npm install -g amxxpack
32
32
  - Execute `npm init -y` command to init the package
33
33
  - Execute `npm install amxxpack --save-dev` command to install `amxxpack` locally
34
34
  - Execute `npx amxxpack init` command to create new config
35
- - Extract the **Amx Mod X** compiler to the `./compiler` dir of the project (content of `scripting` folder).
35
+ - Execute `npx amxxpack fetch-compiler` to download latest compiler release
36
36
  - Use `npx amxxpack build` command to build the project
37
37
  - Adding build scripts *(optional)*
38
38
 
@@ -45,9 +45,14 @@ npm install -g amxxpack
45
45
  ```
46
46
 
47
47
  ## 📋 Commands
48
- - `amxxpack init` init config for a new project
49
- - `amxxpack build` command to build the project
50
- - `--watch` flag to watch changes
51
- - `--config` config file
52
- - `amxxpack compile <path|glob>` to compile specific plugin in the project
53
- - `--config` config file
48
+ - `amxxpack init` - init config for a new project
49
+ - `amxxpack build` - command to build the project
50
+ - `--watch` - flag to watch changes
51
+ - `--config` - config file
52
+ - `amxxpack compile <path|glob>` - compile specific plugin in the project
53
+ - `--config` - config file
54
+ - `amxxpack fetch-compiler` - fetch amxmodx compiler
55
+ - `--config` - config file
56
+ - `--version` - compiler version
57
+ - `--addon` - addon name
58
+ - `--dev` - search for dev build
@@ -1,7 +1,6 @@
1
1
  export declare const DOWNLOAD_HOST = "https://www.amxmodx.org";
2
2
  export declare const SCRIPTING_DIR = "addons/amxmodx/scripting/";
3
3
  export declare const EXTENSIONS_IGNORE_LIST: string[];
4
- export declare const DOWNLOAD_DIR = ".downloads";
5
4
  export declare enum CompilerPlatform {
6
5
  Windows = "windows",
7
6
  Linux = "linux",
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DistSource = exports.CompilerPlatform = exports.DOWNLOAD_DIR = exports.EXTENSIONS_IGNORE_LIST = exports.SCRIPTING_DIR = exports.DOWNLOAD_HOST = void 0;
3
+ exports.DistSource = exports.CompilerPlatform = exports.EXTENSIONS_IGNORE_LIST = exports.SCRIPTING_DIR = exports.DOWNLOAD_HOST = void 0;
4
4
  exports.DOWNLOAD_HOST = 'https://www.amxmodx.org';
5
5
  exports.SCRIPTING_DIR = 'addons/amxmodx/scripting/';
6
6
  exports.EXTENSIONS_IGNORE_LIST = ['.sma'];
7
- exports.DOWNLOAD_DIR = '.downloads';
8
7
  var CompilerPlatform;
9
8
  (function (CompilerPlatform) {
10
9
  CompilerPlatform["Windows"] = "windows";
@@ -61,6 +61,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
61
61
  Object.defineProperty(exports, "__esModule", { value: true });
62
62
  var fs_1 = __importDefault(require("fs"));
63
63
  var path_1 = __importDefault(require("path"));
64
+ var os_1 = __importDefault(require("os"));
64
65
  var https_1 = __importDefault(require("https"));
65
66
  var mkdirp_1 = __importDefault(require("mkdirp"));
66
67
  var normalize_path_1 = __importDefault(require("normalize-path"));
@@ -73,7 +74,7 @@ function downloadDist(dist) {
73
74
  return __generator(this, function (_a) {
74
75
  switch (_a.label) {
75
76
  case 0:
76
- downloadDir = path_1.default.join(__dirname, constants_1.DOWNLOAD_DIR);
77
+ downloadDir = path_1.default.join(os_1.default.tmpdir(), '.amxxpack/downloads');
77
78
  return [4 /*yield*/, (0, mkdirp_1.default)(downloadDir)];
78
79
  case 1:
79
80
  _a.sent();
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "amxxpack",
3
3
  "description": "AMXXPack",
4
4
  "author": "Hedgehog Fog",
5
- "version": "0.0.9",
5
+ "version": "0.1.3",
6
6
  "license": "MIT",
7
7
  "main": "lib/builder/index.js",
8
8
  "types": "lib/builder/index.d.ts",