PageRenderTime 25ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/local_scripts/readme.template.md

https://gitlab.com/craydent/node-library
Markdown | 144 lines | 116 code | 28 blank | 0 comment | 0 complexity | 2dd3078ab8623b2b625e26ed635aef9e MD5 | raw file
  1. <img src="http://craydent.com/JsonObjectEditor/img/svgs/craydent-logo.svg" width=75 height=75/>
  2. # Craydent ${version}
  3. **by Clark Inada**
  4. Craydent is all inclusive utility library. There are several ways to use the library in NodeJS.
  5. More detailed documentation on constants can be found at [Craydent Properties](http://www.craydent.com/JsonObjectEditor/docs.html#/property/CraydentNode).
  6. More detailed documentation on methods can be found at [Craydent Methods](http://www.craydent.com/JsonObjectEditor/docs.html#/method/CraydentNode)
  7. ${if (${methods} && ${methods.length} > 1)}
  8. ```js
  9. // require with prototypes - this require will add prototypes to extend classes and add two constants ($c, $g) to the global space.
  10. // $g is an alias to global and $c is the constant containing all the utility methods and properties.
  11. require('craydent${suffix}');
  12. $c.logit($c.VERSION, $g);
  13. arr.prototypedMethod(args);
  14. ```
  15. ```js
  16. // require no conflict - this require is the fully modular version with no global constants, prototypes, or methods.
  17. var $c = require('craydent${suffix}/noConflict');
  18. $c.logit($c.VERSION);
  19. $c.prototypedMethod(arr, args);
  20. ```
  21. ```js
  22. // require global - this require constants and methods in the global space and add prototypes to extend classes.
  23. // $g is an alias to global and $c is the constant containing all the utility methods and properties.
  24. require('craydent${suffix}/global');
  25. logit($c.VERSION, $g);
  26. arr.prototypedMethod(args);
  27. ```
  28. ${else}
  29. ```js
  30. // require - this require is the fully modular version with no global constants, prototypes, or methods.
  31. const ${methods[0].name} = require('craydent${suffix}').default;
  32. ```
  33. ```ts
  34. // import - this require is the fully modular version with no global constants, prototypes, or methods.
  35. import ${methods[0].name} from 'craydent${suffix}';
  36. ```
  37. ${end if}
  38. ${if (${categories} && ${categories.length})}
  39. ## Categories
  40. ${foreach ${item} in ${categories}}
  41. * [${item}](#markdown-header-${item.toLowerCase().replace(/\s/g,'-')})
  42. ${end foreach}
  43. ${end if}
  44. ${if (${constants} && ${constants.length})}
  45. <a name='markdown-header-constants'></a>
  46. ## Constants
  47. | | | |
  48. | ----- | ----- | ----- |
  49. |${for ${i=0,len=${constants}.length};${i<len};${i++}}
  50. ${if (${i+1}%3===0)}\n${end if}
  51. ${constants[i].name} (${constants[i].type}) |
  52. ${end for}
  53. ${end if}
  54. ${if (${featured} && ${featured.length})}
  55. <a name='markdown-header-featured'></a>
  56. ## Featured
  57. ${foreach ${items} in ${featured}}
  58. ### ${items.category}
  59. ${foreach ${feature} in ${items.features}}
  60. ***
  61. #### _${feature.name}_
  62. ***
  63. **Info:** ${feature.info}
  64. **Return:** ${feature.return}
  65. **Parameters:**
  66. ${if (${feature.parameters.length})}
  67. ${foreach ${param} in ${feature.parameters}}
  68. >* ${param}
  69. ${end foreach}
  70. ${else}
  71. >None
  72. ${end if}
  73. ${end foreach}
  74. ${end foreach}
  75. ${end if}
  76. ${if (${methods} && ${methods.length} > 1)}
  77. ## Methods
  78. ${end if}
  79. ${foreach ${category} in ${methods}}
  80. <a name='markdown-header-${category.name.toLowerCase()}'></a>
  81. ## ${category.name}
  82. ${foreach ${func} in ${category.functions}}
  83. ${if (${methods} && ${methods.length} > 1)}
  84. ***
  85. #### _${func.name}_
  86. ***
  87. ${end if}
  88. **Info:** ${func.info}
  89. **Return:** ${func.return}
  90. **Parameters:**
  91. ${if (${func.parameters.length})}
  92. ${foreach ${fparams} in ${func.parameters}}
  93. >* ${fparams}
  94. ${end foreach}
  95. ${else}
  96. >None
  97. ${end if}
  98. **Overloads:**
  99. ${if (${func.overloads.length})}
  100. ${foreach ${overload} in ${func.overloads}}
  101. >Parameters
  102. ${foreach ${oparams} in ${overload}}
  103. >* ${oparams}
  104. ${end foreach}
  105. ${end foreach}
  106. ${else}
  107. >None
  108. ${end if}
  109. ${end foreach}
  110. ${end foreach}
  111. ## Download
  112. ${declare path=~${suffix}.indexOf('.')?'modules/methods/'+${suffix}.replace('.',''):'modules/'+${suffix}.replace('-','')}
  113. * [GitHub](https://github.com/craydent/node-library/${if (${suffix})}${path}${end if})
  114. * [BitBucket](https://bitbucket.org/craydent/node-library/${if (${suffix})}${path}${end if})
  115. * [GitLab](https://gitlab.com/craydent/node-library/${if (${suffix})}${path}${end if})
  116. Craydent is released under the [Dual licensed under the MIT or GPL Version 2 licenses](http://craydent.com/license).<br>