![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
project-repl
Advanced tools
Adds a REPL to the codebase of a project that will require all the project's depdendencies and all its source files and store them in global variables you can access from the REPL.
Adds a REPL to the codebase of a project that will require all the project's depdendencies and all its source files and store them in global variables you can access from the REPL.
yarn add --dev project-repl
npx make-repl
./repl
Or if you didn't want to do npx make-repl
, you can just do
npx repl
The repl will startup and require all your dependencies and .js files and tell you how long they took to require.
You'll see a Node shell that looks something like this:
ccheever@Charlies-MacBook-Pro:~/projects/ghost-server$./repl
> // ghost-server v1.0.0 // node v10.9.0
6 npm modules and 6 files required in 185ms
express(124ms) pg(39ms) body-parser(6ms) node-fetch(6ms) @expo/time thin-server
Api db index secret users/AuthApi users/ExpoApiV2Client
>
The times in parentheses are how long it took to require each module and file that takes longer than 4ms (configurable) to require
.
If you have a main
specified in your package.json
, the exports of that will be assigned to the global namespace as well, and listed in the output at the top of the REPL.
The easiest way to configure the project REPL is to add a repl
section to your package.json
.
You can ignore modules and files by adding to the modules
and files
keys under repl.ignore.
...
"repl": {
"ignore": {
"modules": [
"nodemon", "ignoreme"
],
"files": [
"BigAndUnimportantFile.js"
]
}
...
devDependencies
are not included by default, but can be by adding the key devDependencies
under repl
.
"repl": {
"devDependencies": true
}
Use populateGlobalWithMain
to control whether the exports of main
are added to the global object. The default is true
.
"repl": {
"populateGlobalWithMain": false,
}
threshold
, filesThreshold
, and modulesThreshold
can be used to control the minimum number of ms before the REPL will print out how many ms it took to load that file or module. The default is 4ms.
"repl": {
"threshold": 0,
}
FAQs
Adds a REPL to the codebase of a project that will require all the project's depdendencies and all its source files and store them in global variables you can access from the REPL.
The npm package project-repl receives a total of 1,176 weekly downloads. As such, project-repl popularity was classified as popular.
We found that project-repl demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.