Skip to content

Commit

Permalink
Moved javascript dependencies to bower.
Browse files Browse the repository at this point in the history
- update of javascript dependencies (including react, react-select)
- update of build instructions
  • Loading branch information
mvillis committed Jan 4, 2016
1 parent 80ade0a commit 1a83fc3
Show file tree
Hide file tree
Showing 30 changed files with 93 additions and 43,825 deletions.
5 changes: 5 additions & 0 deletions .bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"directory": "measure_mate/static/components/",
"analytics": false,
"timeout": 120000
}
2 changes: 2 additions & 0 deletions .buildpacks
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://github.com/heroku/heroku-buildpack-nodejs.git
https://github.com/heroku/heroku-buildpack-python.git
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ __pycache__/
# Distribution / packaging
bin/
build/
components/
develop-eggs/
dist/
eggs/
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@ Demo
Setup
-----

These instructions assume that you already have *npm* installed on your workstation.
The best way to do this is to just install [NodeJS](https://nodejs.org/en/).

```
npm install -g bower
virtualenv .venv
```

Sometimes admin privilege (ie. sudo) is required to install bower.

Linux|Windows
---|---
```source .venv/bin/activate```|```.venv\Scripts\activate```
Expand Down Expand Up @@ -62,10 +68,25 @@ Linux|Windows
<ul><li>```export DJANGO_SETTINGS_MODULE=measure_mate.settings```</li><li>```export DATABASE_URL=sqlite:///`pwd`/measure_mate.sqlite```</li></ul> |<ul><li>```set DJANGO_SETTINGS_MODULE=measure_mate.settings```</li><li>```set DATABASE_URL=sqlite:///C:\\your_sqlite_path\\measure-matemeasure_mate.sqlite```</li></ul>
```
python manage.py migrate
bower install
python manage.py collectstatic
python manage.py runserver
```

Running (heroku)
------

Some custom build packs are needed in heroku to manage the collection of bower dependencies.

```
$ heroku login
...
$ heroku buildpacks:set https://github.com/ddollar/heroku-buildpack-multi.git --app measuremate
```

This will pick up the config found in ```.buildpacks```.


Contributing
-------

Expand Down
26 changes: 26 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"name": "measure-mate",
"authors": [
"Michael Villis <mvillis@gmail.com>"
],
"description": "Measure Mate",
"main": "",
"moduleType": [],
"license": "MIT",
"homepage": "http://measuremate.herokuapp.com/",
"private": true,
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": "~2.1.4",
"react": "~0.14.5",
"react-select": "https://github.com/JedWatson/react-select.git#v1.0.0-beta8",
"bootstrap": "~3.3.6",
"babel": "*"
}
}
1 change: 0 additions & 1 deletion measure_mate/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)

LOGGING = {
Expand Down
Loading

0 comments on commit 1a83fc3

Please sign in to comment.