@0xweb/hardhat 0.1.9 → 0.1.10
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 +10 -0
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -144,7 +144,14 @@ const taskArgsStore = { compileAll: false };
|
|
|
144
144
|
.addOptionalParam('artifacts', 'Override the artifacts output directory')
|
|
145
145
|
.addOptionalParam('root', 'Overrides root directory. If sources is also overriden must be the sub-folder of the sources dir')
|
|
146
146
|
.addOptionalParam('watch', 'Re-runs compilation task on changes')
|
|
147
|
+
.addOptionalParam('tsgen', 'Skip the TypeScript class generation', true, {
|
|
148
|
+
name: 'boolean',
|
|
149
|
+
validate(argName, argumentValue) { }
|
|
150
|
+
})
|
|
147
151
|
.setAction(async (compilationArgs, { run, config, artifacts }, runSuper) => {
|
|
152
|
+
if (compilationArgs.tsgen === false) {
|
|
153
|
+
config['0xweb'].tsgen = false;
|
|
154
|
+
}
|
|
148
155
|
let { sources: sourcesDir, artifacts: artifactsDir, root: rootDir } = compilationArgs;
|
|
149
156
|
if (rootDir != null) {
|
|
150
157
|
rootDir = _path_1.$path.resolve(rootDir);
|
|
@@ -194,6 +201,9 @@ const taskArgsStore = { compileAll: false };
|
|
|
194
201
|
.setAction(async (a, b) => {
|
|
195
202
|
let { compileSolOutput } = a;
|
|
196
203
|
let { config, artifacts } = b;
|
|
204
|
+
if (config['0xweb'].tsgen === false) {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
197
207
|
const contracts = await getCompiledAbis(config, compileSolOutput);
|
|
198
208
|
const app = new _0xweb_1.App();
|
|
199
209
|
await (0, alot_1.default)(contracts)
|