-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
2 changed files
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,45 +21,44 @@ Install frontend dependencies | |
----------------------------- | ||
|
||
The front end stylesheets are written using | ||
`LESS <http://lesscss.org/>`_ (this depends on | ||
`Less <http://lesscss.org/>`_ (this depends on | ||
`node.js <http://nodejs.org/>`_ being installed on the system) | ||
|
||
Instructions for installing node can be found on the `node.js website | ||
<http://nodejs.org/>`_. On Ubuntu 12.04 to 13.04, node.js (and npm node.js's | ||
package manager) need to be installed via a `PPA | ||
<https://launchpad.net/~chris-lea/+archive/node.js/>`_: | ||
Instructions for installing |nodejs| can be found on the |nodejs| `website | ||
<http://nodejs.org/>`_. Please check the ones relevant to your own distribution | ||
|
||
:: | ||
|
||
$ sudo apt-add-repository ppa:chris-lea/node.js | ||
$ sudo apt-get update | ||
On Ubuntu, run the following to install |nodejs| official repository and the node | ||
package:: | ||
|
||
Now run the command to install nodejs from the repository: | ||
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - | ||
sudo apt-get install -y nodejs | ||
|
||
:: | ||
.. note:: If you use the package on the default Ubuntu repositories (eg ``sudo apt-get install nodejs``), | ||
the node binary will be called ``nodejs``. This will prevent the CKAN less script to | ||
work properly, so you will need to create a link to make it work:: | ||
|
||
$ sudo apt-get install nodejs | ||
ln -s /usr/bin/nodejs /usr/bin/node | ||
|
||
On Ubuntu versions later than 13.04, npm can be installed directly from Ubuntu | ||
packages | ||
Also npm (the |nodejs| package manager) needs to be installed separately:: | ||
|
||
:: | ||
$ sudo apt-get install npm | ||
sudo apt-get install npm | ||
|
||
For more information, refer to the `Node wiki | ||
<https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint-elementary-os>`_. | ||
For more information, refer to the |nodejs| `website | ||
<https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions>`_. | ||
|
||
LESS can then be installed via the node package manager which is bundled | ||
with node (or installed with apt as it is not bundled with node.js on | ||
Ubuntu). We also use ``nodewatch`` to make our LESS compiler a watcher | ||
Less can then be installed via the node package manager (npm). | ||
We also use ``nodewatch`` to make our Less compiler a watcher | ||
style script. | ||
|
||
``cd`` into the ``pyenv/src/ckan`` and run: | ||
``cd`` into the CKAN source folder (eg |virtualenv|/src/ckan ) and run: | ||
|
||
:: | ||
|
||
$ npm install [email protected] nodewatch | ||
|
||
|
||
You may need to use ``sudo`` depending on your CKAN install type. | ||
|
||
-------------- | ||
File structure | ||
-------------- | ||
|
@@ -103,7 +102,7 @@ separate words. | |
|
||
css | ||
Should contain any site specific CSS files including compiled | ||
production builds generated by LESS. | ||
production builds generated by Less. | ||
less | ||
Should contain all the less files for the site. Additional vendor | ||
styles should be added to the *vendor* directory and included in | ||
|
@@ -128,7 +127,7 @@ test | |
Stylesheets | ||
----------- | ||
|
||
Because all the stylesheets are using LESS we need to compile them | ||
Because all the stylesheets are using Less we need to compile them | ||
before beginning development by running: | ||
|
||
:: | ||
|
@@ -139,7 +138,7 @@ This will watch for changes to all of the less files and automatically | |
rebuild the CSS for you. To quit the script press ``ctrl-c``. There is also | ||
``--production`` flag for compiling the production ``main.css``. | ||
|
||
There are many LESS files which attempt to group the styles in useful | ||
There are many Less files which attempt to group the styles in useful | ||
groups. The main two are: | ||
|
||
main.less: | ||
|