Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
cj-scripts
💻Scripts for front end gangsters writing React apps.
cj-scripts
is a CLI that abstracts linting, formatting, transpiling, testing, building, and serving React projects into one dependency. Think of it like a poor man's react-scripts.
Here are some things included:
.env
file support npm i cj-scripts
Create a .env
file at the root of your app for your environment variables.
Add cj-scripts/babel
as a preset to your .babelrc
(but Babel itself is not required):
{
"presets": ["cj-scripts/babel"]
}
Create a src/index.js
file that bootstraps your client-side app.
Export an Express application at server/app.js
called app
. This should probably route to your client-side app, serve static assets, and any other logic you might want (except for dev middleware, that's included when running cj-scripts start
).
import express from 'express';
export const app = express();
// your server logic...
package.json
scripts)cj-scripts start
src/index.js
as the bootstrap file for your client-side app.app
in /server/app.js
, but this path can be changed with the CJ_SCRIPTS_APP_PATH
environment variable.PORT
environment variable can also be used to dictate the port (the default value is 3000
).cj-scripts test
config/setupTests.js
in your app to run initialization code for testing (think Enzyme adapter setup or global overrides).cj-scripts build
build
directory at the root of your app.PUBLIC_URL
environment variable can be set to serve your app at a path other than the root.cj-scripts start-prod
cluster
module to take advantage of multiple cores.PUBLIC_URL
environment variable can be set to serve your app at a path other than the root.PORT
environment variable can also be used to dictate the port (the default value is 3000
).import { getAppEnv } from 'cj-scripts'
const env = getAppEnv()
You can use getAppEnv()
to collect environment variables from a .env
file at the root of your app.
FAQs
A React CLI for computer gangsters
The npm package cj-scripts receives a total of 1 weekly downloads. As such, cj-scripts popularity was classified as not popular.
We found that cj-scripts 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.