marko-js / marko

A declarative, HTML-based language that makes building web apps fun
https://markojs.com/
MIT License
13.36k stars 643 forks source link

dx barriers to entry tags api preview gripes suggestions #1858

Open leoj3n opened 1 year ago

leoj3n commented 1 year ago

--template flag does not work.

https://twitter.com/MarkoDevTeam/status/1420431542485012485

Or get started with: npm init marko --template tags-api

this command proposes a dialog to the user to select "Default starter app"

TODO: Twitter post should be ammended to read like that:

Or get started with: npm init marko@latest -- --template tags-api

probably will need to see if fix can be made in https://github.com/marko-js/cli also notice suggesting a slight difference to command here: https://github.com/marko-js/cli/tree/main/packages/create#npm npm init @marko myapp --template webpack notice the @marko instead of just marko EDIT: proposed changes here https://github.com/marko-js/cli/pull/214

Example code errors

so after --template tags-api fails causing regular marko5 app user may go ahead and npm install @marko/tags-api-preview then they may try copy/paste example from readme at https://github.com/marko-js/tags-api-preview#example which will fail to compile at which point developer user might say screw it EDIT: proposed changes here https://github.com/marko-js/tags-api-preview/pull/29

Consider specifying @latest:

npm init marko@latest --template ...

just assuming that @latest could help if someone somehow has outdated marko NOTE: primarily a suggestion for the Twitter post and/or blog type posts

More examples

regarding: https://github.com/marko-js/tags-api-preview TODO: mention using npm init marko -- --template tags-api command to create a new project TODO: point to https://github.com/marko-js/examples/tree/master/examples/tags-api-guide as well

regarding: https://dev.to/ryansolid/introducing-the-marko-tags-api-preview-37o4 TODO: cannot copy/paste code examples as they are all images... perhaps at least provide try online links like for initial count example... could perhaps be added to examples repo as a set of examples similar to the tags-api-guide set of examples TODO: mention using npm init marko@latest -- --template tags-api command to create a new project

DylanPiercey commented 1 year ago

Appreciate the callout. We'll look into smoothing those things out. PR's welcome of course 😄

leoj3n commented 1 year ago

Linking related PR https://github.com/marko-js/tags-api-preview/pull/29 (for compile error in readme example)

Linking related PR https://github.com/marko-js/cli/pull/214 (updates npm init command in cli readme)

leoj3n commented 1 year ago

@DylanPiercey looking like the primary issues with A) the readme example needing to be updated to be <let/count=0/> and B) with the npm command needing to look like npm init marko -- --template tags-api should take a minute to solve; think probably do what needs to be done asap since it will make a big difference for people trying to play with tags-api coming from twitter post etc.

leoj3n commented 1 year ago
image
leoj3n commented 1 year ago
image
leoj3n commented 1 year ago

(wip)

DylanPiercey commented 1 year ago

Thanks for your work and feedback here. I should point out that we will be working on a rework of our documentation once the tags api / Marko 6 is in official beta and outside of the preview.