0

私はブランチとチャップリンのボイラープレートから始めましたが、シノンとクニットをミックスに追加したいと思いました。だから私はそれらをに追加し、bower.jsonでインストールしましたbower install <lib>。それはすべて非常にスムーズに機能しますが、今は次のような機能にアクセスしたいと思います:

Model = require './model'

module.exports = class Collection extends Chaplin.Collection
  # Mixin a synchronization state machine.
  # _(@prototype).extend Chaplin.SyncMachine
  # initialize: ->
  #   super
  #   @on 'request', @beginSync
  #   @on 'sync', @finishSync
  #   @on 'error', @unsync

  # Use the project base model per default, not Chaplin.Model

    model: Model

    initialize: ->
        @on 'request', @reply

    reply: ->
        console.log QUnit # this works
        console.log Sinon # this error's
        console.log 'requested'

アップデート:

手動でビルドするとbrunch build、エラーが発生しました

error: [Error: Component JSON file     
"/Users/Simon/Development/myparcel/data/myparcel/bower_components/sinon/.bower.json"
must have `main` property. 
See https://github.com/paulmillr/read-components#README]

だから私"main":"sinon.js"は運なしでファイルに追加しました。

4

1 に答える 1