From c044e1159f0061aec9052f579670b540b9200c6b Mon Sep 17 00:00:00 2001 From: Romain Vigier Date: Tue, 5 Apr 2022 11:30:32 +0200 Subject: [PATCH] Contributing: Use meson to install development dependencies --- CONTRIBUTING.md | 2 +- meson.build | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 42ea701..9ea8b91 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,7 +24,7 @@ You're welcome to contribute to the [code](#contributing-to-the-code) or to the You'll need [NPM](https://www.npmjs.com/) to install the development dependencies: ```bash -npm install --save-dev +meson compile -C builddir dev ``` When you're done, commit all your changes. Make one commit per change. The commit message must include which part of the code you worked on. Example: diff --git a/meson.build b/meson.build index a355c95..d7e21c2 100644 --- a/meson.build +++ b/meson.build @@ -16,5 +16,10 @@ INSTALL_DIR = get_option('datadir') / 'gnome-shell' / 'extensions' / UUID gnome = import('gnome') i18n = import('i18n') +npm_exe = find_program('npm') +if npm_exe.found() + run_target('dev', command: [ npm_exe, 'install', '--save-dev' ]) +endif + subdir('src') subdir('tests')