def do_setup():
"""
Helps you setup your environment. Call it once per project.
"""
msg = "Command not found. Please, install %s"
assert get_cmd_exists('npm'), msg % "npm"
assert get_cmd_exists('vue'), msg % "vue-cli"
assert get_cmd_exists('fab'), msg % "fabric3"
assert get_cmd_exists('docker'), msg % "docker"
assert get_cmd_exists('docker-compose'), msg % "docker-compose"
print("Setting up VueJS (just accept defaults)")
local('vue init webpack ux', shell='/bin/bash')
print("Setting up SemanticUI (just accept defaults)")
with lcd(STYLES_DIR):
local('npm install semantic-ui', shell='/bin/bash')
semantic_settings = os.path.join(STYLES_DIR, 'semantic.json')
with open(semantic_settings, 'r') as fs:
data = json.load(fs)
data['autoInstall'] = True
with open(semantic_settings, 'w') as fs:
json.dump(data, fs)
print(
"IMPORTANT: run the following command:\n"
"sudo echo \"127.0.0.1 dv\" >> /etc/hosts")
print(
"IMPORTANT: make sure to update your envfile file with "
"your project production configuration.")
print(
"IMPORTANT: make sure to update your fabfile "
"hosts with your production host.")
print("")
print("Now you're ready to go:")
print(' fab env:dev up # for development mode')
print(' fab env:prd up # for production mode')
print(' fab env:tst up # to simulate production mode')
print('Locally, your project will be available at http://dv:8080')
评论列表
文章目录