Dev-npm Role¶
Description: No description available
Variables¶
author: Kevin Veen-Birkenbach
description: Installs npm and runs optional ‘npm ci’ inside a project
license: Infinito.Nexus NonCommercial License
license_url: https://s.infinito.nexus/license
company: Kevin Veen-Birkenbach
Consulting & Coaching Solutions https://www.veen.world
min_ansible_version: 2.9
platforms: [{‘name’: ‘Archlinux’, ‘versions’: [‘all’]}, {‘name’: ‘Debian’, ‘versions’: [‘all’]}]
galaxy_tags: [‘npm’, ‘nodejs’, ‘automation’, ‘javascript’]
repository: https://s.infinito.nexus/code
issue_tracker_url: https://s.infinito.nexus/issues
documentation: https://docs.infinito.nexus
README¶
npm¶
Description¶
This Ansible role installs npm and optionally runs npm ci within a
given project directory. It is intended to streamline dependency
installation for Node.js applications.
Overview¶
Designed for use in Node-based projects, this role installs npm and can
execute a clean install (npm ci) to ensure consistent dependency
trees.
Features¶
npm Installation: Ensures the
npmpackage manager is installed.Optional Project Setup: Runs
npm ciin a specified folder to install exact versions frompackage-lock.json.Idempotent: Skips
npm ciif no folder is configured.
Configuration¶
Set npm_project_folder to a directory containing package.json
and package-lock.json:
vars:
npm_project_folder: /opt/scripts/my-node-project/
License¶
Infinito.Nexus NonCommercial License https://s.infinito.nexus/license