programming:javascript:npm
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
programming:javascript:npm [2022/03/23 19:03] – skipidar | programming:javascript:npm [2023/11/01 07:31] (current) – ↷ Page moved from camunda:programming:javascript:npm to programming:javascript:npm skipidar | ||
---|---|---|---|
Line 10: | Line 10: | ||
===== Start project ====== | ===== Start project ====== | ||
+ | |||
+ | |||
+ | === OPTIONAL Pick the repository === | ||
+ | Pick teh repository from which you serve the dependencies | ||
+ | |||
+ | < | ||
+ | npm config set -- "// | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Build first ==== | ||
< | < | ||
Line 15: | Line 26: | ||
npm install | npm install | ||
</ | </ | ||
+ | |||
+ | < | ||
+ | # advanced build | ||
+ | npm install --legacy-peer-deps --no-audit --prefer-offline --registry " | ||
+ | </ | ||
+ | |||
+ | |||
+ | | --legacy-peer-deps | avoids error " | ||
+ | | --no-audit| skip vulnerability scan | | ||
+ | | --prefer-offline |Stale data is an artifact of caching, in which an object in the cache is not the most recent version committed to the data source. If true, staleness checks for cached data will be bypassed, but missing data will be requested from the server.| | ||
+ | |--registry | --registry " | ||
+ | |||
+ | |||
+ | ==== OPTIONAL test ==== | ||
< | < | ||
Line 20: | Line 45: | ||
npm test | npm test | ||
</ | </ | ||
+ | |||
+ | |||
+ | ==== start ==== | ||
+ | |||
+ | < | ||
+ | npm run start -- --configuration mock --host 0.0.0.0 --disable-host-check | ||
+ | </ | ||
+ | |||
+ | | -- | allows passing arguments to the " | ||
+ | | --configuration mock | angular configuration defined in angular.json| | ||
+ | | --host 0.0.0.0 | ||
+ | | --port 4300 | angular " | ||
Line 30: | Line 67: | ||
< | < | ||
- | npm config set registry https:// | ||
npm config set registry https:// | npm config set registry https:// | ||
npm config get registry | npm config get registry | ||
+ | </ | ||
+ | |||
+ | The file, where the config is stored is in your home dir and is called ' | ||
+ | |||
+ | |||
+ | |||
+ | Making the npm use a special registry for some package namespace is done as following | ||
+ | |||
+ | Opens the ' | ||
+ | < | ||
npm config edit | npm config edit | ||
</ | </ | ||
- | The file, where teh config is stored is in your home dir and is called '.npmrc' | + | And configure the registry e.g. for the `@simpl` pacakges. |
+ | |||
+ | Somewhere | ||
+ | < | ||
+ | @simpl: | ||
+ | @simpl-labs: | ||
+ | </ | ||
+ | |||
+ | If the repository requires authentication - there is some weird syntax allowing to add a token as authentication for a repository, using the `//domain` notation | ||
+ | < | ||
+ | @simpl: | ||
+ | @simpl-labs: | ||
+ | |||
+ | // | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ |
programming/javascript/npm.1648062192.txt.gz · Last modified: by skipidar