Faster way to wipe the contents of the assets folder?


#1

Hi there - I’m wondering if there’s a way to delete all the files in the assets folder in one go (e.g. from the command line)? I’m often remixing apps that have a bunch of stuff in there that I want to remove to reduce clutter, and while I know I can delete each file one by one, I wanted to see if there’s a faster way to go about it. I can’t see the folder at all in the command line though, which I assume is due to it being a virtual folder?

Thanks in advance!
Sheridan


#2
rm -rf ./assets

There is also an npm module if you want to incorporate as part of your build process.

I add to my package.json a “build” task which includes this cleanup

{
    ...
    "scripts": {
        "build": "rimraf ./public && webpack && refresh",
        ....
    }
    ...
}

Which I just call from the command line with npm run build


#3

There isn’t at the moment. But the content of what appears in assets is just a file .glitch-assets which you can edit if you’re careful.

weston - your suggestions are great, but ‘assets’ in the Glitch editor isn’t an actual folder so they don’t apply in this case.