![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
nts-scripts
Advanced tools
Simple npm `scripts` and common `devDependencies` to help build a Node TypeScript app.
Simple npm scripts
and common devDependencies
to help build a Node TypeScript app.
Inspired by Create React App's react-scripts package 👏
build
Compiles your TypeScript. Expects a tsconfig.json
file with an include
property and a compilerOptions.outDir
property.
clean
Deletes your compiled TypeScript. Expects a tsconfig.json
file with a compilerOptions.outDir
property.
format
Runs prettier
against all files. Uses your .gitignore
file if it exists to ignore. Semi-customizable with args.
lint
Runs eslint
against all files. Uses your .gitignore
file if it exists to ignore. Semi-customizable with args.
start
Cleans, builds, and starts your Node project with debugging enabled. Targets the main
property in your package.json
first and falls back to the outDir
property second. Semi-customizable with args.
watch
Essentially the same as start
except your project will re-build/start when changes are seen in your outDir
. Semi-customizable with args.
tsconfig.json
At a minimum the properties below are required. The values can be customized.
{
"compilerOptions": {
"outDir": "./build"
},
"include": ["./src"]
}
.gitignore
At least ignore the folders below. NOTE: If you customized the outDir
in your tsconfig.json
, update the build
line here to match.
build
coverage
node_modules
.eslintrc.js
An eslint config is required. Below is the simplest setup.
module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
};
.importsortrc.js
The config below is required.
module.exports = {
'.ts, .js': {
style: 'module',
parser: 'typescript',
},
};
jest.config.js
At a minimum the config below is required. NOTE: If you customized the outDir
in your tsconfig.json
, update '<rootDir>/build/'
to match.
module.exports = {
preset: 'ts-jest',
testPathIgnorePatterns: ['<rootDir>/build/', '<rootDir>/node_modules/'],
};
.prettierrc.js
It's recommended you setup a Prettier configuration file.
.nvmrc
Using nvm
along with an .nvmrc
file to automatically switch to the appropriate version of Node can be extremely helpful.
.vscode/settings.json
If you're using VS Code, a project-level settings file may be helpful to customize your experience.
FAQs
Simple npm `scripts` and common `devDependencies` to help build a Node TypeScript app.
The npm package nts-scripts receives a total of 19 weekly downloads. As such, nts-scripts popularity was classified as not popular.
We found that nts-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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.