@0xweb/hardhat 0.1.10 → 0.1.11

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.
Files changed (2) hide show
  1. package/lib/index.js +18 -3
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -143,10 +143,25 @@ const taskArgsStore = { compileAll: false };
143
143
  .addOptionalParam('sources', 'Override the sources directory')
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
- .addOptionalParam('watch', 'Re-runs compilation task on changes')
146
+ .addOptionalParam('watch', 'Re-runs compilation task on changes', true, {
147
+ name: 'boolean',
148
+ validate(argName, argumentValue) { },
149
+ parse(val) {
150
+ if (val === '' || val === '1' || val === true || val === 'true') {
151
+ return true;
152
+ }
153
+ return false;
154
+ }
155
+ })
147
156
  .addOptionalParam('tsgen', 'Skip the TypeScript class generation', true, {
148
157
  name: 'boolean',
149
- validate(argName, argumentValue) { }
158
+ validate(argName, argumentValue) { },
159
+ parse(val) {
160
+ if (val === '0' || val === 0 || val === false || val === 'false') {
161
+ return false;
162
+ }
163
+ return true;
164
+ }
150
165
  })
151
166
  .setAction(async (compilationArgs, { run, config, artifacts }, runSuper) => {
152
167
  if (compilationArgs.tsgen === false) {
@@ -179,7 +194,7 @@ const taskArgsStore = { compileAll: false };
179
194
  }
180
195
  artifactsInstance._artifactsPath = artifactsDir;
181
196
  }
182
- if (compilationArgs.watch != null) {
197
+ if (compilationArgs.watch) {
183
198
  const directory = `file://${config.paths.sources}/`;
184
199
  atma_io_1.Directory.watch(directory, async (...args) => {
185
200
  await runSuper();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@0xweb/hardhat",
3
3
  "description": "Hardhat plugin for 0xweb",
4
- "version": "0.1.10",
4
+ "version": "0.1.11",
5
5
  "main": "./lib/index.js",
6
6
  "author": {
7
7
  "name": "Alex Kit",