Skip to content

✨ Tasks (Run scripts in the shell) #262

Description

@Angelk90

Is your feature request related to a problem? Please describe.

Registrazione.schermo.2022-03-26.alle.09.30.34.mov

You know that XCode has a menu like this, which allows you to run tests and other things as well as run the program.

It would be useful to have something like this, but which allows you to run scripts found in the package.json file.

Script package.json example:

"scripts": {
    "typescript": "tsc --noEmit",
    "lint": "eslint \"**/*.{js,ts,tsx}\"",
    "lint-ci": "yarn lint -f ./node_modules/@firmnav/eslint-github-actions-formatter/dist/formatter.js",
    "build": "bob build",
    "release": "release-it",
    "pods": "cd example && yarn pods",
    "bootstrap": "yarn && cd example && yarn && yarn setup && yarn pods",
    "check-android": "scripts/ktlint.sh && scripts/cpplint.sh",
    "check-ios": "scripts/swiftformat.sh && scripts/swiftlint.sh",
    "check-js": "yarn lint --fix && yarn typescript",
    "check-all": "scripts/check-all.sh",
    "clean-ios": "scripts/clean-ios.sh",
    "clean-android": "scripts/clean-android.sh",
    "clean-js": "scripts/clean-js.sh",
    "docs": "cd docs && yarn build"
  }

Describe the solution you'd like
So if the project contains a package.json file it tries to read it, if it finds any scripts, it puts them in the menu to let you run them.
When one of the scripts is pressed, it starts the script in a new shell.

Activity

  1. pkasila commented on Mar 26, 2022

    @pkasila
    Member

    @jasonplatts, I think that it's related to #76

  2. Angelk90 commented on Mar 26, 2022

    @Angelk90
    ContributorAuthor

    @pkasila : I don't know, do you think such a thing could be useful?
    Do you see it more as a plugin?

  3. lukepistrol commented on Mar 26, 2022

    @lukepistrol
    Member

    My take on this is that we should enable it in our plugin API so plugin developers can choose what action they want to perform on "play". Similar to how VSCode handles it.

  4. pkasila commented on Mar 26, 2022

    @pkasila
    Member

    As @lukepistrol said, we implement API for extensions to provide targets, tests and so on. So, NodeJS extension reads package.json and creates npm start target and anything else using Extension API and these targets appear in the UI

  5. jasonplatts commented on Mar 27, 2022

    @jasonplatts
    Collaborator

    Yeah, I agree. It seems like it might be better as an extension. Nova offers tasks, https://docs.nova.app/extensions/run-configurations/.

  6. added
    extensionsIssues related to the extension architecture in CodeEdit
    on Mar 27, 2022
  7. changed the title [-][FEAT] - Run scripts in the shell[/-] [+][FEAT] Tasks (Run scripts in the shell)[/+] on Mar 27, 2022
  8. jasonplatts commented on Mar 27, 2022

    @jasonplatts
    Collaborator

    As @lukepistrol said, we implement API for extensions to provide targets, tests and so on. So, NodeJS extension reads package.json and creates npm start target and anything else using Extension API and these targets appear in the UI

    Here is the link to VS Code tasks. https://code.visualstudio.com/docs/editor/tasks

  9. changed the title [-][FEAT] Tasks (Run scripts in the shell)[/-] [+]✨ Tasks (Run scripts in the shell)[/+] on Mar 31, 2022
  10. jasonplatts commented on Apr 3, 2022

    @jasonplatts
    Collaborator

    Overview

    The Task Provider should allow extension developers to define external tools that can be run from a CodeEdit menu option and the command palette. These tasks should be capable of running command line tools, such as Grunt, npm, Rake, Gulp, etc. Results from running these tasks should appear in the console within CodeEdit.

    Resources

    https://code.visualstudio.com/docs/editor/tasks
    https://code.visualstudio.com/api/extension-guides/task-provider

  11. deleted a comment from stale on Jun 3, 2022
  12. removed
    wontfixThis will not be worked on
    on Jun 3, 2022
  13. 6 remaining items

  14. moved this from 🆕 New to 💬 Needs Clarification in CodeEdit Projecton Feb 17, 2023
  15. moved this from 💬 Needs Clarification to 📋 Backlog in CodeEdit Projecton Mar 4, 2023
  16. iggy890 commented on Mar 15, 2023

    @iggy890
    Contributor

    I'm taking my hand at this and on discord there is general agreement that there should be some kind of configuration that users can access on how the project is run, how should this be implemented?

  17. lukepistrol commented on Mar 15, 2023

    @lukepistrol
    Member

    @iggy890 I don’t want to step on your toes with this but based on your latest commits in PRs I think this is better suited for a more experienced developer since this will be an important part of the app and most possibly it needs to align with our yet-to-come extensions API.

  18. iggy890 commented on Mar 16, 2023

    @iggy890
    Contributor

    @iggy890 I don’t want to step on your toes with this but based on your latest commits in PRs I think this is better suited for a more experienced developer since this will be an important part of the app and most possibly it needs to align with our yet-to-come extensions API.

    That makes sense my basic implementation is here (someone could continue it here just create a PR or DM me on discord and I'll add you as a contributor to that branch): https://github.com/iggy890/CodeEdit/tree/run-code

  19. Angelk90 commented on Mar 16, 2023

    @Angelk90
    ContributorAuthor

    @lukepistrol : I'd give @iggy890 a chance, creating an initial base wouldn't be bad.

  20. jenslys commented on Apr 3, 2023

    @jenslys

    Small suggestion adding to my prev comment: #262 (comment):

    Screenshot

    Screenshot 2023-04-03 at 16 53 50@2x

    like IntelliJ, the standard option is just to run the current file.
    but if you want to have some custom configuration, you can create a new configuration file for that workspace with the dropdown. but it defaults to just running the current file

    Screenshot

    Screenshot 2023-04-03 at 16 59 58@2x

    Codeedit would need to have some custom task.json file that would read the custom config.
    Don't know how npm scripts would work, identify npm start as standard?

  21. self-assigned this
    on Jun 13, 2024
  22. added this to the v0.2.0 milestone on Jun 13, 2024
  23. moved this from 📋 Backlog to 🏁 Complete in CodeEdit Projecton Jul 27, 2024
  24. added a commit that references this issue on Jul 28, 2024
    b2b4909
  25. added a commit that references this issue on Sep 7, 2024
  26. JuZai114514 commented on Jul 18, 2025

    @JuZai114514

    Yes, this app will need such a thing to run different files instead of just keep modifying the paths!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestextensionsIssues related to the extension architecture in CodeEdit

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions