2017-08-12 120 views
1

我想使用elm-mdl库的v9分支。Elm:安装特定版本的github库

我在elm-package.json添加native-modulestrue并添加external\elm-mdlsource-directories名单。

我加入"debois/elm-mdl": "9.0.0 <= v < 10.0.0",elm-package.json

我跑elm-install但抱怨:

▶ No solution found: Unable to satisfy the following requirements: 

- `debois/elm-mdl (< 10.0.0)` required by `user-specified dependency` 
- `debois/elm-mdl (>= 9.0.0)` required by `user-specified dependency` 

怎样才能让elm-installelm-make拿起库的克隆我的目录版本?

请参阅目录结构和下面elm-package.json输出:

└─ $ ▶ elm --version 
0.18.0 
└─ $ ▶ cat elm-package.json 
{ 
    "version": "1.0.0", 
    "summary": "Track your life.", 
    "repository": "https://github.com/user/project.git", 
    "license": "BSD3", 
    "native-modules": true, 
    "source-directories": [ 
     "src", 
     "external/elm-mdl" 
    ], 
    "exposed-modules": [], 
    "dependencies": { 
     "danyx23/elm-uuid": "2.1.0 <= v < 3.0.0", 
     "debois/elm-mdl": "9.0.0 <= v < 10.0.0", 
     "elm-lang/core": "5.1.1 <= v < 6.0.0", 
     "elm-lang/html": "2.0.0 <= v < 3.0.0", 
     "mgold/elm-random-pcg": "4.0.2 <= v < 6.0.0", 
     "rtfeldman/elm-css": "9.1.0 <= v < 10.0.0", 
     "rtfeldman/elm-css-helpers": "2.1.0 <= v < 3.0.0", 
     "sporto/elm-dropdown": "1.3.0 <= v < 2.0.0" 
    }, 
    "elm-version": "0.18.0 <= v < 0.19.0" 
} 

└─ $ ▶ cat external/elm-mdl/elm-package.json 
{ 
    "version": "9.1.0", 
    "summary": "Material Design Lite port to Elm", 
    "repository": "https://github.com/debois/elm-mdl.git", 
    "license": "Apache License, version 2.0", 
    "source-directories": [ 
     "src" 
    ... 

└─ $ ▶ ls external/elm-mdl/ 
build_scripts CONTRIBUTING.md COPYING.md demo elm-package.json examples FAQ.md foo.md LICENSE.md Makefile MIGRATION.md PR.md README.md RELEASE.md src TEMPLATES.md TESTING.md tests USERS.md 
ashish @ 7567 ~/work/be_autonomous (master) 
└─ $ ▶ ls 
Architecture.md compile_css.sh elm-package.json elm-stuff external index.css index.html index.js run.sh src TAGS tests 

回答

1

这里有一个答案,我准备早些时候:Using local packages

综上所述,删除你的依赖榆树MDL参考,并链接到文件夹中材料模块被定义,即:

"source-directories": [ 
    -- ADD src because Material.elm is under that folder 
    "external/elm-mdl/src" 
], 
"dependencies": { 
    -- REMOVE LINE BELOW 
    "debois/elm-mdl": "9.0.0 <= v < 10.0.0", 
}, 

然后它会错误的每个包elm-mdl取决于o n,根据上面引用的SO链接在本地添加它们。

+1

包括'elm-mdl'在你的elm-package.json中的所有依赖关系.. 不会进入递归依赖关系。 –