diff --git a/docs/content/using-npm/scripts.md b/docs/content/using-npm/scripts.md index a9ca433fdea08..369d8f0c9ab12 100644 --- a/docs/content/using-npm/scripts.md +++ b/docs/content/using-npm/scripts.md @@ -145,9 +145,15 @@ suites, then those executables will be added to the `PATH` for executing the scripts. So, if your package.json has this: ```json -{ "name" : "foo" -, "dependencies" : { "bar" : "0.1.x" } -, "scripts": { "start" : "bar ./test" } } +{ + "name" : "foo", + "dependencies" : { + "bar" : "0.1.x" + }, + "scripts": { + "start" : "bar ./test" + } +} ``` then you could run `npm start` to execute the `bar` script, which is @@ -176,9 +182,15 @@ there is a config param of `[@]:`. For example, if the package.json has this: ```json -{ "name" : "foo" -, "config" : { "port" : "8080" } -, "scripts" : { "start" : "node server.js" } } +{ + "name" : "foo", + "config" : { + "port" : "8080" + }, + "scripts" : { + "start" : "node server.js" + } +} ``` and the server.js is this: @@ -213,10 +225,11 @@ process.env.npm_package_scripts_install === "foo.js" For example, if your package.json contains this: ```json -{ "scripts" : - { "install" : "scripts/install.js" - , "postinstall" : "scripts/postinstall.js" - , "uninstall" : "scripts/uninstall.js" +{ + "scripts" : { + "install" : "scripts/install.js", + "postinstall" : "scripts/install.js", + "uninstall" : "scripts/uninstall.js" } } ``` @@ -232,10 +245,11 @@ If you want to run a make command, you can do so. This works just fine: ```json -{ "scripts" : - { "preinstall" : "./configure" - , "install" : "make && make install" - , "test" : "make test" +{ + "scripts" : { + "preinstall" : "./configure", + "install" : "make && make install", + "test" : "make test" } } ```