@0xweb/hardhat 0.1.3 → 0.1.4
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 +4 -4
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -80,13 +80,13 @@ exports.TASK_0xWEB_GENERATE = '0xweb:generate';
|
|
|
80
80
|
"use strict";
|
|
81
81
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
82
82
|
const alot_1 = require("alot");
|
|
83
|
-
const path = require("path");
|
|
84
83
|
const task_names_1 = require("hardhat/builtin-tasks/task-names");
|
|
85
84
|
const config_1 = require("hardhat/config");
|
|
86
85
|
const config_2 = _src_config;
|
|
87
86
|
const constants_1 = _src_constants;
|
|
88
87
|
const atma_io_1 = require("atma-io");
|
|
89
88
|
const _0xweb_1 = require("0xweb");
|
|
89
|
+
const _path_1 = require("./utils/$path");
|
|
90
90
|
const taskArgsStore = { compileAll: false };
|
|
91
91
|
(0, config_1.extendConfig)((config) => {
|
|
92
92
|
config['0xweb'] = (0, config_2.resolveConfig)(config);
|
|
@@ -97,18 +97,18 @@ const taskArgsStore = { compileAll: false };
|
|
|
97
97
|
.addOptionalParam('watch', 'Re-runs compilation task on changes')
|
|
98
98
|
.setAction(async (compilationArgs, { run, config }, runSuper) => {
|
|
99
99
|
if (compilationArgs.sources) {
|
|
100
|
-
config.paths.sources = path.
|
|
100
|
+
config.paths.sources = _path_1.$path.resolve(compilationArgs.sources);
|
|
101
101
|
}
|
|
102
102
|
if (compilationArgs.artifacts) {
|
|
103
|
-
config.paths.artifacts = path.
|
|
103
|
+
config.paths.artifacts = _path_1.$path.resolve(compilationArgs.artifacts);
|
|
104
104
|
}
|
|
105
105
|
if (compilationArgs.watch != null) {
|
|
106
106
|
const directory = `file://${config.paths.sources}/`;
|
|
107
107
|
atma_io_1.Directory.watch(directory, async (...args) => {
|
|
108
|
-
console.log('XX', args);
|
|
109
108
|
await runSuper();
|
|
110
109
|
});
|
|
111
110
|
await runSuper();
|
|
111
|
+
// prevent from exit
|
|
112
112
|
await new Promise(resolve => { });
|
|
113
113
|
return;
|
|
114
114
|
}
|