Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-75783

Add vscode jsconfig.json configuration

    XMLWordPrintable

Details

    • MOODLE_401_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-75783-311
    • MDL-75783-400
    • MDL-75783-master
    • Hide
      Prerequisite
      1. Install node version manager
      2. Go to your moodle root folder.
      3. Run the following:

        nvm use
        nvm install
        npm install
        

      Test
      1. Run grunt vscode:

        npx grunt jsconfig
        

      2. Open up vscode for your Moodle checkout
        Note: The Workspace must be the root directory of the Moodle install
        Note: If you had it open already, you will need to reload the window (Developer: Reload Window command)
      3. Find a JS file using the ES6+ format (not older RequireJS format)
      4. Control + Click on an import statement
        1. Bask in the magic that opens the correct file

      Note: You may need to give it a moment the first time it loads after generating the file while it scans the modules.

      Show
      Prerequisite Install node version manager Go to your moodle root folder. Run the following: nvm use nvm install npm install Test Run grunt vscode: npx grunt jsconfig Open up vscode for your Moodle checkout Note: The Workspace must be the root directory of the Moodle install Note: If you had it open already, you will need to reload the window ( Developer: Reload Window command) Find a JS file using the ES6+ format (not older RequireJS format) Control + Click on an import statement Bask in the magic that opens the correct file Note: You may need to give it a moment the first time it loads after generating the file while it scans the modules.

    Description

      vscode, and potentially other IDEs too, can use a jsconfig.json file to translate JS module names into paths and thus support intellisense features.

      Would be great to support it.

      Attachments

        1. 75783.mov
          38.88 MB
        2. MDL-75783-311.mp4
          2.64 MB
        3. MDL-75783-400.mp4
          2.57 MB
        4. MDL-75783-master.mp4
          2.46 MB

        Activity

          People

            dobedobedoh Andrew Lyons
            dobedobedoh Andrew Lyons
            Andrew Lyons Andrew Lyons
            Jun Pataleta Jun Pataleta
            Kevin Percy Kevin Percy
            David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              14/Nov/22

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 15 minutes
                4h 15m