Changeset - 1969f7dfb6b0
[Not reviewed]
default
1 5 1
domruf - 8 years ago 2017-12-18 22:20:10
dominikruf@gmail.com
move package.json to root directory

In the future we'll probably use it to manage more then just less/css stuff.
So the less directory is the wrong place.
The most common place is the root directory, so lets put it there.
Also, this way the --prefix parameter for npm is no longer required.
6 files changed with 10 insertions and 11 deletions:
0 comments (0 inline, 0 general)
MANIFEST.in
Show inline comments
 
@@ -16,14 +16,13 @@ recursive-include docs *
 
recursive-include init.d *
 
recursive-include kallithea/alembic *
 
include           kallithea/bin/ldap_sync.conf
 
include           kallithea/lib/paster_commands/template.ini.mako
 
recursive-include kallithea/i18n *
 
recursive-include kallithea/public *
 
prune             kallithea/public/less/node_modules
 
recursive-include kallithea/public/less/node_modules/bootstrap *
 
recursive-include node_modules/bootstrap *
 
recursive-include kallithea/templates *
 
recursive-include kallithea/tests/fixtures *
 
recursive-include kallithea/tests/scripts *
 
include           kallithea/tests/models/test_dump_html_mails.ref.html
 
include           kallithea/tests/performance/test_vcs.py
 
include           kallithea/tests/vcs/aconfig
docs/contributing.rst
Show inline comments
 
@@ -34,14 +34,14 @@ To get started with Kallithea developmen
 
        cd kallithea
 
        virtualenv ../kallithea-venv
 
        source ../kallithea-venv/bin/activate
 
        pip install --upgrade pip setuptools
 
        pip install --upgrade -e .
 
        pip install --upgrade -r dev_requirements.txt
 
        npm --prefix kallithea/public/less install     # install dependencies - both tools and data
 
        npm --prefix kallithea/public/less run less    # for generating css from less
 
        npm install     # install dependencies - both tools and data
 
        npm run less    # for generating css from less
 
        gearbox make-config my.ini
 
        gearbox setup-db -c my.ini --user=user --email=user@example.com --password=password --repos=/tmp
 
        gearbox serve -c my.ini --reload &
 
        firefox http://127.0.0.1:5000/
 

	
 
If you plan to use Bitbucket_ for sending contributions, you can also fork
docs/setup.rst
Show inline comments
 
@@ -14,14 +14,14 @@ build front-end files:
 
Find the right ``kallithea/public/less`` path with::
 

	
 
    python -c "import os, kallithea; print os.path.join(os.path.dirname(os.path.abspath(kallithea.__file__)), 'public', 'less')"
 

	
 
Then run::
 

	
 
    npm --prefix kallithea/public/less install
 
    npm --prefix kallithea/public/less run less
 
    npm install
 
    npm run less
 

	
 

	
 
Setting up Kallithea
 
--------------------
 

	
 
First, you will need to create a Kallithea configuration file. Run the
docs/upgrade.rst
Show inline comments
 
@@ -93,14 +93,14 @@ front-end files:
 
Find the right ``kallithea/public/less`` path with::
 

	
 
    python -c "import os, kallithea; print os.path.join(os.path.dirname(os.path.abspath(kallithea.__file__)), 'public', 'less')"
 

	
 
Then run::
 

	
 
    npm --prefix kallithea/public/less install
 
    npm --prefix kallithea/public/less run less
 
    npm install
 
    npm run less
 

	
 

	
 
5. Upgrade your configuration
 
-----------------------------
 

	
 
Run the following command to create a new configuration (``.ini``) file::
kallithea/public/less/main.less
Show inline comments
 
/*!
 
 * Don't edit the css file directly.
 
 *
 
 * Instead, edit the less file(s) and regenerate the css:
 
 *
 
 * npm --prefix kallithea/public/less install
 
 * npm --prefix kallithea/public/less run less
 
 * npm install
 
 * npm run less
 
 *
 
 */
 

	
 
/* 3rd party styles */
 
@import "node_modules/bootstrap/less/bootstrap.less";
 
@import (inline) "../css/jquery.dataTables.css";
package.json
Show inline comments
 
file renamed from kallithea/public/less/package.json to package.json
 
@@ -6,9 +6,9 @@
 
  },
 
  "devDependencies": {
 
    "less": "~2.7",
 
    "less-plugin-clean-css": "~1.5"
 
  },
 
  "scripts": {
 
    "less": "lessc --relative-urls main.less ../css/style.css"
 
    "less": "lessc --relative-urls kallithea/public/less/main.less kallithea/public/css/style.css"
 
  }
 
}
0 comments (0 inline, 0 general)