- Fixed package.json
- Removed unused task from fable - Added base README
This commit is contained in:
parent
0b273feef9
commit
0c9ea7b6c0
|
@ -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.
|
||||||
|
|
|
@ -210,37 +210,3 @@ def rungrunt():
|
||||||
Executes grunt
|
Executes grunt
|
||||||
"""
|
"""
|
||||||
run('grunt --force')
|
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')
|
|
||||||
|
|
|
@ -9,6 +9,6 @@
|
||||||
"grunt-contrib-watch": ">=0.4.0",
|
"grunt-contrib-watch": ">=0.4.0",
|
||||||
"grunt-contrib-concat": "~0.3.0",
|
"grunt-contrib-concat": "~0.3.0",
|
||||||
"grunt-contrib-clean": "~0.5.0",
|
"grunt-contrib-clean": "~0.5.0",
|
||||||
"grunt-bower": "^0.9.1",
|
"grunt-bower": "^0.9.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue