Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manage npm #3

Closed
veit opened this issue Sep 2, 2019 · 0 comments
Closed

Manage npm #3

veit opened this issue Sep 2, 2019 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@veit
Copy link
Owner

veit commented Sep 2, 2019

  1. npm init
  2. Lock dependencies: .npmrc
    $ npm config set save=true
    $ npm config set save-exact=true
    
  3. Secure your projects and tokens
    Don’t store the token directly in .npmrc but in .profile and then link to it:
    //registry.npmjs.org/:_authToken=${NPM_TOKEN}
    
    See Deploying with npm private modules
  4. Check for outdated dependencies
    $ npm outdated
    
    See also Greenkeeper
  5. preinstall, postinstall and test scripts
  6. NODE_ENV environment variables
    console.log("Node environment :"  + process.env.NODE_ENV);
    
    See also:
  7. Avoid devDependencies in production
    To install production dependencies, run
    $ npm install --production
    
    or
    $ NODE_ENV=production npm install
    
    See also Specifying dependencies and devDependencies in a package.json file
@veit veit added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 2, 2019
@veit veit self-assigned this Sep 2, 2019
@veit veit closed this as completed in a0f3ffa Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant