pietroalbini / lektor-minify Goto Github PK
View Code? Open in Web Editor NEWMinify build artifacts in a Lektor project
License: MIT License
Minify build artifacts in a Lektor project
License: MIT License
running lektor --project ../newblog/ server -h 0.0.0.0 -f minify
I get
Traceback (most recent call last): File "/home/tariquesani/Projects/lektor/venv/lib/python2.7/site-packages/flask/app.py", line 1994, in __call__ return self.wsgi_app(environ, start_response) File "/home/tariquesani/Projects/lektor/venv/lib/python2.7/site-packages/flask/app.py", line 1985, in wsgi_app response = self.handle_exception(e) File "/home/tariquesani/Projects/lektor/venv/lib/python2.7/site-packages/flask/app.py", line 1540, in handle_exception reraise(exc_type, exc_value, tb) File "/home/tariquesani/Projects/lektor/venv/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/home/tariquesani/Projects/lektor/venv/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/tariquesani/Projects/lektor/venv/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/home/tariquesani/Projects/lektor/venv/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/home/tariquesani/Projects/lektor/venv/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/home/tariquesani/Projects/lektor/lektor/admin/modules/serve.py", line 151, in serve_artifact return serve_up_artifact(path) File "/home/tariquesani/Projects/lektor/lektor/admin/modules/serve.py", line 130, in serve_up_artifact artifact_name, filename = li.resolve_artifact('/' + path, pad) File "/home/tariquesani/Projects/lektor/lektor/admin/webui.py", line 60, in resolve_artifact prog, _ = builder.build(source) File "/home/tariquesani/Projects/lektor/lektor/builder.py", line 1103, in build source=source, prog=prog) File "/home/tariquesani/Projects/lektor/lektor/pluginsystem.py", line 160, in emit rv[plugin.id] = handler(**kwargs) File "/home/tariquesani/.cache/lektor/packages/cbce499f658a58ac87b6d5f9a0d5bda1/lektor_minify/__init__.py", line 84, in on_after_build artifacts = set(build_state.updated_artifacts) - self.seen_artifacts AttributeError: 'MinifyPlugin' object has no attribute 'seen_artifacts'
Hi!
Thank you for this plugin, it's really very helpful.
However, after installing it, it didn't work straight away for me. I kept on getting the error that htmlmin.minify
couldn't be found. https://stackoverflow.com/questions/41113011/importerror-no-module-named-htmlmin-minify helped me in figuring out that django-htmlmin had to be installed as well.
Perhaps it's possible to list this as a dependency to get it automatically installed when adding this plugin to Lektor?
Thanks again for this plugin!
I've noticed that while using -f minify:html,js
on lektor server
that when a change to an included file is made, the [parents] file isn't getting rebuilt.
When using in a template file:
{% include
Running `lekor server without the args to trigger the minification plugin allows Lektor to rebuild any files that include the modified file.
I'm running Lektor v3.1.3
with lektor-minify v1.2
on python:3.8 (Docker Compose)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.