grunt-amxmodx
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -53,2 +53,10 @@ /* | ||
} | ||
}, | ||
custom_include_options: { | ||
options: { | ||
includePath: "test/fixtures/include/" | ||
}, | ||
files: { | ||
src: ['test/fixtures/custom_include.sma'] | ||
} | ||
} | ||
@@ -55,0 +63,0 @@ }, |
{ | ||
"name": "grunt-amxmodx", | ||
"description": "AMX mod X compiler task", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"homepage": "https://github.com/ertrzyiks/grunt-amxmodx", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -100,2 +100,8 @@ # grunt-amxmodx [![Build Status](https://travis-ci.org/ertrzyiks/grunt-amxmodx.svg?branch=master)](https://travis-ci.org/ertrzyiks/grunt-amxmodx) | ||
#### options.includePath | ||
Type: `string` | ||
Default value: `null` | ||
Custom include path. | ||
### Usage Examples | ||
@@ -102,0 +108,0 @@ |
@@ -25,3 +25,4 @@ /* | ||
versions: [ config.getDefaultVersion() ], | ||
output: "tmp/" | ||
output: "tmp/", | ||
includePath: null | ||
}); | ||
@@ -44,3 +45,3 @@ | ||
// Iterate over all specified file groups. | ||
async.each(files, compileFiles(version, options.output), next); | ||
async.each(files, compileFiles(version, options), next); | ||
} | ||
@@ -62,4 +63,7 @@ | ||
function compileFiles(version, outputDir) | ||
function compileFiles(version, options) | ||
{ | ||
var outputDir = options.output, | ||
includePath = options.includePath; | ||
return function (f, done) { | ||
@@ -83,4 +87,11 @@ var src = f.src.filter(function (filepath) { | ||
mkdirp.sync(outputAbsolutePath); | ||
var args = [ "-o" + output ]; | ||
if (includePath) | ||
{ | ||
args.push("-i" + path.resolve(includePath)); | ||
} | ||
amxxpc.compile(filepath, { version: version, args: [ "-o" + output ] }, function (err) { | ||
amxxpc.compile(filepath, { version: version, args: args }, function (err) { | ||
console.log("Output:", output); | ||
@@ -87,0 +98,0 @@ console.log("-------------------------------"); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14367261
399
702
146