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.
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.
Run aberlaas install
to bootstrap your project with Aberlaas scripts and
configuration.
This will update your package.json
to add custom scripts (located in
./scripts
), and also add default configuration files for all the tool used at
the root of your project.
The following table lists all the scripts added:
Script | Description |
---|---|
yarn run build | Build JavaScript files through Babel |
yarn run build:watch | Build JavaScript files through Babel in watch mode |
yarn run test | Run tests using Jest |
yarn run test:watch | Run tests using Jest in watch mode |
yarn run lint | Lint all supported file types |
yarn run lint:fix | Attempt to fix linting issues on all supported file types |
yarn run lint:js | Lint JavaScript files |
yarn run lint:js:fix | Attempt to fix linting issues on JavaScript files |
yarn run lint:json | Lint JavaScript files |
yarn run lint:json:fix | Attempt to fix linting issues on JavaScript files |
yarn run release | Release the module on npm |
aberlaas build
will build all files located in ./lib
into ./build
by
default. You can alter the behavior with the following options:
CLI Argument | Default value | Description |
---|---|---|
[...] | ./lib | Files or directory to build |
--config | ./babel.config.js | Babel config file to use |
--out-dir | ./build | Build directory |
--ignore {pattern} | empty | Define patterns of files to ignore. Accepts globs, and can be passed more than once |
--watch | false | If enabled, will listen for changes on files and rebuild |
You can extend the internal Babel by editing the babel.config.js
created at
the root of your project.
aberlaas lint
will lint all supported files. Each file type can be linted
independently with the corresponding command (aberlaas lint:json
will lint
JSON files for example).
You can have Aberlaas trying to autofix linting issues by adding the --fix
argument to your command.
The following table show the file types supported and the corresponding command and linter used.
Command | File type | Linter used | Fixer used | Config files |
---|---|---|---|---|
aberlaas lint | All supported | N/A | N/A | N/A |
aberlaas lint:js | JavaScript | ESLint | Prettier (through ESLint) | .eslintrc.js |
aberlaas lint:json | JSON | jsonlint | Prettier |
aberlaas test
to run all the Jest tests in ./lib
. You can alter the behavior
with the following options:
CLI Argument | Default value | Description |
---|---|---|
[...] | ./lib | Files and directories to test |
--config | jest.config.js | Jest config file to use |
--watch | false | If enabled, will listen for changes on files and rerun tests |
yarn run release
aliased to aberlaas release
.
This will build the package and release it to npm. It will update the version in
package.json
as well as creating the related git tag.
When called without arguments, it will prompt you for the next version to
package. If called with an argument, this will be used as the next version
number (for example, yarn run release 1.1.3
). You can also use SemVer
increments (for example, yarn run release minor
).
Use -n
to start a dry-run. It will simulate a release but won't actually push
anything to GitHub or npm.
./lib/configs
contain the default configuration for all the tools. They are
exported by the package and thus can be import
ed in userland.
./templates
contains default configurations files copied to userland. Each
extends the configuration exported in the previous files. Copying files to
userland allows user to change the files if they want to change the behavior.
babel.config.js
, .eslintrc.js
, jest.config.js
and .huskyrc.js
are local
configuration files for aberlaas
itself. They eat their own dog food by
referencing the same configs as above.
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
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.