kash4kev / vscode-esp8266fs

Visual Studio Code extension for ESP8266/ESP32 File System (SPIFFS)
Other
16 stars 11 forks source link

Help with "one-button" dev cycle #3

Open josemariaaraujo opened 6 years ago

josemariaaraujo commented 6 years ago

In the readme you say:

Tip: Add the "esp866fs.packSpiffs" and "esp866fs.uploadSpiffs" command to your gulp/webpack toolchain to turn your VSCode/ESP8266/ESP32 into a "one-button" dev cycle.

I'm new to vscode and the searches I've made came empty regarding on how to do this. Can you please write some instructions?

Other than that (and it's not that important!) it's been working great, thank you for all your work!

kash4kev commented 6 years ago

Hey Jose,

It's the 4th here in the States, so I can't really get back to you immediately, but I promise I'll write something up for ya and help you through it.

Cheers, Kev

On Wed, Jul 4, 2018 at 2:54 PM josemariaaraujo notifications@github.com wrote:

In the readme you say:

Tip: Add the "esp866fs.packSpiffs" and "esp866fs.uploadSpiffs" command to your gulp/webpack toolchain to turn your VSCode/ESP8266/ESP32 into a "one-button" dev cycle.

I'm new to vscode and the searches I've made came empty regarding on how to do this. Can you please write instructions on how to do it? Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kash4kev/vscode-esp8266fs/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AHAKhyre52qezxGIeWNuRVz4kotXF6Yhks5uDTmDgaJpZM4VDC9l .

-- Cheers, Kev

flashpoint90 commented 5 years ago

Since there is no answer yet and i also struggled to get this running, here is my solution:

  1. Create a gulp task for processing your source files (Template: Optimizing files for SPIFFS with Gulp )
  2. Create a build task in vscode which contains these to parameters:

    "command": "${command:esp8266fs.packSpiffs}", "dependsOn": ["yourgulptask"]

This will first execute your gulp task and after that execute the packSpiffs command.

This is my tasks.json file:

{
    "version": "2.0.0",
    "tasks": [
        {
        "label": "Build SPIFFS Image",
            "command": "${command:esp8266fs.packSpiffs}",
            "group":{
                "kind": "build",
                "isDefault": true
            },
        "presentation": {
                "panel": "dedicated",
                "reveal": "never"
        },
        "dependsOn": [
                "buildfs2"
        ]
    },
        {
            "label": "buildfs2",
            "task": "buildfs2",
            "type": "gulp",
            "problemMatcher": [
                "$gulp-tsc"
            ],
            "group": "build"
        }
    ]
}

References: Run commands from tasks in vscode