amxxpack 0.1.3 → 1.0.1
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 +26 -21
- package/lib/builder/amxxpc.d.ts +27 -27
- package/lib/builder/amxxpc.js +122 -122
- package/lib/builder/builder.d.ts +21 -22
- package/lib/builder/builder.js +379 -400
- package/lib/builder/constants.d.ts +3 -3
- package/lib/builder/constants.js +6 -6
- package/lib/builder/index.d.ts +1 -2
- package/lib/builder/index.js +9 -20
- package/lib/cli/controller.d.ts +20 -16
- package/lib/cli/controller.js +238 -181
- package/lib/cli/index.d.ts +3 -2
- package/lib/cli/index.js +13 -8
- package/lib/cli/program.d.ts +4 -4
- package/lib/cli/program.js +174 -118
- package/lib/cli/services/project-creator.d.ts +21 -0
- package/lib/cli/services/project-creator.js +274 -0
- package/lib/cli/services/template-builder.d.ts +11 -0
- package/lib/cli/services/template-builder.js +104 -0
- package/lib/cli/types.d.ts +12 -0
- package/lib/{compiler-downloader → cli}/types.js +2 -2
- package/lib/config/index.d.ts +8 -0
- package/lib/config/index.js +14 -0
- package/lib/downloaders/compiler/constants.d.ts +9 -0
- package/lib/{compiler-downloader → downloaders/compiler}/constants.js +14 -17
- package/lib/downloaders/compiler/downloader.d.ts +3 -0
- package/lib/{compiler-downloader → downloaders/compiler}/downloader.js +151 -174
- package/lib/{compiler-downloader → downloaders/compiler}/index.d.ts +1 -1
- package/lib/{compiler-downloader → downloaders/compiler}/index.js +9 -9
- package/lib/{compiler-downloader → downloaders/compiler}/resolvers.d.ts +6 -6
- package/lib/{compiler-downloader → downloaders/compiler}/resolvers.js +40 -39
- package/lib/{compiler-downloader → downloaders/compiler}/types.d.ts +16 -16
- package/lib/{builder → downloaders/compiler}/types.js +2 -2
- package/lib/downloaders/thirdparty/downloader.d.ts +3 -0
- package/lib/downloaders/thirdparty/downloader.js +69 -0
- package/lib/downloaders/thirdparty/index.d.ts +1 -0
- package/lib/downloaders/thirdparty/index.js +9 -0
- package/lib/downloaders/thirdparty/types.d.ts +5 -0
- package/lib/downloaders/thirdparty/types.js +2 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.js +20 -20
- package/lib/logger/constants.d.ts +7 -0
- package/lib/logger/constants.js +12 -0
- package/lib/{services → logger}/logger.d.ts +16 -22
- package/lib/{services → logger}/logger.js +96 -104
- package/lib/logger/types.d.ts +3 -0
- package/lib/logger/types.js +2 -0
- package/lib/project-config/defaults.d.ts +3 -0
- package/lib/project-config/defaults.js +38 -0
- package/lib/project-config/index.d.ts +6 -0
- package/lib/project-config/index.js +8 -0
- package/lib/project-config/resolve.d.ts +3 -0
- package/lib/project-config/resolve.js +110 -0
- package/lib/types/index.d.ts +45 -0
- package/lib/types/index.js +2 -0
- package/lib/utils/accumulator.d.ts +2 -1
- package/lib/utils/accumulator.js +10 -10
- package/lib/utils/download.d.ts +6 -0
- package/lib/utils/download.js +63 -0
- package/package.json +7 -1
- package/resources/templates/include-directive.txt +1 -0
- package/resources/templates/include.txt +5 -0
- package/resources/templates/library-include.txt +6 -0
- package/resources/templates/library-script.txt +10 -0
- package/resources/templates/script.txt +5 -0
- package/lib/builder/types.d.ts +0 -20
- package/lib/compiler-downloader/constants.d.ts +0 -12
- package/lib/compiler-downloader/downloader.d.ts +0 -2
- package/resources/default-config.json +0 -22
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# 📦 AMXXPack
|
|
1
|
+
# 📦 AMXXPack [](https://www.npmjs.com/package/amxxpack)
|
|
2
2
|
Simple build system and **CLI** for **AMX Mod X** projects.
|
|
3
3
|
|
|
4
4
|
# 📄 About
|
|
@@ -27,32 +27,37 @@ npm install -g amxxpack
|
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
## ▶ Quick start
|
|
30
|
-
-
|
|
31
|
-
- Open a terminal inside the project directory
|
|
32
|
-
- Execute `npm init -y` command to init the package
|
|
30
|
+
- Open a terminal inside the project directory (existing or create a new one)
|
|
33
31
|
- Execute `npm install amxxpack --save-dev` command to install `amxxpack` locally
|
|
34
|
-
- Execute `npx amxxpack
|
|
35
|
-
- Execute `npx amxxpack
|
|
36
|
-
- Use `
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
To use `npm run build` and `npm run watch` to build or watch the project update the `scripts` section in `package.json`:
|
|
40
|
-
```json
|
|
41
|
-
"scripts": {
|
|
42
|
-
"build": "amxxpack build",
|
|
43
|
-
"watch": "amxxpack build --watch"
|
|
44
|
-
}
|
|
45
|
-
```
|
|
32
|
+
- Execute `npx amxxpack create .` command to create new config
|
|
33
|
+
- Execute `npx amxxpack install` to download project dependencies (compiler, thirdparty etc.)
|
|
34
|
+
- Use `npm run build` command to build the project
|
|
35
|
+
- Use `npm run watch` command to build the project and watch changes
|
|
46
36
|
|
|
47
37
|
## 📋 Commands
|
|
48
|
-
- `amxxpack
|
|
38
|
+
- `amxxpack create <name>` - create new project
|
|
39
|
+
- `--git` - initialize git
|
|
40
|
+
- `--nonpm` - don't initialize npm pacakge
|
|
41
|
+
- `--version` - project version
|
|
42
|
+
- `--author` - project author
|
|
43
|
+
- `--description` - project name
|
|
44
|
+
- `amxxpack config` - initialize project config in current workspace
|
|
45
|
+
- `amxxpack install` - install project dependencies
|
|
46
|
+
- `--config` - config file
|
|
49
47
|
- `amxxpack build` - command to build the project
|
|
50
48
|
- `--watch` - flag to watch changes
|
|
51
49
|
- `--config` - config file
|
|
52
50
|
- `amxxpack compile <path|glob>` - compile specific plugin in the project
|
|
53
51
|
- `--config` - config file
|
|
54
|
-
- `amxxpack
|
|
52
|
+
- `amxxpack new <script|lib|include> [name]` - create new file in the project workspace
|
|
55
53
|
- `--config` - config file
|
|
56
|
-
- `--
|
|
57
|
-
- `--
|
|
58
|
-
- `--
|
|
54
|
+
- `--name` - plugin name
|
|
55
|
+
- `--version` - plugin version
|
|
56
|
+
- `--author` - plugin author
|
|
57
|
+
- `--lib` - library name
|
|
58
|
+
- `--include` - include list separated by a comma
|
|
59
|
+
- `--overwrite` - overwrite file if it already exists
|
|
60
|
+
- `amxpack i` - alias to `install` command
|
|
61
|
+
- `amxpack n` - alias to `new` command
|
|
62
|
+
- `amxpack b` - alias to `build` command
|
|
63
|
+
- `amxpack c` - alias to `compile` command
|
package/lib/builder/amxxpc.d.ts
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
export declare enum AMXPCMessageType {
|
|
2
|
-
Echo = "echo",
|
|
3
|
-
Error = "error",
|
|
4
|
-
Warning = "warning",
|
|
5
|
-
FatalError = "fatal error"
|
|
6
|
-
}
|
|
7
|
-
interface IMessage {
|
|
8
|
-
filename?: string;
|
|
9
|
-
startLine?: number;
|
|
10
|
-
endLine?: number;
|
|
11
|
-
code?: number;
|
|
12
|
-
type: AMXPCMessageType;
|
|
13
|
-
text: string;
|
|
14
|
-
}
|
|
15
|
-
interface IParseOutputResult {
|
|
16
|
-
messages: IMessage[];
|
|
17
|
-
aborted: boolean;
|
|
18
|
-
error: boolean;
|
|
19
|
-
}
|
|
20
|
-
interface ICompileResult {
|
|
21
|
-
output: IParseOutputResult;
|
|
22
|
-
plugin: string;
|
|
23
|
-
error?: string;
|
|
24
|
-
success: boolean;
|
|
25
|
-
}
|
|
26
|
-
declare function compile(params: any): Promise<ICompileResult>;
|
|
27
|
-
export default compile;
|
|
1
|
+
export declare enum AMXPCMessageType {
|
|
2
|
+
Echo = "echo",
|
|
3
|
+
Error = "error",
|
|
4
|
+
Warning = "warning",
|
|
5
|
+
FatalError = "fatal error"
|
|
6
|
+
}
|
|
7
|
+
interface IMessage {
|
|
8
|
+
filename?: string;
|
|
9
|
+
startLine?: number;
|
|
10
|
+
endLine?: number;
|
|
11
|
+
code?: number;
|
|
12
|
+
type: AMXPCMessageType;
|
|
13
|
+
text: string;
|
|
14
|
+
}
|
|
15
|
+
interface IParseOutputResult {
|
|
16
|
+
messages: IMessage[];
|
|
17
|
+
aborted: boolean;
|
|
18
|
+
error: boolean;
|
|
19
|
+
}
|
|
20
|
+
interface ICompileResult {
|
|
21
|
+
output: IParseOutputResult;
|
|
22
|
+
plugin: string;
|
|
23
|
+
error?: string;
|
|
24
|
+
success: boolean;
|
|
25
|
+
}
|
|
26
|
+
declare function compile(params: any): Promise<ICompileResult>;
|
|
27
|
+
export default compile;
|
package/lib/builder/amxxpc.js
CHANGED
|
@@ -1,122 +1,122 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
-
if (ar || !(i in from)) {
|
|
5
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
-
ar[i] = from[i];
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.AMXPCMessageType = void 0;
|
|
16
|
-
var path_1 = __importDefault(require("path"));
|
|
17
|
-
var child_process_1 = __importDefault(require("child_process"));
|
|
18
|
-
var mkdirp_1 = __importDefault(require("mkdirp"));
|
|
19
|
-
var accumulator_1 = __importDefault(require("../utils/accumulator"));
|
|
20
|
-
var PLUGIN_EXT = 'amxx';
|
|
21
|
-
var AMXPCMessageType;
|
|
22
|
-
(function (AMXPCMessageType) {
|
|
23
|
-
AMXPCMessageType["Echo"] = "echo";
|
|
24
|
-
AMXPCMessageType["Error"] = "error";
|
|
25
|
-
AMXPCMessageType["Warning"] = "warning";
|
|
26
|
-
AMXPCMessageType["FatalError"] = "fatal error";
|
|
27
|
-
})(AMXPCMessageType = exports.AMXPCMessageType || (exports.AMXPCMessageType = {}));
|
|
28
|
-
var MessageRegExp = {
|
|
29
|
-
filename: /([a-zA-Z0-9.\-_/:\\\s]+)/,
|
|
30
|
-
line: /\(([0-9]+)(?:\s--\s([0-9]+))?\)/,
|
|
31
|
-
type: /((?:fatal\s)?error|warning)/,
|
|
32
|
-
code: /([0-9]+)/,
|
|
33
|
-
text: /(.*)/
|
|
34
|
-
};
|
|
35
|
-
function buildMessageRegExp() {
|
|
36
|
-
var filename = MessageRegExp.filename, line = MessageRegExp.line, type = MessageRegExp.type, code = MessageRegExp.code, text = MessageRegExp.text;
|
|
37
|
-
var pattern = [
|
|
38
|
-
filename,
|
|
39
|
-
line,
|
|
40
|
-
/\s:\s/,
|
|
41
|
-
type,
|
|
42
|
-
/\s/,
|
|
43
|
-
code,
|
|
44
|
-
/:\s/,
|
|
45
|
-
text
|
|
46
|
-
].map(function (r) { return r.toString().slice(1, -1); }).join('');
|
|
47
|
-
return new RegExp(pattern);
|
|
48
|
-
}
|
|
49
|
-
var messageRegExp = buildMessageRegExp();
|
|
50
|
-
function parseLine(line) {
|
|
51
|
-
var match = line.match(messageRegExp);
|
|
52
|
-
if (!match) {
|
|
53
|
-
return { type: AMXPCMessageType.Echo, text: line };
|
|
54
|
-
}
|
|
55
|
-
var filename = match[1], startLine = match[2], endLine = match[3], type = match[4], code = match[5], text = match[6];
|
|
56
|
-
return {
|
|
57
|
-
filename: filename,
|
|
58
|
-
startLine: +startLine,
|
|
59
|
-
endLine: endLine ? +endLine : -1,
|
|
60
|
-
type: type,
|
|
61
|
-
code: +code,
|
|
62
|
-
text: text
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
function isAbortedEcho(line) {
|
|
66
|
-
return line.startsWith('Compilation aborted.')
|
|
67
|
-
|| line.startsWith('Could not locate output file');
|
|
68
|
-
}
|
|
69
|
-
function parseOutput(output) {
|
|
70
|
-
var result = { messages: [], aborted: false, error: false };
|
|
71
|
-
output.split('\n').forEach(function (line) {
|
|
72
|
-
var message = parseLine(line);
|
|
73
|
-
var type = message.type;
|
|
74
|
-
if (type === AMXPCMessageType.Error || type === AMXPCMessageType.FatalError) {
|
|
75
|
-
result.error = true;
|
|
76
|
-
}
|
|
77
|
-
else if (type === AMXPCMessageType.Echo && isAbortedEcho(line)) {
|
|
78
|
-
result.error = true;
|
|
79
|
-
result.aborted = true;
|
|
80
|
-
}
|
|
81
|
-
result.messages.push(message);
|
|
82
|
-
});
|
|
83
|
-
return result;
|
|
84
|
-
}
|
|
85
|
-
function formatArgs(params, outPath) {
|
|
86
|
-
var includeArgs = params.includeDir instanceof Array
|
|
87
|
-
? params.includeDir.map(function (dir) { return "-i".concat(dir); })
|
|
88
|
-
: ["-i".concat(params.includeDir)];
|
|
89
|
-
return __spreadArray([params.path, "-o".concat(outPath)], includeArgs, true);
|
|
90
|
-
}
|
|
91
|
-
function compile(params) {
|
|
92
|
-
var parsedPath = path_1.default.parse(params.path);
|
|
93
|
-
var fileName = "".concat(parsedPath.name, ".").concat(PLUGIN_EXT);
|
|
94
|
-
var dest = path_1.default.join(params.dest, fileName);
|
|
95
|
-
mkdirp_1.default.sync(params.dest);
|
|
96
|
-
return new Promise(function (resolve) {
|
|
97
|
-
var output = (0, accumulator_1.default)();
|
|
98
|
-
var done = function (error) {
|
|
99
|
-
var outputData = output();
|
|
100
|
-
var parsedOutput = parseOutput(outputData);
|
|
101
|
-
var errorMessage = error && error.message;
|
|
102
|
-
if (!errorMessage && parsedOutput.error) {
|
|
103
|
-
errorMessage = 'Compilation error';
|
|
104
|
-
}
|
|
105
|
-
resolve({
|
|
106
|
-
error: errorMessage,
|
|
107
|
-
plugin: fileName,
|
|
108
|
-
success: !errorMessage,
|
|
109
|
-
output: parsedOutput
|
|
110
|
-
});
|
|
111
|
-
};
|
|
112
|
-
var compilerProcess = child_process_1.default.spawn(params.compiler, formatArgs(params, dest), {
|
|
113
|
-
env: process.env,
|
|
114
|
-
cwd: path_1.default.parse(params.compiler).dir
|
|
115
|
-
});
|
|
116
|
-
compilerProcess.on('error', done);
|
|
117
|
-
compilerProcess.on('close', done);
|
|
118
|
-
compilerProcess.stdout.on('data', output);
|
|
119
|
-
compilerProcess.stderr.on('data', function (data) { return console.error(data); });
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
exports.default = compile;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
+
if (ar || !(i in from)) {
|
|
5
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
+
ar[i] = from[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AMXPCMessageType = void 0;
|
|
16
|
+
var path_1 = __importDefault(require("path"));
|
|
17
|
+
var child_process_1 = __importDefault(require("child_process"));
|
|
18
|
+
var mkdirp_1 = __importDefault(require("mkdirp"));
|
|
19
|
+
var accumulator_1 = __importDefault(require("../utils/accumulator"));
|
|
20
|
+
var PLUGIN_EXT = 'amxx';
|
|
21
|
+
var AMXPCMessageType;
|
|
22
|
+
(function (AMXPCMessageType) {
|
|
23
|
+
AMXPCMessageType["Echo"] = "echo";
|
|
24
|
+
AMXPCMessageType["Error"] = "error";
|
|
25
|
+
AMXPCMessageType["Warning"] = "warning";
|
|
26
|
+
AMXPCMessageType["FatalError"] = "fatal error";
|
|
27
|
+
})(AMXPCMessageType = exports.AMXPCMessageType || (exports.AMXPCMessageType = {}));
|
|
28
|
+
var MessageRegExp = {
|
|
29
|
+
filename: /([a-zA-Z0-9.\-_/:\\\s]+)/,
|
|
30
|
+
line: /\(([0-9]+)(?:\s--\s([0-9]+))?\)/,
|
|
31
|
+
type: /((?:fatal\s)?error|warning)/,
|
|
32
|
+
code: /([0-9]+)/,
|
|
33
|
+
text: /(.*)/
|
|
34
|
+
};
|
|
35
|
+
function buildMessageRegExp() {
|
|
36
|
+
var filename = MessageRegExp.filename, line = MessageRegExp.line, type = MessageRegExp.type, code = MessageRegExp.code, text = MessageRegExp.text;
|
|
37
|
+
var pattern = [
|
|
38
|
+
filename,
|
|
39
|
+
line,
|
|
40
|
+
/\s:\s/,
|
|
41
|
+
type,
|
|
42
|
+
/\s/,
|
|
43
|
+
code,
|
|
44
|
+
/:\s/,
|
|
45
|
+
text
|
|
46
|
+
].map(function (r) { return r.toString().slice(1, -1); }).join('');
|
|
47
|
+
return new RegExp(pattern);
|
|
48
|
+
}
|
|
49
|
+
var messageRegExp = buildMessageRegExp();
|
|
50
|
+
function parseLine(line) {
|
|
51
|
+
var match = line.match(messageRegExp);
|
|
52
|
+
if (!match) {
|
|
53
|
+
return { type: AMXPCMessageType.Echo, text: line };
|
|
54
|
+
}
|
|
55
|
+
var filename = match[1], startLine = match[2], endLine = match[3], type = match[4], code = match[5], text = match[6];
|
|
56
|
+
return {
|
|
57
|
+
filename: filename,
|
|
58
|
+
startLine: +startLine,
|
|
59
|
+
endLine: endLine ? +endLine : -1,
|
|
60
|
+
type: type,
|
|
61
|
+
code: +code,
|
|
62
|
+
text: text
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function isAbortedEcho(line) {
|
|
66
|
+
return line.startsWith('Compilation aborted.')
|
|
67
|
+
|| line.startsWith('Could not locate output file');
|
|
68
|
+
}
|
|
69
|
+
function parseOutput(output) {
|
|
70
|
+
var result = { messages: [], aborted: false, error: false };
|
|
71
|
+
output.split('\n').forEach(function (line) {
|
|
72
|
+
var message = parseLine(line);
|
|
73
|
+
var type = message.type;
|
|
74
|
+
if (type === AMXPCMessageType.Error || type === AMXPCMessageType.FatalError) {
|
|
75
|
+
result.error = true;
|
|
76
|
+
}
|
|
77
|
+
else if (type === AMXPCMessageType.Echo && isAbortedEcho(line)) {
|
|
78
|
+
result.error = true;
|
|
79
|
+
result.aborted = true;
|
|
80
|
+
}
|
|
81
|
+
result.messages.push(message);
|
|
82
|
+
});
|
|
83
|
+
return result;
|
|
84
|
+
}
|
|
85
|
+
function formatArgs(params, outPath) {
|
|
86
|
+
var includeArgs = params.includeDir instanceof Array
|
|
87
|
+
? params.includeDir.map(function (dir) { return "-i".concat(dir); })
|
|
88
|
+
: ["-i".concat(params.includeDir)];
|
|
89
|
+
return __spreadArray([params.path, "-o".concat(outPath)], includeArgs, true);
|
|
90
|
+
}
|
|
91
|
+
function compile(params) {
|
|
92
|
+
var parsedPath = path_1.default.parse(params.path);
|
|
93
|
+
var fileName = "".concat(parsedPath.name, ".").concat(PLUGIN_EXT);
|
|
94
|
+
var dest = path_1.default.join(params.dest, fileName);
|
|
95
|
+
mkdirp_1.default.sync(params.dest);
|
|
96
|
+
return new Promise(function (resolve) {
|
|
97
|
+
var output = (0, accumulator_1.default)();
|
|
98
|
+
var done = function (error) {
|
|
99
|
+
var outputData = output();
|
|
100
|
+
var parsedOutput = parseOutput(outputData);
|
|
101
|
+
var errorMessage = error && error.message;
|
|
102
|
+
if (!errorMessage && parsedOutput.error) {
|
|
103
|
+
errorMessage = 'Compilation error';
|
|
104
|
+
}
|
|
105
|
+
resolve({
|
|
106
|
+
error: errorMessage,
|
|
107
|
+
plugin: fileName,
|
|
108
|
+
success: !errorMessage,
|
|
109
|
+
output: parsedOutput
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
var compilerProcess = child_process_1.default.spawn(params.compiler, formatArgs(params, dest), {
|
|
113
|
+
env: process.env,
|
|
114
|
+
cwd: path_1.default.parse(params.compiler).dir
|
|
115
|
+
});
|
|
116
|
+
compilerProcess.on('error', done);
|
|
117
|
+
compilerProcess.on('close', done);
|
|
118
|
+
compilerProcess.stdout.on('data', output);
|
|
119
|
+
compilerProcess.stderr.on('data', function (data) { return console.error(data); });
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
exports.default = compile;
|
package/lib/builder/builder.d.ts
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export default class AmxxBuilder {
|
|
3
|
-
private
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
private
|
|
21
|
-
|
|
22
|
-
}
|
|
1
|
+
import { IProjectConfig } from '../types';
|
|
2
|
+
export default class AmxxBuilder {
|
|
3
|
+
private config;
|
|
4
|
+
constructor(config: IProjectConfig);
|
|
5
|
+
build(): Promise<void>;
|
|
6
|
+
watch(): Promise<void>;
|
|
7
|
+
buildSrc(): Promise<void>;
|
|
8
|
+
buildInclude(): Promise<void>;
|
|
9
|
+
buildAssets(): Promise<void>;
|
|
10
|
+
watchSrc(): Promise<void>;
|
|
11
|
+
watchInclude(): Promise<void>;
|
|
12
|
+
watchAssets(): Promise<void>;
|
|
13
|
+
updatePlugin(filePath: string): Promise<void>;
|
|
14
|
+
updateScript(filePath: string): Promise<void>;
|
|
15
|
+
updateAsset(filePath: string): Promise<void>;
|
|
16
|
+
updateInclude(filePath: string): Promise<void>;
|
|
17
|
+
findPlugins(pattern: string): Promise<string[]>;
|
|
18
|
+
compilePlugin(filePath: string): Promise<void>;
|
|
19
|
+
private buildDir;
|
|
20
|
+
private watchDir;
|
|
21
|
+
}
|