@0xweb/hardhat 0.1.14 → 0.1.15
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/lib/index.js +9 -8
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -168,6 +168,15 @@ const taskArgsStore = { compileAll: false };
|
|
|
168
168
|
config['0xweb'].tsgen = false;
|
|
169
169
|
}
|
|
170
170
|
ConfigHelper.resetPaths(config.paths);
|
|
171
|
+
// Re-set Artifacts Path manually, as Hardhat initializes the Artifacts Instance before this task runs.
|
|
172
|
+
// Other paths (sources, cache) will be resolved later by hardhat from config
|
|
173
|
+
const artifactsInstance = artifacts;
|
|
174
|
+
if (artifactsInstance._artifactsPath == null) {
|
|
175
|
+
console.error(`Articats Internal interface was changed. Trying to set private _artifactsPath, but it doesn't exist.`);
|
|
176
|
+
}
|
|
177
|
+
// Clean artifacts from previous compile
|
|
178
|
+
artifactsInstance._validArtifacts = [];
|
|
179
|
+
artifactsInstance._artifactsPath = config.paths.artifacts;
|
|
171
180
|
let { sources: sourcesDir, artifacts: artifactsDir, root: rootDir } = compilationArgs;
|
|
172
181
|
if (rootDir != null) {
|
|
173
182
|
rootDir = _path_1.$path.resolve(rootDir);
|
|
@@ -187,15 +196,7 @@ const taskArgsStore = { compileAll: false };
|
|
|
187
196
|
if (artifactsDir) {
|
|
188
197
|
artifactsDir = _path_1.$path.resolve(artifactsDir);
|
|
189
198
|
config.paths.artifacts = artifactsDir;
|
|
190
|
-
// Re-set Artifacts Path manually, as Hardhat initializes the Artifacts Instance before this task runs.
|
|
191
|
-
// Other paths (sources, cache) will be resolved later by hardhat from config
|
|
192
|
-
const artifactsInstance = artifacts;
|
|
193
|
-
if (artifactsInstance._artifactsPath == null) {
|
|
194
|
-
console.error(`Articats Internal interface was changed. Trying to set private _artifactsPath, but it doesn't exist.`);
|
|
195
|
-
}
|
|
196
199
|
artifactsInstance._artifactsPath = artifactsDir;
|
|
197
|
-
// Clean artifacts from previous compile
|
|
198
|
-
artifactsInstance._validArtifacts = [];
|
|
199
200
|
}
|
|
200
201
|
if (compilationArgs.watch) {
|
|
201
202
|
const directory = `file://${config.paths.sources}/`;
|