2017-03-13 3 views
1

グランターではなくGulpを実装するために公式ブートストラップリポジトリ(4.0.0-alpha.6)をフォークし、独自のニーズに応じてテーマブートを開始しました。JSPMは期待通りに依存関係を読み込まない

私たちが開発しているプロジェクトは、パッケージ管理のためにJSPMを使用しています。カスタムBootstrapプロジェクトをインストールしようとすると、依存関係が正しく読み込まれません。

実行中。

jspm install bootstrap=github:TomFoyster/[email protected] 

Looking up github:TomFoyster/bootstrap 
Updating registry cache... 
Looking up npm:jquery 
ok Installed npm:[email protected] (3.1.1) 
ok Installed bootstrap as github:TomFoyster/[email protected] (4.0.0-alpha6-ntt-0.0.3) 
Installed Forks 

          npm:jquery 2.2.4 3.1.1 

To inspect individual package constraints, use jspm inspect registry:name. 

ok Install complete. 

ただし、公式のブートストラップパッケージをインストールしてください。

jspm install [email protected] 

Updating registry cache... 
Looking up github:twbs/bootstrap 
Looking up npm:jquery 
Looking up github:HubSpot/tether 
ok Installed github:HubSpot/[email protected]^1.1.1 (1.4.0) 
ok Installed bootstrap as github:twbs/[email protected] (4.0.0-alpha.6) 
ok Install tree has no forks. 

ok Install complete. 

カスタムレポは、依存関係としてテザーをインストールしていない見て、また、jQueryのフォークをインストールすることができます - 公式パッケージにはフォークを持っていないのに対し、?

それぞれのリポジトリ内のpackage.jsonファイルの両方が次のものです。

"dependencies": { 
    "jquery": ">=1.9.1", 
    "tether": "^1.4.0" 
}, 

何が欠けていますか?

答えて

1

jspmでパッケージをインストールすると、jspm-registryが照会され、そのパッケージに定義されたエイリアスまたはオーバーライドがあるかどうかが確認されます。だから、読み取る、レジストリをチェックし、there is a custom override defined for [email protected]ことがわかります

jspm install [email protected] 

をやって:github:twbs/bootstrapで定義されているものは何でも

{ 
    "main": "dist/js/bootstrap", 
    "files": null, 
    "ignore": [ 
    "dist/js/npm" 
    ], 
    "shim": { 
    "dist/js/bootstrap": { 
     "deps": [ 
     "jquery", 
     "tether" 
     ], 
     "exports": "$" 
    } 
    }, 
    "dependencies": { 
    "jquery": "*", 
    "tether": "github:HubSpot/[email protected]^1.1.1" 
    } 
} 

そして、この設定をオーバーライドします。

あなたのフォークは、レジストリに存在しないので、package.json

+0

ファンタスティックな答えで定義されていますだけで何をインストール - おかげで、私はそれを推測したことがないと思います。 TetherはJSPMには存在しないので、それを推測しますか?これに合わせてフォークされたRepoを更新します - 上記の依存関係を持つ 'package.json'ファイルがNPMとJSPMで動作すると思いますか? – Tom

関連する問題