def generate_assets(directory, app_name=None):
    if not os.path.exists(os.path.join(directory, 'assets')):
        os.makedirs(os.path.join(directory, 'assets'))
    _build(_assets, os.path.join(directory, 'assets'))
    # setup angular application
    if not app_name:
        app_name = raw_input("Angular Application Name: ")
    with open(os.path.join(directory, 'assets', 'app', 'app.js'), 'w') as app:
        app.write('var app = angular.module("%s", []);' % app_name)
    # setup styles
    with open(os.path.join(directory, 'assets', 'lib', 'styles', 'styles.scss'), 'w') as styles:
        styles.write('//setup\n'
                     '@import "site/variables";\n'
                     '@import "site/mixins";\n'
                     '\n'
                     '//vendor\n'
                     '\n'
                     '//site\n'
                     '@import "site/global";\n')
dataset/ETHPy150Open mc706/django-angular-scaffold/angular_scaffold/management/commands/helpers/_generate_assets.py/generate_assets/original