From 06ff4196221aee1f48598aafacc7c42ab5425a05 Mon Sep 17 00:00:00 2001 From: Anton Medvedev Date: Sun, 8 May 2022 18:09:28 +0200 Subject: [PATCH] Update doc.md --- doc/doc.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/doc.md b/doc/doc.md index 5484be8..d2517c2 100644 --- a/doc/doc.md +++ b/doc/doc.md @@ -92,12 +92,9 @@ ANTON export FX_LANG=node ``` -### NPM Packages - Use any npm package by installing it globally. Create _.fxrc.js_ file in `$HOME` -directory, and require any packages or define global functions. - -For example, access all lodash methods without `_` prefix. +directory, and require any packages or define global functions. For example, +access all lodash methods without `_` prefix. Put next line your _.fxrc.js_ file: @@ -120,13 +117,15 @@ curl 'https://api.github.com/repos/facebook/react/commits?per_page=100' \ The _.fxrc.js_ file supports both: import and require. ```js +// .fxrc.js import 'zx/globals' const _ = require('lodash') ``` -> With you want to use _.fxrc.js_ for both `FX_LANG=js` and `FX_LANG=node`, +> If you want to use _.fxrc.js_ for both `FX_LANG=js` and `FX_LANG=node`, > separate parts by `// nodejs:` comment: > ```js +> // .fxrc.js > function upper(s) { > return s.toUpperCase() > }