choffmeister / roboto-fontface-bower

Bower package for the Roboto font-face
Apache License 2.0
153 stars 56 forks source link

invalid-meta #35

Closed ajsb85 closed 7 years ago

ajsb85 commented 7 years ago
bower roboto-fontface#*   invalid-meta for:\bower.json
bower roboto-fontface#*   invalid-meta The "main" field cannot contain globs (example: "*.js")
bower roboto-fontface#*   invalid-meta The "main" field cannot contain globs (example: "*.js")
bower roboto-fontface#*   invalid-meta The "main" field has to contain only 1 file per filetype; found multiple .css files: ["./css/roboto/roboto-fontface.css","./css/roboto-condensed/r
oboto-condensed-fontface.css"]
bower roboto-fontface#*   invalid-meta The "main" field has to contain only 1 file per filetype; found multiple .* files: ["./fonts/roboto/*.*","./fonts/roboto-condensed/*.*"]
choffmeister commented 7 years ago

@ajsb85 I don't use bower anymore since a long time. Can you support me in fixing this? I don't know what the correct and most common way to populate the main field for bower is.

ajsb85 commented 7 years ago

From bower.json specification

main

Recommended

Type: String or Array of String

The entry-point files necessary to use your package. Only one file per filetype.

Entry-point files have module exports and may use module imports. While Bower does not directly use main files, they are listed with the commands bower list --json and bower list --paths, so they can be used by build tools.

Let's say your package looks like this:

package
  js/
    motion.js
    run.js
    walk.js
  sass/
    motion.scss
    run.scss
    walk.scss
  img/
    motion.png
    walk.png
    run.png
  fonts/
    icons.woff2
    icons.woff
  dist/
    movement.js
    movement.min.js
    movement.css
    movement.min.css

motion.js has module imports for run.js and walk.js. motion.scss has module imports for run.scss and walk.scss. main would be

"main": [
  "js/motion.js",
  "sass/motion.scss",
]

Image and font files may be used or referenced within the JS or Sass files, but are not main files as they are not entry-points.

choffmeister commented 7 years ago

@ajsb85 Thx for the fix. Released as 0.6.1