While building with Mox, I had a quick idea for a feature that might be interesting.
From the courses, we go for just files or makefile to run our scripts to avoid rewriting everything. And I got a reminder from the Web3 Full-stack course with package.json:
// That's just an example
{
"scripts": {
"start": "node app.js",
"test": "mocha test/*.js",
"build": "webpack",
"preinstall": "echo Running pre-install script",
"postinstall": "echo Running post-install script",
"lint": "eslint ./src --ext .ts --ext .js",
"lint:fix": "npm run lint -- --fix"
}
}
Why not adding a CLI cmd like pnpm run for moccasin and set a specific part for custom scripts like:
[project.scripts] # or [scripts]
test-u = "mox test tests/unit"
test-i = "mox test tests/integration"
test-z = "mox test tests/zksync"
And then with mox:
mox task test-u
# OR
mox exec test-u
Maybe that's something that could be interesting or not. We'll have to take into account env variables too 🤔
Just putting my idea here before it vanishes!
While building with Mox, I had a quick idea for a feature that might be interesting.
From the courses, we go for
justfiles ormakefileto run our scripts to avoid rewriting everything. And I got a reminder from the Web3 Full-stack course withpackage.json:Why not adding a CLI cmd like
pnpm runfor moccasin and set a specific part for custom scripts like:And then with mox:
Maybe that's something that could be interesting or not. We'll have to take into account env variables too 🤔
Just putting my idea here before it vanishes!