Skip to content

Adding a "scripts" feature in Moccasin TOML to replace just #242

@s3bc40

Description

@s3bc40

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions