From b600aa2907e33a91ee6950534b354df2d43ce335 Mon Sep 17 00:00:00 2001 From: Steven Loria Date: Sun, 1 May 2016 11:47:56 -0400 Subject: [PATCH] Minor tasks refactor --- tasks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index 5821a03..e4ab65a 100644 --- a/tasks.py +++ b/tasks.py @@ -2,13 +2,16 @@ # -*- coding: utf-8 -*- """Invoke tasks.""" import os +import json import shutil from invoke import task, run HERE = os.path.abspath(os.path.dirname(__file__)) +with open(os.path.join(HERE, 'cookiecutter.json'), 'r') as fp: + COOKIECUTTER_SETTINGS = json.load(fp) # Match default value of app_name from cookiecutter.json -COOKIE = os.path.join(HERE, 'myflaskapp') +COOKIE = os.path.join(HERE, COOKIECUTTER_SETTINGS['app_name']) REQUIREMENTS = os.path.join(COOKIE, 'requirements', 'dev.txt')