Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save techyboy/6f3e34b0f7642a3fd7080b0e4c9436bb to your computer and use it in GitHub Desktop.

Select an option

Save techyboy/6f3e34b0f7642a3fd7080b0e4c9436bb to your computer and use it in GitHub Desktop.

Revisions

  1. @luisfc luisfc revised this gist Aug 10, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions install nodejs, npm and gulp
    Original file line number Diff line number Diff line change
    @@ -44,3 +44,5 @@ npm install --save-dev gulp-install
    ##detect gulp command into drupal

    npm install gulp-cli -g

    https://www.drupal.org/docs/8/theming/creating-automation-tools-for-custom-themes-gulpjs
  2. @luisfc luisfc revised this gist Aug 10, 2017. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion install nodejs, npm and gulp
    Original file line number Diff line number Diff line change
    @@ -36,4 +36,11 @@ npm install --save gulp-install
    For local use with gulp
    Install gulp-install as a development dependency:

    npm install --save-dev gulp-install
    npm install --save-dev gulp-install



    ----------
    ##detect gulp command into drupal

    npm install gulp-cli -g
  3. @luisfc luisfc created this gist Aug 10, 2017.
    39 changes: 39 additions & 0 deletions install nodejs, npm and gulp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,39 @@
    sudo apt-get update
    sudo apt-get install nodejs
    sudo apt-get install npm

    ## Use n module from npm in order to upgrade node

    sudo npm cache clean -f
    sudo npm install -g n
    sudo n stable

    sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/nodejs
    (NOTICE that the default installation for nodejs is in the /usr/bin/nodejs and not /usr/bin/node)

    To upgrade to latest version (and not current stable) version, you can use

    sudo n latest

    ##To undo:

    sudo apt-get install --reinstall nodejs-legacy # fix /usr/bin/node
    sudo n rm 6.0.0 # replace number with version of Node that was installed
    sudo npm uninstall -g n

    ## or

    #update npm
    npm install npm@latest -g

    ------------------
    Gulp Installation

    For global use with slush
    Install gulp-install as a dependency:

    npm install --save gulp-install
    For local use with gulp
    Install gulp-install as a development dependency:

    npm install --save-dev gulp-install