From b32213cb7bef6cc0cc4e4bfd2f9b45e2cedc8694 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Sun, 9 Feb 2020 17:11:39 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=D0=B1=D0=BE=D0=BB=D1=8C=D1=88?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=B4=D0=BE=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA?= =?UTF-8?q?=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/includer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/includer.js b/build/includer.js index b0b7998d..f805f0a9 100644 --- a/build/includer.js +++ b/build/includer.js @@ -1,6 +1,9 @@ const path = require('path'); const fs = require('fs'); +//пример в коде: +// @@include('./test/testFile.inc'); + exports.default = function includer(source) { const lines = source.split('\n'); @@ -12,6 +15,7 @@ exports.default = function includer(source) { const includedFile = path.resolve(path.dirname(this.resourcePath), m[1]); const fileContent = fs.readFileSync(includedFile, 'utf8'); result.push(fileContent); + this.addDependency(includedFile); } else { result.push(line); }