MCPcopy Create free account
hub / github.com/6pac/SlickGrid / getAllJSFiles

Function getAllJSFiles

scripts/builds.mjs:41–57  ·  view source on GitHub ↗

* Get a list of all JS/TS files (using glob pattern) * @return {String[]} list of files

()

Source from the content-addressed store, hash-verified

39 * @return {String[]} list of files
40 */
41function getAllJSFiles() {
42 const allFiles = globSync(['src/**/*.{js,ts}']);
43
44 // make sure "slick.core.js" (or .ts) is 1st file
45 // we do this because the Slick object gets created first by slick.core.js, then we can extend Slick afterward
46 allFiles.sort((a, b) => {
47 const wordToBeFirst = /slick.core.[jt]s/;
48 if (wordToBeFirst.test(a)) {
49 return -1;
50 } else if (wordToBeFirst.test(b)) {
51 return 1;
52 }
53 return a > b;
54 });
55
56 return allFiles;
57}
58
59/** Execute full build of all format types (iife, cjs & esm) */
60export async function executeFullBuild() {

Callers 1

buildAllIifeFilesFunction · 0.85

Calls 1

sortMethod · 0.80

Tested by

no test coverage detected