Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>npm allows you to specify <code>devDependencies</code>, you may want to see <a href="http://howtonode.org/managing-module-dependencies" rel="nofollow">this article</a>.</p> <p>You could add all of your dev/test environment dependencies under <code>devDependencies</code> and all production-related modules under <code>dependencies</code>. Then, you could add a script to push to the cloud. </p> <p>I'm not familiar with Cloud Foundry or the <code>vmc push</code> workflow. But, you could add a custom script to the <code>scripts</code> object in <em>package.json</em> which installs dev-environment modules, runs your tests, cleans the npm cache, then installs production-only modules and pushes your code and only those modules to the cloud. </p> <p><strong>edit</strong></p> <p>I'm not sure you can use these if not pushing to the npm repository, but they are useful as an example (I guess...) Alternatively, you could automate the workflow I described above in a shell script or node script.</p> <p><strong>/edit</strong></p> <p>You could hook into any of the scripts available... (see <code>man npm-scripts</code> for more info):</p> <pre><code> preinstall Run BEFORE the package is installed install, postinstall Run AFTER the package is installed. preuninstall, uninstall Run BEFORE the package is uninstalled. postuninstall Run AFTER the package is uninstalled. preupdate Run BEFORE the package is updated with the update command. update, postupdate Run AFTER the package is updated with the update command. prepublish Run BEFORE the package is published. publish, postpublish Run AFTER the package is published. pretest, test, posttest Run by the npm test command. prestop, stop, poststop Run by the npm stop command. prestart, start, poststart Run by the npm start command. prerestart, restart, postrestart Run by the npm restart command. Note: npm restart will run the stop and start scripts if no restart script is provided. Additionally, arbitrary scrips can be run by doing npm run-script &lt;stage&gt; &lt;pkg&gt;. </code></pre> <p>Note, <code>publish</code> here is for publishing a module to <code>npm</code>. You should set your package to private (<code>"private": true</code>) so you don't accidentally publish your code the the npm repository.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload