excaliburjs / Excalibur

🎮 Your friendly TypeScript 2D game engine for the web 🗡️
https://excaliburjs.com
BSD 2-Clause "Simplified" License
1.77k stars 189 forks source link

docs: #3132 Update all Markdown comment symbol links to {@apilink} #3137

Closed Autsider666 closed 2 months ago

Autsider666 commented 2 months ago

Used the following setup to search for and replace the Markdown comments: Search: \[\[([a-zA-Z 0-9._]*)\|([a-zA-Z 0-9._]*)\]\] and \[\[([a-zA-Z 0-9._]*)\]\] Replace: {@apilink $1 |$2} and {@apilink $1}

I wasn't sure if all the "normal" comments had to be replaced as wel, because src/engine/Actions/ActionContext.ts contains both {@apilink Action} and [[EasingFunctions]]. It's easy to do with a small modification, so give me a shout if that's preferred.

Closes #3132

kamranayub commented 2 months ago

Yes all the [[link]] variations need to be replaced as well!

The only thing we will need to do is spot check all the references to make sure they are resolved as well. By default the build will not fail if the resolution is missing and it'll output plain text.

kamranayub commented 2 months ago

@eonarheim we may need to add a preview env for this PR to check the built site

eonarheim commented 2 months ago

@kamranayub Yah, I think I'll pull it locally. Currently the automation isn't running on forks

kamranayub commented 2 months ago

@Autsider666 Oops, the changes should only be done in src/engine folder. site docs doesn't have this problem. 👍

Autsider666 commented 2 months ago

I reverted the changes in site, also replaced the [[link]] variants and scoured the code for weird edgecases (like [[CoordPlane|coordinate plane|]] in TransformComponent). Took the liberty to remove the last ex. used in these links as well.

Now I just have 1 question left: What about this example in CONTRIBUTING.md?

/** @deprecated use [[SomeClass]].someNewFunction instead **/
@obsolete({message: 'ex.SomeClass.someFunction is deprecated, and will be removed in 0.2.0',
    alternateMethod: 'SomeClass.someNewFunction'})
public someFunction() {...}

Edit: Isn't it supposed to be [[SomeClass.someNewFunction]] by the way?

eonarheim commented 2 months ago

I reverted the changes in site, also replaced the [[link]] variants and scoured the code for weird edgecases (like [[CoordPlane|coordinate plane|]] in TransformComponent). Took the liberty to remove the last ex. used in these links as well.

Now I just have 1 question left: What about this example in CONTRIBUTING.md?

/** @deprecated use [[SomeClass]].someNewFunction instead **/
@obsolete({message: 'ex.SomeClass.someFunction is deprecated, and will be removed in 0.2.0',
  alternateMethod: 'SomeClass.someNewFunction'})
public someFunction() {...}

Edit: Isn't it supposed to be [[SomeClass.someNewFunction]] by the way?

Awesome, yes I think you're right.

I'll run this locally quick to double check everything looks good before merge

kamranayub commented 2 months ago

HERO AMONG HEROES