Core | compile | import | Search

files

Cell 0

project word-cloud

The code is a Node.js module that generates a word cloud for a project. It uses the d3 library to convert a word cloud to SVG and the path module to work with file and directory paths.

project imports d3 tree

The code consists of three main functions: icons, wordCount, and projectTree, which perform tasks such as iconizing file types, counting words, and creating a project tree. The projectTree function imports and processes modules to generate a formatted tree data.

, glob files

The globMatch and glob functions recursively search for file paths matching a specified pattern in a project directory, and return an array of matching file paths. The functions handle various types of patterns, including directory patterns, and can be used to filter out ignored files based on the ignores array.

Cell 4

This JavaScript code utilizes the assert and glob modules to test the glob functionality by searching for files containing the string 'index' in the current directory and exports the results as a module.

list project files

This code imports modules and exports a listInProject function that searches for files in a specified directory using glob patterns.

common ignore paths

This code exports an array of file patterns to be ignored by a tool, containing patterns for various file types and directories.

List all projects by names

The code imports dependencies and defines a listProjects function that scans a directory for project files based on a regular expression pattern, returning an object with project paths and names. The function is then exported as a module for use in other JavaScript files.

Cell 8

This code is a Mocha test suite that uses the importer module to import two functions, listInProject and listProjects, which are used to test file system operations in a project directory.

fix project paths

The fixImports function resolves missing imports in a project by finding matching files based on their syntax structure and updating package.json to include new dependencies. It uses the fs, path, and importer modules to find code files, resolve imports, and update package.json.

Cell 10

(=\{((:[^{}]++|\{(1)\})++)\})

This script imports dependencies, defines three functions (matchCurlyBraces, findLongFunctions, and their usage), and exports the findLongFunctions function as a module. The findLongFunctions function analyzes a project for long functions with excessive curly braces and lines of code.

Cell 12

The code declares variables and calculates the project path by concatenating environment variables. It then calls the findLongFunctions function to find and return potentially long functions in the project, handling the result with a then and catch block.

file tools, match filename

This JavaScript code imports modules, defines two functions (getDirectory and matchFilename) that handle directory and file matching, and exports them as a module. The matchFilename function filters files based on a pattern and returns a new path by joining the directory path with the file name, unless they are the same.

mkdirp

The mkdirpSync function creates directories and their parents synchronously if they do not exist, and throws any other error if an issue occurs. It ignores the EEXISTS error and throws others.

changing file names

This code exports two functions, chext and chroot, which manipulate file paths by changing extensions and checking/file paths. The code uses regular expressions and the path module for these functions.

use memory-fs and rewire to audit cli events

The mockTypescriptFs function creates a mock file system for TypeScript by combining an in-memory file system with the original Node.js file system, and returning a mock object that can be used to mock the typescript module. The function also uses mock-require to mock various TypeScript file system functions.

TODO: combine with DOM minimizing service from recording app

This code imports modules, performs file system operations, and processes Jupyter notebooks by reading, updating, and writing them back to the file system. It searches for notebooks in a specified project path and its subdirectories.

Cell 18