Skip to content

How to Contribute

--Explosion-- edited this page Apr 23, 2021 · 4 revisions

Documentation on how to contribute to Bijou.js

Contributing to the docs

  • Make sure every function's docs follows the following template:
/**
* Description here
* @memberOf bijou
* @function
* @param {String} str Any parameters
* @example
* //A simple, working example of how to use the code in JS.
* @returns {String} What it returns and the type of thing it returns.
*/
  • Make sure each example is runnable, documented and easy to understand.

Adding new functions

  • Add you function in the correct /js/file.js file, NOT in bijou.js, as bijou.js is compiled and built, and will not save your changes.
  • Follow this template:
/**
* Description of what the function is
* @memberOf file.js <- This is the filename that the function is in, without the "/js/" or ".js" on it. 
* @param {String} str What the parameter is/does
* @example
* //A full, working, documented and easy to understand example of using this function.
* @example
* //Another example if you're feeling good
* @returns {String} Whatever the function returns
*/
export let fileName = (stringParameter = req("string", "one word describing what it is")) => {
  //Do stuff
  //If it doesn't work in Node.js add this:
  node();//ONLY IF IT WON'T WORK IN NODE.JS
  return "something"
}
Clone this wiki locally