backtrack
preset that sets up a node project.
jest
with Wallaby.js, CircleCI and AppVeyoreslint
, andprettier
package.json
scriptsgit-pre-push
,git-pre-commit
andprepublish
hooks- Automatic app restarts in
development
via nodemon - Optional:
babel
withbabel-preset-env
- Optional:
typescript
npm install --save-dev @backtrack/preset-node
// backtrack.config.js
'use strict';
module.exports = {
// see settings below
presets: [
[
'@backtrack/node',
{
mode: 'module',
syntax: 'node',
},
],
],
};
'use strict';
module.exports = {
presets: [
[
'@backtrack/node',
{
/**
* Project mode type
*
* Required
*
* Available modes:
* module - npm module
* app - node application
*
*/
mode: 'app',
/**
* Javascript syntax
*
* Required
*
* Available syntax:
* node: Target package.json's engines.node (no compilation)
*
* babel: Use babel to provide latest javascript features
* - app requirements:
* - npm install --save source-map-support core-js@3
*
* typescript: Use Typescript
* - requirements
* - npm install --save-dev typescript
* - app requirements:
* - npm install --save source-map-support core-js@3
*/
syntax: 'typescript',
/**
* Specify node version
*
* module default: '>=14.15.0'
* app default: '^16.13.0'
*/
nodeVersion: '^18.0.0',
/**
* Enable/disable Windows-only features
*
* module default: true
* app default: false
*/
windows: false,
},
],
],
};