fmartingr
/
shelfzilla
Archived
1
0
Fork 0

- Fixed package.json

- Removed unused task from fable
- Added base README
This commit is contained in:
Felipe Martin 2014-03-25 13:13:17 +01:00
parent 0b273feef9
commit 0c9ea7b6c0
3 changed files with 27 additions and 35 deletions

26
README.md Normal file
View File

@ -0,0 +1,26 @@
shelfzilla
==========
## Prepare environment for local development
```
# Check that everything is installed
fab doctor
# Setup NPM/Virtualenv/Database
fab setup_environment
# Executes the server
fab runserver
```
## Dependencies
- Nodejs
- Python 2.7 with virtualenv and pip
- grunt-cli installed as global resource
# First install
The first time you use `fab setup_environment` django will ask for a initial superadmin user, be sure to enter **an email address as username** or the login form won't allow you to access the site. You can enter anything since this is a local environment.

34
fabfile.py vendored
View File

@ -210,37 +210,3 @@ def rungrunt():
Executes grunt
"""
run('grunt --force')
#
# SETUP
#
@task_environment
@task
@hosts(['local'])
def setup():
execute(setup_virtualenv)
print(yellow('Creating project based on template'))
project_name = prompt('Project name? (lowercase, a-z or _)')
with virtualenv():
run('django-admin.py startproject '
'--template=$PWD/template {} .'.format(project_name)
)
# Find and replace {{ project_name }} inside gruntfile
run(
"sed -i -e 's/{{ project_name }}/%s/g' ./gruntfile.coffee" %
project_name
)
# Find and replace {{ project_name }} inside package.json
run(
"sed -i -e 's/{{ project_name }}/%s/g' ./package.json" %
project_name
)
# Remove sed backup files
run("rm *-e")
print(yellow('Finished!'))
print('If youre ready to work, run fab doctor & fab setup_environment')

View File

@ -9,6 +9,6 @@
"grunt-contrib-watch": ">=0.4.0",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-clean": "~0.5.0",
"grunt-bower": "^0.9.1",
"grunt-bower": "^0.9.1"
}
}