From 341d23e28f5d986565a9af852b12edd31c12574e Mon Sep 17 00:00:00 2001 From: Aron Carroll Date: Tue, 24 Jun 2014 12:50:35 +0100 Subject: [PATCH] Update INSTALL docs to instruct on node installation This reduces the number of installation steps for most platforms. Node installation instructions taken from the Joyent wiki[1]. [1]: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager --- INSTALL.ArchLinux.rst | 6 +++--- INSTALL.Debian.rst | 4 ++-- INSTALL.Fedora.rst | 12 +++--------- INSTALL.OSX.rst | 5 +---- INSTALL.Ubuntu.rst | 8 +------- INSTALL.Vagrant.rst | 8 ++++---- INSTALL.rst | 9 +++++---- 7 files changed, 19 insertions(+), 33 deletions(-) diff --git a/INSTALL.ArchLinux.rst b/INSTALL.ArchLinux.rst index 43d121ecc83..c2412849ad8 100644 --- a/INSTALL.ArchLinux.rst +++ b/INSTALL.ArchLinux.rst @@ -5,15 +5,15 @@ Install the following packages: .. code-block:: bash - python2-pip python2-virtualenv libyaml gcc git + python2-pip python2-virtualenv libyaml gcc git nodejs From the Arch User Repository (AUR), obtain: .. code-block:: bash - coffee-script elasticsearch ruby-compass nodejs-uglify-js + elasticsearch ruby-compass -Due to ArchLinux idiosyncracies where python 2 and python 3 are concerned, you need to run the following +Due to ArchLinux idiosyncracies where python 2 and python 3 are concerned, you need to run the following in the top directory (i.e., inside h/) for hypothesis to correctly use python 2: .. code-block:: bash diff --git a/INSTALL.Debian.rst b/INSTALL.Debian.rst index 4a2371545dc..80c89f93c88 100644 --- a/INSTALL.Debian.rst +++ b/INSTALL.Debian.rst @@ -1,5 +1,5 @@ Installing Hypothes.is on Debian -###################### +################################ Currently (november 2012), the required packages are not part of the stable distribution; you need to fetch some stuff from the unstable ditribution. @@ -9,7 +9,7 @@ To install the dependencies, run these commands: .. code-block:: bash sudo apt-get install build-essential git libyaml-dev - sudo apt-get install python-{dev,pip,virtualenv} ruby-compass coffeescript + sudo apt-get install python-{dev,pip,virtualenv} ruby-compass nodejs npm This will install almost anything you need for development. The only thing you need to install manually is elasticsearch_, diff --git a/INSTALL.Fedora.rst b/INSTALL.Fedora.rst index 4c6141d9072..eb39a227d45 100644 --- a/INSTALL.Fedora.rst +++ b/INSTALL.Fedora.rst @@ -1,5 +1,5 @@ -Installing Hypothes.is on Debian -###################### +Installing Hypothes.is on Fedora +################################ To install the dependencies, run these commands: @@ -15,14 +15,8 @@ If not available as an RPM, you can use this: gem install compass -After that: - -.. code-block:: bash - - npm install -g coffee-script uglify-js - Follow the instructions at elastisearch_rpm_ to build and install the elasticsearch server, -but don't start it just yet: +but don't start it just yet: Before you start the elasticsearch daemon: diff --git a/INSTALL.OSX.rst b/INSTALL.OSX.rst index 3037222da76..e24925a54ce 100644 --- a/INSTALL.OSX.rst +++ b/INSTALL.OSX.rst @@ -28,15 +28,12 @@ Install Node and other required tools: gem install compass brew install node - npm -g install uglify-js - npm -g install clean-css - npm -g install coffee-script Add the tools' path to the $PATH variable: .. code-block:: bash - echo "export PATH=/usr/local/share/python:/usr/local/share/npm/bin:\$PATH" >> ~/.profile + echo "export PATH=/usr/local/share/python:\$PATH" >> ~/.profile source ~/.profile Install Elasticsearch diff --git a/INSTALL.Ubuntu.rst b/INSTALL.Ubuntu.rst index 18ca0062756..1c7516e2afc 100644 --- a/INSTALL.Ubuntu.rst +++ b/INSTALL.Ubuntu.rst @@ -1,5 +1,5 @@ Installing Hypothes.is on Ubuntu Server 12.04.2 LTS -###################### +################################################### To install the dependencies, run these commands: @@ -16,12 +16,6 @@ You will need the latest Node: sudo apt-get update sudo apt-get install nodejs -And the latest version of CoffeeScript: - -.. code-block:: bash - - sudo npm install --global coffee-script - This will install almost anything you need for development. The only thing you need to install manually is elasticsearch_, which is required to run the application. diff --git a/INSTALL.Vagrant.rst b/INSTALL.Vagrant.rst index e73f23aede9..3104e3c8eae 100644 --- a/INSTALL.Vagrant.rst +++ b/INSTALL.Vagrant.rst @@ -1,5 +1,5 @@ Installing Hypothes.is with Vagrant -###################### +################################### Running Hypothes.is on a VM enables development on Windows machines, and also provides a "clean box" for testing dependencies. The following instructions will use Vagrant to create and manage @@ -39,7 +39,7 @@ Notes on Using the VM * The vagrant commands are very simple: ``vagrant up``, ``vagrant ssh``, ``vagrant halt``, ``vagrant destroy`` and a few others. ``vagrant help`` for explanations. - + * This vagrant configuration forwards port 5000 from the guest to the host. This means that from your host machine (and from outside), "http://localhost:5000" (or your hostname or 127.0.0.1) will be routed to the h server on the VM. @@ -52,7 +52,7 @@ VM State -------- VM state is normally preserved across runs (e.g. ``vagrant halt`` followed by ``vagrant run``). -This includes the h server state (the annotation database), installed software, etc. +This includes the h server state (the annotation database), installed software, etc. In addition, the h directory (this directory) is mirrored on the VM (at ``/h``). Changes can be made to the directory either on the host or the guest. For example, you can edit code and invoke git while on the VM. @@ -70,7 +70,7 @@ Notes for Windows Development If you are working with a Windows host, you want the shared directory to use Unix line endings. Do that by configuring this git repository as follows: - + .. code-block:: bash git config core.eol lf diff --git a/INSTALL.rst b/INSTALL.rst index 1c05176d10e..a9bb587fcfc 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -35,13 +35,14 @@ pulling new commits from upstream, or checking out a new branch, which may have changed (for example: updated) requirements. For building the static assets, requirements currently include CoffeeScript_ -and Sass_ with Compass_ installed. These tools are widely available in package -repositories. Check the platform-specific installation instructions for -details. +and Sass_ with Compass_ installed. CoffeeScript will be installed for you but +Sass and Compass must be installed manually. These tools are widely available +in package repositories. Check the platform-specific installation instructions +for details. For production use, the application will use UglifyJS_ and clean-css_ for minification needs. These are not required when running the project in a -development configuration. +development configuration but will be installed locally. Platform Specific Instructions ------------------------------