Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
abc-environment
Advanced tools
Get started with modern JavaScript development as simple as the ABC
Get started with modern JavaScript development as simple as the ABC
This module only works with Node v6+ and npm v3+ (or yarn), which are the current LTS versions. Please make sure you are running the right versions via
node -v && npm -v
and update if needed.
# Install the module
npm install --save-dev abc-environment
# Run the setup
node_modules/.bin/abc setup
# Now you can commit...
git add ...
git commit ...
# ...and run commands directly
node_modules/.bin/abc test
npm test
# Tip: Create an alias for "abc" to have an even shorter command
echo "alias abc='node_modules/.bin/abc'" >> ~/.bashrc && source ~/.bashrc
abc test
abc setup
Creates the directories and files for the whole project to run. This will modify files, so only run it on empty or version-controlled projects.
⚠️ When updating this module to the next higher minor version number, it is recommended to run the setup
command again to get the newest files! When updating to the next major number, running setup
is required.
The created directories and files are:
src/
- Directory for your source codesrc/index.js
- Demo module file (if src/
is empty)tests/
- Directory for your teststests/index.spec.js
- Demo test file (if tests/
is empty).babelrc
- Manages the Babel configuration throughout the whole project 1.gitignore
- Makes sure that you don't commit dependency files into version control.npmignore
- Makes sure that you only release the built files into npm.travis.yml
- Handles continuous integration with Travispackage.json
- Adds three npm scripts:
npm test
- Runs the test
and lint
commandsnpm run build
- Runs the build
commandnpm run version
- Runs the build
command when you publish a new version of your package to npm (e.g. using np
or npm-release
)abc build
Compiles the source files from src/
into a build/
directory. Thanks to this, you can use the latest language features of JavaScript and compile them into JavaScript that runs in older browsers or older versions of Node. You can find an overview of all the new language features here and here.
abc test
Runs the test files in the tests/
directory. Using unit tests, you can check if your module always works in the way you expect it to. You can also see which parts of your code are covered by your tests by opening the generated coverage/lcov-report/index.html
in your browser.
abc lint [--fix]
Checks if your code is consistent and follows best practices (and optionally fix issues). By using a linter you can ensure that all your code looks the same, even if it was written by different developers. Linting also helps to catch common errors. This module uses the standard style guide.
abc run src/file.js
Runs a specified file. Because we are using compiled code, it can get tedious if you have to run build
before you can run your code. Using the run
command, you can just specify the file and get it compiled and executed in one single step. This is used for development purposes, in production you should always use the compiled files generated using the build
command!
babel-cli
- Compiler for writing next generation JavaScriptbabel-preset-latest
- Compiling everything what's in ES2015+babel-preset-stage-0
- Compiling up-and-coming language featuresmocha
- Simple & flexible test frameworkchai
- BDD / TDD assertion frameworksinon
- Test spies and stubsnyc
- Code coverage toolbabel-plugin-istanbul
- Instruments your code with Istanbul coveragebabel-plugin-rewire
- Adds the ability to rewire module dependenciessnazzy
- One JavaScript Style Guide to Rule Them Allbabel-eslint
- Lint all valid Babel code, including stage-0
codecov
- Code coverage badges in your repositorynp
- A better npm publish
MIT
[1]: Sadly this is required, because Mocha provides no way to configure Babel
FAQs
Get started with modern JavaScript development as simple as the ABC
The npm package abc-environment receives a total of 1,450 weekly downloads. As such, abc-environment popularity was classified as popular.
We found that abc-environment 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
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.