Questions tagged [webassets]

webassets is the asset management application for Python web development — use it to merge and compress your JavaScript and CSS files.

webassets is the asset management application for Python web development — use it to merge and compress your JavaScript and CSS files.

For some web frameworks, webassets provides some special integration:

But it can also be used with other frameworks or no framework at all.

40 questions
0
votes
1 answer

Joomla 4 - $wa->useScript('...') not working

I am developing a view for the Joomla 4 component. I am trying to connect the style and script files through the WebAssetManager. use Joomla\CMS\Factory; $wa =…
0
votes
1 answer

flask-assets append_path() catch-22

I have a package which contains static files I want to reuse among applications. Based on https://webassets.readthedocs.io/en/latest/environment.html#webassets.env.Environment.load_path I came up with the following code snippet, to be used in each…
Lou K
  • 1,128
  • 2
  • 12
  • 31
0
votes
1 answer

Webassets + Typescript, cannot resolve symbols/modules

I have a flask project with the following structure: ├─ app.py ├─ project | ├─ __init__.py | └─ static | └─ typescript | └─ app.ts └─ typings ├─ globals | └─ ... # multiple imported ts libraries └─ index.d.ts I'm using a…
Tyler Sebastian
  • 9,067
  • 6
  • 39
  • 62
0
votes
1 answer

flask-assets- FilterError: stylus: subprocess returned a non-success result code: 1, stdout=, stderr=

I'm attempting to compile stylus files using flask-assets and webassets. This "just works" on the iMac in my office, but stylus is returning and exit code of 1 when I try to run the server on my desktop running Ubuntu 14.04. I've tried installing…
0
votes
1 answer

Error while trying to use pyramid_webassets and pyramid_jinja2 together

I am trying to get my pyramid app to use pyramid_jinja2 and pyramid_webassets. My main config function looks a little like this: def main(global_config, **settings): engine = engine_from_config(settings, 'sqlalchemy.', encoding='utf-8') …
anthony-dandrea
  • 2,583
  • 7
  • 26
  • 46
0
votes
2 answers

Example of configuring Flask + AngularJS + PyJade (or other alternative to Jinja)

I am new to Flask and building a web app that uses Flask and AngularJS. My understanding is that the static directory is the place to store AngularJS files like javascript and templates. I wonder if there is a stable alternative to Html/Jinja that…
kpax
  • 621
  • 1
  • 8
  • 18
0
votes
1 answer

CSS file not being downloaded - Flask

I am suddenly having a very odd issue where my browsers (Chrome, Safari, Firefox) are not downloading an external css file. I am building a python flask app for heroku. I am developing on a local server (both gunicorn and the default flask…
Harrison
  • 830
  • 1
  • 15
  • 28
0
votes
1 answer

Laravel: Basset how to combine collection?

Ihave 2 collection: Basset::collection('_b_pre', function($collection) { $collection->add('../vendor/twitter/bootstrap/less/bootstrap.less')->apply('Less')->andApply('CssMin'); …
user2002495
  • 2,126
  • 8
  • 31
  • 61
0
votes
1 answer

dustjs + webassets results to empty compiled file

I'm running python (2.7) with Flask with webassets (0.9) and i done all the steps described in the docs for running dustjs, but all results in an empty file. The strangest thing is that when I run dusty directly in the dir with my templates it…
bozhidarc
  • 834
  • 1
  • 11
  • 25
-1
votes
1 answer

RuntimeError: assets instance not bound to an application, and no application in current context

I'm working to modify a cookiecutter Flask app. I'm currently trying to add a datepicker to a page. I've found https://eonasdan.github.io/bootstrap-datetimepicker/. This cookiecutter uses flask-assets to manage the project assets. Following…
user1592380
  • 34,265
  • 92
  • 284
  • 515
1 2
3