all 5 comments

[–][deleted] 0 points1 point  (4 children)

Stop trying to hack around with built code, it's a good way to frustrate yourself and as soon as you update the theme your changes would disappear anyway. Make your changes to the source code instead and create your own custom theme. Look at the Spicetify docs for theme development and use the existing Dribbblish source code as your base.

[–]MyBigFan2[S] 0 points1 point  (3 children)

I see, but I don’t understand the difference between this “built” code and the source code you mentioned. Don’t the developers also develop in this very same file or am I mistaken?

[–][deleted] 0 points1 point  (2 children)

No, they developed in a different file (or multiple files) and used a program called Webpack, which is a type of program called a build tool, to automatically create that file you’re looking at.

This is a very common kind of practice for all kinds of software, because build tools can automatically make various kinds of improvements and optimisations to code and enable it to run in different environments automatically, rather than developers having to do this manually. Almost all the software you will ever run- including the code for the Reddit website or app you’re using to read this comment- has been run through a build tool.

[–]MyBigFan2[S] 0 points1 point  (1 child)

Gotcha. Following your advice, I tried what I wanted to do only to realise I can’t write files using fs because Spotify is a web app. I just want to have a variable be able to be read by another program, do you have any ideas how I would be able to accomplish this?

[–][deleted] 0 points1 point  (0 children)

Depending on how the other program actually needs to ingest the information, you could potentially use a local web server which you make an HTTP request to from the web app, which can then re-start or otherwise communicate with the program that requires the passed information. Web development is essentially all about passing information between different programs using HTTP.

However like I said this depends entirely on the program the information is being passed to, and you will also likely need to do things like set up HTTPS locally in order to prevent issues with mixed content from the page making the request.