Skip to content

Commit ab6400b

Browse files
committed
doc: update usage information
1 parent 2d6c3fb commit ab6400b

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Certain build environments like the [Open Build Service](https://build.opensuse.
66
* it runs `npm` with any parameters and then shuts down
77

88
- [Installation](#installation)
9-
- [From Release](#from-release)
10-
- [From Git](#from-git)
9+
- [From Release](#from-release)
10+
- [From Git](#from-git)
1111
- [Usage](#usage)
1212
- [Open Build Service](#open-build-service)
1313

@@ -17,18 +17,32 @@ Certain build environments like the [Open Build Service](https://build.opensuse.
1717
`npm install --production`
1818

1919
## From Git
20-
`npm install`
21-
`npm run build`
20+
```
21+
npm install
22+
npm run build
23+
```
2224

2325
At this point the application is in `dist/` and can be used as from a tagged released version
2426

2527
# Usage
2628

2729
From the directory of an application where you want to run `npm install`,
2830

29-
NPM_TGZ = (list of all NPM tgz tarballs or directory containing them)
30-
node ${path_to_this_app}/dist ${NPM_TGZ} install ${npm_install_param}
31+
```
32+
NM_TGZ = (list of all NPM tgz tarballs or directories containing them)
33+
node $path_to_this_app/dist ${NPM_TGZ} $npm_params
34+
```
35+
All parameters that are not directories or NPM tarballs are passed as
36+
parameters to NPM.
37+
38+
When running under OBS with `BuildRequires: local-npm-registry`, where
39+
all dependencies are provides are tarballs in the `%_sourcedir`, then
40+
you can just do,
41+
42+
```
43+
local-npm-registry %{_sourcedir} install --also=dev
44+
```
3145

3246
# Open Build Service
3347

34-
You can find this in `devel:languages:javascript`
48+
You can find this package in `devel:languages:javascript`

0 commit comments

Comments
 (0)