![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Start a new npm package with all the right tooling in place.
This package exposes the aberlaas
script that can be used to perform the most
common tasks on a package: build
, lint
, test
and release
. It also
exposes the inner configuration of the tools it uses.
Use this by calling the aberlaas
script to perform tasks on your code. We
suggest you add scripts
aliases in your package.json
to run them.
"scripts": {
"build": "aberlaas build",
"build:watch": "aberlaas build --watch",
"lint": "aberlaas lint",
"lint:fix": "aberlaas lint --fix",
"test": "aberlaas test",
"test": "aberlaas test --watch",
"release": "aberlaas release",
}
Run aberlaas build
to build all files ./lib
into ./build
using Babel. You
can pass your own list of files by calling aberlaas build ./path/to/files
, and
change the build directory with --out-dir ./my-build
. You can exclude files
using the --ignore ignore-me.js
flag.
You can extend the internal Babel config used by creating a .babelrc.js
file
with the following content:
module.exports = {
"presets": ["aberlaas/babel"]
}
Run aberlaas lint
to lint files through ESLint. It will link all .js
files
in ./lib
and at the root of the project. You can pass you own list of files to
lint by calling aberlaas lint ./your/own/files.js
. You can attempt to auto fix
issues on your files by adding the --fix
flag.
We suggest you add a .eslintrc.js
file in your project with the following
content. It will mirror the aberlaas configuration locally, allowing you to
extend it if needed, but also signaling to your IDE and other tools that ESLint
is available.
module.exports = {
extends: ['./node_modules/aberlaas/eslint.js'],
};
Run aberlaas test
to run all the Jest tests in ./lib
. You can pass your own
list of files to the command to override the default. Use the --config jest.config.js
argument to specify your own config file and --watch
to start
live reloading of test.
Aberlaas is the base camp from which all great expedition start in the La Horde du Contrevent book. I felt it's a great name for a bootstrapping kit for modules.
FAQs
Scaffold your JavaScript projects with tests, lint and release scripts
The npm package aberlaas receives a total of 120 weekly downloads. As such, aberlaas popularity was classified as not popular.
We found that aberlaas demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.