Giter Site home page Giter Site logo

SyntaxError: ']' expected about svg-to-ts HOT 3 CLOSED

kreuzerk avatar kreuzerk commented on September 24, 2024
SyntaxError: ']' expected

from svg-to-ts.

Comments (3)

atbostudio avatar atbostudio commented on September 24, 2024 1

do you have any svg files in the given ("./svg-icons/") folder?
i had this error when the the path wasn't correct or the folder was empty.

maybe re-run npm install after deleting node_modules folder and package.lock.json.
if you are using windows try to adjust the path maybe.

here is also a running configuration, which worked for me, you might try (you may change the paths for your needs):

"svg-to-ts": {
    "conversionType": "files",
    "srcFiles": [
      "./projects/test-icons/icons/test-light/*.svg",
      "./projects/test-icons/icons/test-regular/*.svg",
      "./projects/test-icons/icons/test-bold/*.svg"
    ],
    "outputDirectory": "./projects/test-icons/src/lib/",
    "interfaceName": "TestIcon",
    "barrelFileName": "testIcon",
    "typeName": "testIcon",
    "modelFileName": "test-icons.model",
    "prefix": "test",
    "svgoConfig": {
      "plugins": [
        {
          "cleanupAttrs": true
        }
      ]
    },
    "additionalModelFile": "./projects/test-icons/src/lib"
  },

before running ng serve you could try npm run transform-icons which only triggers svg-to-ts

from svg-to-ts.

kreuzerk avatar kreuzerk commented on September 24, 2024

Can you retry with the latest version?

from svg-to-ts.

kreuzerk avatar kreuzerk commented on September 24, 2024

Hi @tomsoftwarealliance I will close this because I think this should be fixed with the latest version. Let me know if not and I am happy to reopen the issue.

from svg-to-ts.

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.