#!/usr/bin/env python3 #****************************************************************************** # Copyright (C) 2018 Thomas "Cakeisalie5" Touhey # This file is part of the textoutpc project, which is MIT-licensed. #****************************************************************************** """ textoutpc demonstration application definition. """ import os.path as _path from flask import Flask as _Flask from flask_assets import (Environment as _AssetsEnvironment, Bundle as _AssetsBundle) from ._main import main as _main __all__ = ["app"] # Make the app and register blueprints. _gd = lambda x: _path.relpath(_path.join(_path.dirname(__file__), x)) app = _Flask('textout', template_folder = _gd('templates'), static_folder = _gd('static'), static_url_path = '/static') app.register_blueprint(_main) # Add the assets. _assets = _AssetsEnvironment(app) _assets.register('js', _AssetsBundle('js/elements.js', filters = 'jsmin', output = 'index.js')) _assets.register('css', _AssetsBundle('css/elements.scss', 'css/page.scss', filters = ('scss', 'cssmin'), output = 'index.css')) # End of file.