@0xweb/hardhat 0.1.6 → 0.1.7
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 +14 -3
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -101,6 +101,10 @@ var $path;
|
|
|
101
101
|
return pathUtil.join(process.cwd(), path);
|
|
102
102
|
}
|
|
103
103
|
$path.resolve = resolve;
|
|
104
|
+
function combine(...paths) {
|
|
105
|
+
return pathUtil.join(...paths);
|
|
106
|
+
}
|
|
107
|
+
$path.combine = combine;
|
|
104
108
|
})($path = exports.$path || (exports.$path = {}));
|
|
105
109
|
//# sourceMappingURL=$path.js.map
|
|
106
110
|
//# sourceMappingURL=$path.ts.map;
|
|
@@ -139,12 +143,19 @@ const taskArgsStore = { compileAll: false };
|
|
|
139
143
|
.addOptionalParam('sources', 'Override the sources directory')
|
|
140
144
|
.addOptionalParam('artifacts', 'Override the artifacts output directory')
|
|
141
145
|
.addOptionalParam('watch', 'Re-runs compilation task on changes')
|
|
142
|
-
.setAction(async (compilationArgs, { run, config }, runSuper) => {
|
|
146
|
+
.setAction(async (compilationArgs, { run, config, artifacts }, runSuper) => {
|
|
143
147
|
if (compilationArgs.sources) {
|
|
144
148
|
config.paths.sources = _path_1.$path.resolve(compilationArgs.sources);
|
|
145
149
|
}
|
|
146
150
|
if (compilationArgs.artifacts) {
|
|
147
|
-
|
|
151
|
+
const artifactsDir = _path_1.$path.resolve(compilationArgs.artifacts);
|
|
152
|
+
const artifactsInstance = artifacts;
|
|
153
|
+
config.paths.artifacts = artifactsDir;
|
|
154
|
+
if (artifactsInstance._artifactsPath == null) {
|
|
155
|
+
console.error(`Articats Internal interface was changed. Trying to set private _artifactsPath, but it doesn't exist.`);
|
|
156
|
+
}
|
|
157
|
+
artifactsInstance._artifactsPath = artifactsDir;
|
|
158
|
+
config.paths.cache = _path_1.$path.combine(artifactsDir, '../cache/');
|
|
148
159
|
}
|
|
149
160
|
if (compilationArgs.watch != null) {
|
|
150
161
|
const directory = `file://${config.paths.sources}/`;
|
|
@@ -158,7 +169,7 @@ const taskArgsStore = { compileAll: false };
|
|
|
158
169
|
}
|
|
159
170
|
await runSuper();
|
|
160
171
|
});
|
|
161
|
-
(0, config_1.subtask)(task_names_1.TASK_COMPILE_SOLIDITY_COMPILE_JOBS, 'Compiles the entire project, building all artifacts')
|
|
172
|
+
(0, config_1.subtask)(task_names_1.TASK_COMPILE_SOLIDITY_COMPILE_JOBS, 'Compiles the entire project, building all artifacts and generating 0xweb TS classes')
|
|
162
173
|
.setAction(async (taskArgs, { run }, runSuper) => {
|
|
163
174
|
const compileSolOutput = await runSuper(taskArgs);
|
|
164
175
|
await run(constants_1.TASK_0xWEB_GENERATE, { compileSolOutput });
|