feathericons / elm-feather

Feather icons for elm
http://package.elm-lang.org/packages/1602/elm-feather/latest
BSD 3-Clause "New" or "Revised" License
77 stars 4 forks source link

Cannot find module 'Icons' #1

Closed screendriver closed 6 years ago

screendriver commented 6 years ago
❯ elm package install 1602/elm-feather
To install 1602/elm-feather I would like to add the following
dependency to elm-package.json:

    "1602/elm-feather": "1.0.0 <= v < 2.0.0"

May I add that to elm-package.json for you? [Y/n] 

Some new packages are needed. Here is the upgrade plan.

  Install:
    1602/elm-feather 1.0.0
    elm-lang/svg 2.0.0

Do you approve of this plan? [Y/n] 
Starting downloads...

  ● elm-lang/svg 2.0.0
  ● 1602/elm-feather 1.0.0

Packages configured successfully!

In my Main.elm I do a import FeatherIcons and get a

Failed to compile.

./src/Main.elm
I cannot find module 'Icons'.

This module is demanded in elm-package.json.

I saw that you fixed exposed-modules in your elm-package.json and bumped the version to 1.0.1 but unfortunately that version doesn't get installed. It always installs 1.0.0 at my machine 🤔 Any ideas?

1602 commented 6 years ago

Oops, this is unfortunate. Let me publish updated version.

1602 commented 6 years ago

@screendriver I published 1.0.1, works fine for fresh install:

Main.elm

module Main exposing (main)

import FeatherIcons
import Html

main : Html.Html msg
main =
    FeatherIcons.award

elm-package.json

{
    "version": "1.0.0",
    "summary": "helpful summary of your project, less than 80 characters",
    "repository": "https://github.com/user/project.git",
    "license": "BSD3",
    "source-directories": [
        "."
    ],
    "exposed-modules": [],
    "dependencies": {
        "1602/elm-feather": "1.0.1 <= v < 2.0.0",
        "elm-lang/core": "5.1.1 <= v < 6.0.0",
        "elm-lang/html": "2.0.0 <= v < 3.0.0"
    },
    "elm-version": "0.18.0 <= v < 0.19.0"
}
screendriver commented 6 years ago

Cools thanks 👍

Now if you add a color and size option your package is equal to arnau/elm-feather 😁 I found out that there are two packages for feather: yours and the other one. Both looks nearly the same 😉

1602 commented 6 years ago

@screendriver size of icon is something to think about (not sure it is something that is safe to change, part of clipboard icon might disappear, for example). Colour is controlled by the context of the icon. So, I'd leave API simpler, especially if there's an alternative API available ;)

To be honest I didn't even checked that other package exists, since I didn't want to create a package in the first place :) I just created this: https://1602.github.io/elm-feather-icons/ to generate minimal amount of icons code needed for my case, then somebody asked to create a package, so here it is. Duplicate, apparently!