GithubHelp home page GithubHelp logo

Comments (9)

jschr avatar jschr commented on June 14, 2024

This is the error that I'm seeing when trying to parse the theme:

SyntaxError: Unexpected token } in JSON at position 29836

Unfortunately the error isn't super helpful but you can test it out here: https://repl.it/@jschr/fitz-dark-italic-vscode-theme.

All I'm doing is stripping out comments and running JSON.parse.

from web.

sheafitzek avatar sheafitzek commented on June 14, 2024

Thanks for the feedback. I'll have to try to debug it tomorrow evening.

from web.

jschr avatar jschr commented on June 14, 2024

Np, let me know what you find.

from web.

sheafitzek avatar sheafitzek commented on June 14, 2024

Turns out I had a lot of hanging commas in my theme json. I wonder why the marketplace didn't throw any errors at me when I uploaded it. So are you pulling theme info for your site from the marketplace or github?

from web.

jschr avatar jschr commented on June 14, 2024

Thanks for digging into this.

I'm pulling it from github but I'd like to remove the github dependency and download extensions directly from the marketplace. Tracking that in #93.

The marketplace isn't throwing an error because it's not trying to load the source of the theme. That happens in VSCode when the user installs the extension. My guess is VSCode is using require to load in the theme, which allows for comments and trailing commas.

I'm using JSON.parse because require is unsafe to use at the server. I'd like to find a way to remove trailing commas, just like I'm removing comments. Tracking that in #123.

from web.

sheafitzek avatar sheafitzek commented on June 14, 2024

My theme has been updated in the marketplace, along with my master branch. The repl.it linked above is no longer throwing errors, but I still don't see my theme on your site.

from web.

jschr avatar jschr commented on June 14, 2024

The sync only runs every 8 hours. I'm pushing through an update to strip trailing commas—I'll run it manually after #124 is merged. Your theme will show up shortly after that.

from web.

jschr avatar jschr commented on June 14, 2024

https://vscodethemes.com/e/sheafitzek.fitz-dark-italic-vscode-theme

from web.

sheafitzek avatar sheafitzek commented on June 14, 2024

I see it now. Thanks for all your help. There is one small discrepancy I see, but I'll open a separate issue for it. You can close this one down now.

from web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.