npm-cli

Are there npm version prerelease identifiers?

社会主义新天地 提交于 2020-01-01 04:15:13
问题 There is a very handy npm version command. Besides arguments like major , minor and patch it accepts arguments like prerelease , prepatch , etc. It says in the docs that the commands work in accordance with the semver.inc function. These pre commands I have a question about. Say I'm currently at version v1.0.0 . If I run npm version prerelease it will bump version to v1.0.1-0 . Is it possible to provide an extra agrument for a prerelease identifier according to https://github.com/npm/node

how to run node / babel script directly in command line?

会有一股神秘感。 提交于 2019-12-29 06:16:08
问题 My package.json looks like: { "name": "99-nodetest", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "babel-node --presets env app.js" }, "keywords": [], "author": "", "license": "ISC", "dependencies": { "babel-cli": "^6.26.0", "babel-preset-env": "latest" } } The js script i want to run is app.js. I cannot run it directly using node app.js because app.js contains new language syntax. Thus i have to run it