slamdata / purescript-echarts

Purescript bindings for Baidu's Echarts library
36 stars 16 forks source link

Trouble using echarts example (echarts is not defined) #8

Closed codygman closed 8 years ago

codygman commented 9 years ago

I tried to extract an example from the purescript echarts repo into a new project I created using pulp. I had some issues so I put everything in a git repo. I cloned that repo and reproduced my error with the shell session below:

cody@cody-G46VW:/tmp$ git clone git@github.com:codygman/purescript-echarts-example.git
Cloning into 'purescript-echarts-example'...
remote: Counting objects: 10, done.        
remote: Compressing objects: 100% (8/8), done.        
remote: Total 10 (delta 0), reused 10 (delta 0), pack-reused 0        
Receiving objects: 100% (10/10), done.
Checking connectivity... done.
cody@cody-G46VW:/tmp$ cd purescript-echarts-example/
cody@cody-G46VW:/tmp/purescript-echarts-example$ ls
bower.json  index.html  src  test
cody@cody-G46VW:/tmp/purescript-echarts-example$ pulp dep update
bower not-cached    git://github.com/slamdata/purescript-echarts.git#master
bower resolve       git://github.com/slamdata/purescript-echarts.git#master
bower checkout      purescript-echarts#master
bower invalid-meta  purescript-echarts is missing "main" entry in bower.json
bower resolved      git://github.com/slamdata/purescript-echarts.git#f51044ae22
bower cached        https://github.com/bodil/purescript-signal.git#df34ba55e8
bower validate      df34ba55e8 against https://github.com/bodil/purescript-signal.git#df34ba55e8cefbeee9dcd20167db80ca6491a325
bower cached        https://github.com/aktowns/purescript-simple-dom.git#0.0.2
bower validate      0.0.2 against https://github.com/aktowns/purescript-simple-dom.git#~0.0.1
bower cached        https://github.com/cryogenian/purescript-random.git#573de58651
bower validate      573de58651 against https://github.com/cryogenian/purescript-random.git#573de58651264a2b04636eed8f4bf09364fbca02
bower cached        git://github.com/ecomfe/echarts.git#2.1.10
bower validate      2.1.10 against git://github.com/ecomfe/echarts.git#~2.1.10
bower cached        git://github.com/joneshf/purescript-dom.git#0.1.2
bower validate      0.1.2 against git://github.com/joneshf/purescript-dom.git#~0.1.1
bower cached        git://github.com/purescript/purescript-maybe.git#0.2.2
bower validate      0.2.2 against git://github.com/purescript/purescript-maybe.git#~0.2.1
bower cached        git://github.com/purescript/purescript-foldable-traversable.git#0.3.1
bower validate      0.3.1 against git://github.com/purescript/purescript-foldable-traversable.git#~0.3.0
bower cached        git://github.com/purescript/purescript-maps.git#0.3.4
bower validate      0.3.4 against git://github.com/purescript/purescript-maps.git#~0.3.0
bower cached        git://github.com/purescript/purescript-control.git#0.2.6
bower validate      0.2.6 against git://github.com/purescript/purescript-control.git#~0.2.1
bower cached        git://github.com/purescript/purescript-tuples.git#0.3.4
bower validate      0.3.4 against git://github.com/purescript/purescript-tuples.git#~0.3.0
bower cached        git://github.com/purescript/purescript-arrays.git#0.3.7
bower validate      0.3.7 against git://github.com/purescript/purescript-arrays.git#~0.3.0
bower cached        git://github.com/purescript/purescript-math.git#0.1.1
bower validate      0.1.1 against git://github.com/purescript/purescript-math.git#~0.1.0
bower cached        git://github.com/purescript/purescript-monoid.git#0.2.0
bower validate      0.2.0 against git://github.com/purescript/purescript-monoid.git#~0.2.0
bower cached        git://github.com/purescript/purescript-sets.git#0.3.2
bower validate      0.3.2 against git://github.com/purescript/purescript-sets.git#~0.3.0
bower cached        git://github.com/purescript/purescript-strings.git#0.4.5
bower validate      0.4.5 against git://github.com/purescript/purescript-strings.git#~0.4.2
bower cached        git://github.com/purescript-contrib/purescript-argonaut.git#0.5.0
bower validate      0.5.0 against git://github.com/purescript-contrib/purescript-argonaut.git#~0.5.0
bower cached        git://github.com/purescript/purescript-datetime.git#0.5.3
bower validate      0.5.3 against git://github.com/purescript/purescript-datetime.git#~0.5.2
bower cached        git://github.com/paf31/purescript-exists.git#0.1.1
bower validate      0.1.1 against git://github.com/paf31/purescript-exists.git#~0.1.0
bower cached        git://github.com/purescript/purescript-refs.git#0.1.3
bower validate      0.1.3 against git://github.com/purescript/purescript-refs.git#~0.1.2
bower cached        git://github.com/CapillarySoftware/purescript-timers.git#0.0.8
bower validate      0.0.8 against git://github.com/CapillarySoftware/purescript-timers.git#0.0.8
bower cached        git://github.com/purescript/purescript-either.git#0.1.8
bower validate      0.1.8 against git://github.com/purescript/purescript-either.git#~0.1.4
bower cached        git://github.com/purescript/purescript-globals.git#0.1.6
bower validate      0.1.6 against git://github.com/purescript/purescript-globals.git#~0.1.5
bower cached        git://github.com/joneshf/purescript-lens.git#0.7.0
bower validate      0.7.0 against git://github.com/joneshf/purescript-lens.git#~0.7.0
bower cached        git://github.com/joneshf/purescript-optic.git#0.5.0
bower validate      0.5.0 against git://github.com/joneshf/purescript-optic.git#~0.5.0
bower cached        git://github.com/joneshf/purescript-index.git#0.3.0
bower validate      0.3.0 against git://github.com/joneshf/purescript-index.git#~0.3.0
bower cached        git://github.com/purescript/purescript-enums.git#0.4.0
bower validate      0.4.0 against git://github.com/purescript/purescript-enums.git#~0.4.0
bower cached        git://github.com/purescript/purescript-integers.git#0.1.0
bower validate      0.1.0 against git://github.com/purescript/purescript-integers.git#~0.1.0
bower cached        git://github.com/mankyKitty/purescript-distributive.git#0.4.1
bower validate      0.4.1 against git://github.com/mankyKitty/purescript-distributive.git#~0.4.1
bower cached        git://github.com/mankyKitty/purescript-profunctor.git#0.2.1
bower validate      0.2.1 against git://github.com/mankyKitty/purescript-profunctor.git#~0.2.1
bower cached        git://github.com/mankyKitty/purescript-const.git#0.4.1
bower validate      0.4.1 against git://github.com/mankyKitty/purescript-const.git#~0.4.1
bower cached        git://github.com/purescript/purescript-identity.git#0.3.0
bower validate      0.3.0 against git://github.com/purescript/purescript-identity.git#~0.3.0
bower cached        git://github.com/mankyKitty/purescript-contravariant.git#0.1.0
bower validate      0.1.0 against git://github.com/mankyKitty/purescript-contravariant.git#~0.1.0
bower cached        git://github.com/purescript/purescript-transformers.git#0.5.5
bower validate      0.5.5 against git://github.com/purescript/purescript-transformers.git#~0.5.0
bower cached        git://github.com/purescript-contrib/purescript-bifunctors.git#0.3.1
bower validate      0.3.1 against git://github.com/purescript-contrib/purescript-bifunctors.git#~0.3.0
bower cached        git://github.com/paf31/purescript-unfoldable.git#0.3.2
bower validate      0.3.2 against git://github.com/paf31/purescript-unfoldable.git#~0.3.0
bower install       purescript-echarts#f51044ae22
bower install       purescript-signal#df34ba55e8
bower install       purescript-random#573de58651
bower install       purescript-dom#0.1.2
bower install       purescript-maybe#0.2.2
bower install       purescript-foldable-traversable#0.3.1
bower install       echarts#2.1.10
bower install       purescript-control#0.2.6
bower install       purescript-maps#0.3.4
bower install       purescript-tuples#0.3.4
bower install       purescript-simple-dom#0.0.2
bower install       purescript-arrays#0.3.7
bower install       purescript-math#0.1.1
bower install       purescript-monoid#0.2.0
bower install       purescript-sets#0.3.2
bower install       purescript-argonaut#0.5.0
bower install       purescript-strings#0.4.5
bower install       purescript-datetime#0.5.3
bower install       purescript-exists#0.1.1
bower install       purescript-refs#0.1.3
bower install       purescript-either#0.1.8
bower install       purescript-timers#0.0.8
bower install       purescript-globals#0.1.6
bower install       purescript-lens#0.7.0
bower install       purescript-optic#0.5.0
bower install       purescript-index#0.3.0
bower install       purescript-enums#0.4.0
bower install       purescript-integers#0.1.0
bower install       purescript-distributive#0.4.1
bower install       purescript-profunctor#0.2.1
bower install       purescript-const#0.4.1
bower install       purescript-identity#0.3.0
bower install       purescript-contravariant#0.1.0
bower install       purescript-bifunctors#0.3.1
bower install       purescript-unfoldable#0.3.2
bower install       purescript-transformers#0.5.5

purescript-echarts#f51044ae22 bower_components/purescript-echarts
├── echarts#2.1.10
├── purescript-argonaut#0.5.0
├── purescript-arrays#0.3.7
├── purescript-control#0.2.6
├── purescript-datetime#0.5.3
├── purescript-dom#0.1.2
├── purescript-exists#0.1.1
├── purescript-foldable-traversable#0.3.1
├── purescript-maps#0.3.4
├── purescript-math#0.1.1
├── purescript-maybe#0.2.2
├── purescript-monoid#0.2.0
├── purescript-random#573de58651
├── purescript-sets#0.3.2
├── purescript-signal#df34ba55e8
├── purescript-simple-dom#0.0.2
├── purescript-strings#0.4.5
└── purescript-tuples#0.3.4

purescript-signal#df34ba55e8 bower_components/purescript-signal
├── purescript-dom#0.1.2
├── purescript-refs#0.1.3
└── purescript-timers#0.0.8

purescript-random#573de58651 bower_components/purescript-random
└── purescript-math#0.1.1

purescript-dom#0.1.2 bower_components/purescript-dom

purescript-maybe#0.2.2 bower_components/purescript-maybe
└── purescript-control#0.2.6

purescript-foldable-traversable#0.3.1 bower_components/purescript-foldable-traversable
├── purescript-arrays#0.3.7
├── purescript-control#0.2.6
├── purescript-either#0.1.8
├── purescript-maybe#0.2.2
├── purescript-monoid#0.2.0
└── purescript-tuples#0.3.4

echarts#2.1.10 bower_components/echarts

purescript-control#0.2.6 bower_components/purescript-control

purescript-maps#0.3.4 bower_components/purescript-maps
├── purescript-arrays#0.3.7
├── purescript-foldable-traversable#0.3.1
├── purescript-math#0.1.1
├── purescript-maybe#0.2.2
├── purescript-strings#0.4.5
└── purescript-tuples#0.3.4

purescript-tuples#0.3.4 bower_components/purescript-tuples
├── purescript-arrays#0.3.7
├── purescript-control#0.2.6
└── purescript-monoid#0.2.0

purescript-simple-dom#0.0.2 bower_components/purescript-simple-dom
├── purescript-arrays#0.3.7
├── purescript-dom#0.1.2
├── purescript-foldable-traversable#0.3.1
├── purescript-maybe#0.2.2
├── purescript-sets#0.3.2
├── purescript-strings#0.4.5
└── purescript-tuples#0.3.4

purescript-arrays#0.3.7 bower_components/purescript-arrays
├── purescript-control#0.2.6
└── purescript-maybe#0.2.2

purescript-math#0.1.1 bower_components/purescript-math

purescript-monoid#0.2.0 bower_components/purescript-monoid
├── purescript-arrays#0.3.7
└── purescript-maybe#0.2.2

purescript-sets#0.3.2 bower_components/purescript-sets
├── purescript-arrays#0.3.7
├── purescript-foldable-traversable#0.3.1
├── purescript-maps#0.3.4
├── purescript-maybe#0.2.2
└── purescript-tuples#0.3.4

purescript-argonaut#0.5.0 bower_components/purescript-argonaut
├── purescript-control#0.2.6
├── purescript-either#0.1.8
├── purescript-foldable-traversable#0.3.1
├── purescript-globals#0.1.6
├── purescript-index#0.3.0
├── purescript-lens#0.7.0
├── purescript-maps#0.3.4
├── purescript-maybe#0.2.2
├── purescript-optic#0.5.0
├── purescript-sets#0.3.2
├── purescript-strings#0.4.5
└── purescript-tuples#0.3.4

purescript-strings#0.4.5 bower_components/purescript-strings
└── purescript-maybe#0.2.2

