senecajs / senecajs.org

Documentation site for Seneca.js
MIT License
28 stars 52 forks source link

Fix documentation for Seneca 2.x #220

Open temsa opened 8 years ago

temsa commented 8 years ago

Currently,

If you try to do the get started tutorial from a simple npm i seneca (or npm i seneca@latest) you will run into troubles, because it installs seneca-2.0 and there has been some breaks in the API, so everything does just not work out of the box. It feels like a pretty terrible experience for newcomers.

Notably, seneca.make does not exists anymore by simply requiring seneca, and it seems to need seneca-entity now, both installed (npm i seneca-entity) and required seneca().use(require('seneca-entity')) for being able to call seneca.make(...)

This seems to fix some issues, yet I still run into some. Maybe if seneca-2.0 documentation is not ready, it should no be published as the default version ? Otherwise the getting-started section of the documentation and the API sections of the website should be updated asap ?

mcdonnelldean commented 8 years ago

@temsa Good spot here. This is something that we'll get somebody to fix up before the end of the week.

temsa commented 8 years ago

👍 :)

naomifeehan commented 8 years ago

hey @temsa this issue has been addressed in https://github.com/senecajs/senecajs.org/pull/225

temsa commented 8 years ago

Thanks @naomifeehanmoran, your patch looks great, yet I still see the old getting-started on http://senecajs.org/get-started/, is it normal ?

naomifeehan commented 8 years ago

Hey @temsa I merged the PR so the http://senecajs.org/get-started/ is now updated.

jmatsushita commented 8 years ago

Hi there, I ran into the same problem when following the Data Entity tutorial which hasn't yet been updated : http://senecajs.org/tutorials/understanding-data-entities.html

akeelnazir commented 8 years ago

Hi there,

A product with good promises, but poor/out-of-date documentation.

Please fix.

Many thanks

mindreframer commented 8 years ago

same here. get-started guide has some subtle differences with the actual output....

$ node math-tree.js --seneca.print.tree
    2016-06-17T18:07:39.408Z otk48cbcwdfd/1466186859380/56404/- INFO  hello Seneca/2.0.0/otk48cbcwdfd/1466186859380/56404/-
    Seneca action patterns for instance: otk48cbcwdfd/1466186859380/56404/-

and NOT the expected: 

$ node math-tree.js --seneca.print.tree
2016 ... INFO    hello    ...
Seneca action patterns for instance: 9vjqzroin2k4/1436455291148/78025/-
├─┬ cmd:sum
│ └─┬ role:math
│   └── # math, (s1a28),
│       # math, (sw9ew), sum
└─┬ cmd:product
  └─┬ role:math
    └── # math, (sxti2),
        # math, (b8gcw), product

also the log output differs

$ node math-plugin.js --seneca.log.all | grep math

2016-06-17T18:10:41.547Z gve89wfde4ki/1466187041209/56521/- DEBUG ADD (lkjnlh9bu9a3)  name:math,plugin:define,role:seneca,seq:5,tag:undefined plugin_definition
2016-06-17T18:10:41.645Z gve89wfde4ki/1466187041209/56521/- DEBUG act root$         IN  q2y46brcwtjr/e7nexx2d1329 name:math,plugin:define,role:seneca,seq:5,tag:undefined {role:seneca,plugin:define,name:math,tag:null,seq:5}  ENTRY (lkjnlh9bu9a3)  - - GATE
2016-06-17T18:10:41.646Z gve89wfde4ki/1466187041209/56521/- DEBUG - - ACT q2y46brcwtjr/e7nexx2d1329 name:math,plugin:define,role:seneca,seq:5,tag:undefined register  init  math    {}
2016-06-17T18:10:41.646Z gve89wfde4ki/1466187041209/56521/- DEBUG - - ACT q2y46brcwtjr/e7nexx2d1329 name:math,plugin:define,role:seneca,seq:5,tag:undefined plugin  math        ADD (n03b38fje85b)  cmd:sum,role:math sum
2016-06-17T18:10:41.647Z gve89wfde4ki/1466187041209/56521/- DEBUG - - ACT q2y46brcwtjr/e7nexx2d1329 name:math,plugin:define,role:seneca,seq:5,tag:undefined plugin  math        ADD (kuzmo6359sde)  cmd:product,role:math product
2016-06-17T18:10:41.647Z gve89wfde4ki/1466187041209/56521/- DEBUG - - ACT q2y46brcwtjr/e7nexx2d1329 name:math,plugin:define,role:seneca,seq:5,tag:undefined plugin  math        options set {math:{}}
2016-06-17T18:10:41.649Z gve89wfde4ki/1466187041209/56521/- DEBUG - - ACT q2y46brcwtjr/e7nexx2d1329 name:math,plugin:define,role:seneca,seq:5,tag:undefined register  install math  {exports:[]}
2016-06-17T18:10:41.649Z gve89wfde4ki/1466187041209/56521/- DEBUG - - ACT q2y46brcwtjr/e7nexx2d1329 name:math,plugin:define,role:seneca,seq:5,tag:undefined act - - DEFAULT {init:math,tag:null}
2016-06-17T18:10:41.649Z gve89wfde4ki/1466187041209/56521/- DEBUG - - ACT q2y46brcwtjr/e7nexx2d1329 name:math,plugin:define,role:seneca,seq:5,tag:undefined register  ready math  {}
2016-06-17T18:10:41.650Z gve89wfde4ki/1466187041209/56521/- DEBUG act root$         OUT q2y46brcwtjr/e7nexx2d1329 name:math,plugin:define,role:seneca,seq:5,tag:undefined null  EXIT  (lkjnlh9bu9a3)  - - 102 GATE
2016-06-17T18:10:41.650Z gve89wfde4ki/1466187041209/56521/- DEBUG act math        IN  bgfklgggpoi5/8p1wwlh7y769 cmd:sum,role:math {role:math,cmd:sum,left:1,right:2}  ENTRY (n03b38fje85b)  - - -
2016-06-17T18:10:41.650Z gve89wfde4ki/1466187041209/56521/- DEBUG act math        OUT bgfklgggpoi5/8p1wwlh7y769 cmd:sum,role:math {answer:3}  EXIT(n03b38fje85b)  - - 96  -