python from flask import Flask, render_template from jinja_assets_compressor import Compressor app = Flask(__name__) app.config['COMPRESSOR_DEBUG'] = True app.config['COMPRESSOR_OUTPUT_DIR'] = 'static/build' app.config['COMPRESSOR_FILTERS'] = { 'js': ['uglifyjs'], 'css': ['cssmin'] } compressor = Compressor(app) @app.route('/') def index(): return render_template('index.html') if __name__ == '__main__': app.run(debug=True)


上一篇:
下一篇:
切换中文