P
P
pegas2018-04-06 21:26:54
Node.js
pegas, 2018-04-06 21:26:54

Can you explain the commands for nodjs?

There are commands in package.json in script property:
"scripts": {
"dev": "cross-env NODE_ENV=development grunt dev",
"build": "cross-env NODE_ENV=production grunt build"
}
cross-env NODE_ENV= development - what does this command do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dima Polos, 2018-04-06
@dimovich85

Sets the mode of operation, there are development and production. This is necessary, for example, if you are developing and turn on strict mode for debugging, or you generate a source map, but this is no longer necessary in production, so you can specify in the configs that if node_env == 'production', then do not create a source map, and disable use_strict. In general, something like this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question