purescript-datetime#0.5.3 bower_components/purescript-datetime
├── purescript-enums#0.4.0
├── purescript-globals#0.1.6
├── purescript-integers#0.1.0
└── purescript-maybe#0.2.2

purescript-exists#0.1.1 bower_components/purescript-exists

purescript-refs#0.1.3 bower_components/purescript-refs

purescript-either#0.1.8 bower_components/purescript-either
└── purescript-control#0.2.6

purescript-timers#0.0.8 bower_components/purescript-timers

purescript-globals#0.1.6 bower_components/purescript-globals

purescript-lens#0.7.0 bower_components/purescript-lens
├── purescript-const#0.4.1
├── purescript-distributive#0.4.1
├── purescript-either#0.1.8
├── purescript-identity#0.3.0
├── purescript-maybe#0.2.2
└── purescript-profunctor#0.2.1

purescript-optic#0.5.0 bower_components/purescript-optic
├── purescript-bifunctors#0.3.1
├── purescript-const#0.4.1
├── purescript-contravariant#0.1.0
├── purescript-control#0.2.6
├── purescript-distributive#0.4.1
├── purescript-either#0.1.8
├── purescript-enums#0.4.0
├── purescript-foldable-traversable#0.3.1
├── purescript-identity#0.3.0
├── purescript-lens#0.7.0
├── purescript-maybe#0.2.2
├── purescript-monoid#0.2.0
├── purescript-profunctor#0.2.1
├── purescript-transformers#0.5.5
└── purescript-tuples#0.3.4

purescript-index#0.3.0 bower_components/purescript-index
├── purescript-identity#0.3.0
├── purescript-maps#0.3.4
├── purescript-maybe#0.2.2
└── purescript-sets#0.3.2

purescript-enums#0.4.0 bower_components/purescript-enums
├── purescript-either#0.1.8
├── purescript-maybe#0.2.2
├── purescript-strings#0.4.5
├── purescript-tuples#0.3.4
└── purescript-unfoldable#0.3.2

purescript-integers#0.1.0 bower_components/purescript-integers

purescript-distributive#0.4.1 bower_components/purescript-distributive
└── purescript-identity#0.3.0

purescript-profunctor#0.2.1 bower_components/purescript-profunctor
├── purescript-either#0.1.8
└── purescript-tuples#0.3.4

purescript-const#0.4.1 bower_components/purescript-const
├── purescript-contravariant#0.1.0
├── purescript-foldable-traversable#0.3.1
└── purescript-monoid#0.2.0

purescript-identity#0.3.0 bower_components/purescript-identity
└── purescript-foldable-traversable#0.3.1

purescript-contravariant#0.1.0 bower_components/purescript-contravariant
├── purescript-control#0.2.6
└── purescript-monoid#0.2.0

purescript-bifunctors#0.3.1 bower_components/purescript-bifunctors
├── purescript-const#0.4.1
├── purescript-control#0.2.6
├── purescript-either#0.1.8
├── purescript-foldable-traversable#0.3.1
├── purescript-monoid#0.2.0
└── purescript-tuples#0.3.4

purescript-unfoldable#0.3.2 bower_components/purescript-unfoldable
├── purescript-arrays#0.3.7
├── purescript-maybe#0.2.2
└── purescript-tuples#0.3.4

purescript-transformers#0.5.5 bower_components/purescript-transformers
├── purescript-arrays#0.3.7
├── purescript-control#0.2.6
├── purescript-either#0.1.8
├── purescript-identity#0.3.0
├── purescript-monoid#0.2.0
└── purescript-tuples#0.3.4
cody@cody-G46VW:/tmp/purescript-echarts-example$ ls
bower_components  bower.json  index.html  src  test
cody@cody-G46VW:/tmp/purescript-echarts-example$ mkdir dist
cody@cody-G46VW:/tmp/purescript-echarts-example$ pulp browserify > dist/index.js
* Browserifying project in /tmp/purescript-echarts-example
* Building project in /tmp/purescript-echarts-example
* Build successful.
* Browserifying...
cody@cody-G46VW:/tmp/purescript-echarts-example$ firefox index.html

Then vising the page in browser and looking at console:

ReferenceError: echarts is not defined index.js:13421:4
cryogenian commented 9 years ago

Hello, add echarts-all.js to html or concat your bundle with it.