Compare commits
3 commits
Author | SHA1 | Date | |
---|---|---|---|
|
0c4fa7ad06 | ||
|
fbb3d0b6c8 | ||
![]() |
a82d729246 |
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
|||
*.pyc
|
||||
dist/
|
||||
Wutta_Demo.egg-info/
|
||||
|
|
|
@ -31,11 +31,12 @@ dependencies = [
|
|||
[project.scripts]
|
||||
wuttademo = "wuttademo.commands:wuttademo_typer"
|
||||
|
||||
[project.entry-points."fanstatic.libraries"]
|
||||
wuttademo_libcache = "wuttademo.web.static:libcache"
|
||||
|
||||
[project.entry-points."wutta.config.extensions"]
|
||||
"wuttademo" = "wuttademo.config:WuttaDemoConfig"
|
||||
|
||||
|
||||
[project.entry-points."paste.app_factory"]
|
||||
"main" = "wuttademo.web.app:main"
|
||||
|
||||
|
|
|
@ -26,4 +26,4 @@ class WuttaDemoConfig(WuttaConfigExtension):
|
|||
'wuttademo.web.menus:WuttaDemoMenuHandler')
|
||||
|
||||
# web app libcache
|
||||
#config.setdefault('tailbone.static_libcache.module', 'wuttademo.web.static')
|
||||
config.setdefault('wuttaweb.static_libcache.module', 'wuttademo.web.static')
|
||||
|
|
|
@ -8,7 +8,7 @@ from wuttaweb import app as base
|
|||
|
||||
def main(global_config, **settings):
|
||||
"""
|
||||
This function returns a Pyramid WSGI application.
|
||||
Make and return the WSGI application, per given settings.
|
||||
"""
|
||||
# prefer Wutta Demo templates over wuttaweb
|
||||
settings.setdefault('mako.directories', [
|
||||
|
@ -21,8 +21,22 @@ def main(global_config, **settings):
|
|||
pyramid_config = base.make_pyramid_config(settings)
|
||||
|
||||
# bring in the rest of Wutta Demo
|
||||
pyramid_config.include('wuttademo.web.static')
|
||||
pyramid_config.include('wuttaweb.static')
|
||||
pyramid_config.include('wuttademo.web.subscribers')
|
||||
pyramid_config.include('wuttademo.web.views')
|
||||
|
||||
return pyramid_config.make_wsgi_app()
|
||||
|
||||
|
||||
def make_wsgi_app():
|
||||
"""
|
||||
Make and return the WSGI app.
|
||||
"""
|
||||
return base.make_wsgi_app(main)
|
||||
|
||||
|
||||
def make_asgi_app():
|
||||
"""
|
||||
Make and return the ASGI app.
|
||||
"""
|
||||
return base.make_asgi_app(main)
|
||||
|
|
|
@ -3,11 +3,16 @@
|
|||
Static assets
|
||||
"""
|
||||
|
||||
# from fanstatic import Library, Resource
|
||||
from fanstatic import Library, Resource
|
||||
|
||||
|
||||
# # libcache
|
||||
# libcache = Library('wuttademo_libcache', 'libcache')
|
||||
# fanstatic libcache
|
||||
libcache = Library('wuttademo_libcache', 'libcache')
|
||||
vue_js = Resource(libcache, 'vue-2.6.14.min.js')
|
||||
vue_resource_js = Resource(libcache, 'vue-resource-1.5.3.min.js')
|
||||
buefy_js = Resource(libcache, 'buefy-0.9.25.min.js')
|
||||
buefy_css = Resource(libcache, 'buefy-0.9.25.min.css')
|
||||
fontawesome_js = Resource(libcache, 'fontawesome-5.3.1-all.min.js')
|
||||
# bb_vue_js = Resource(libcache, 'vue.esm-browser-3.3.11.prod.js')
|
||||
# bb_oruga_js = Resource(libcache, 'oruga-0.8.10.js')
|
||||
# bb_oruga_bulma_js = Resource(libcache, 'oruga-bulma-0.3.0.js')
|
||||
|
@ -15,8 +20,3 @@ Static assets
|
|||
# bb_fontawesome_svg_core_js = Resource(libcache, 'fontawesome-svg-core-6.5.2.js')
|
||||
# bb_free_solid_svg_icons_js = Resource(libcache, 'free-solid-svg-icons-6.5.2.js')
|
||||
# bb_vue_fontawesome_js = Resource(libcache, 'vue-fontawesome-3.0.6.index.es.js')
|
||||
|
||||
|
||||
def includeme(config):
|
||||
config.include('wuttaweb.static')
|
||||
config.add_static_view('wuttademo', 'wuttademo.web:static', cache_max_age=3600)
|
||||
|
|
1
src/wuttademo/web/static/libcache/buefy-0.9.25.min.css
vendored
Normal file
1
src/wuttademo/web/static/libcache/buefy-0.9.25.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
2
src/wuttademo/web/static/libcache/buefy-0.9.25.min.js
vendored
Normal file
2
src/wuttademo/web/static/libcache/buefy-0.9.25.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5
src/wuttademo/web/static/libcache/fontawesome-5.3.1-all.min.js
vendored
Normal file
5
src/wuttademo/web/static/libcache/fontawesome-5.3.1-all.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
src/wuttademo/web/static/libcache/vue-2.6.14.min.js
vendored
Normal file
6
src/wuttademo/web/static/libcache/vue-2.6.14.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
src/wuttademo/web/static/libcache/vue-resource-1.5.3.min.js
vendored
Normal file
7
src/wuttademo/web/static/libcache/vue-resource-1.5.3.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
20
tasks.py
20
tasks.py
|
@ -9,25 +9,13 @@ import shutil
|
|||
from invoke import task
|
||||
|
||||
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
exec(open(os.path.join(here, 'wuttademo', '_version.py')).read())
|
||||
|
||||
|
||||
@task
|
||||
def release(c):
|
||||
"""
|
||||
Release a new version of Wutta Demo
|
||||
"""
|
||||
# rebuild local tar.gz file for distribution
|
||||
if os.path.exists('Wutta_Demo.egg-info'):
|
||||
shutil.rmtree('Wutta_Demo.egg-info')
|
||||
if os.path.exists('dist'):
|
||||
shutil.rmtree('dist')
|
||||
|
||||
c.run('python -m build --sdist')
|
||||
|
||||
# filename of built package
|
||||
filename = 'Wutta-Demo-{}.tar.gz'.format(__version__)
|
||||
|
||||
# TODO: uncomment and update these details, to upload to private PyPI
|
||||
#c.run('scp dist/{} rattail@pypi.example.com:/srv/pypi/wuttademo/'.format(filename))
|
||||
|
||||
# TODO: or, uncomment this to upload to *public* PyPI
|
||||
#c.run('twine upload dist/{}'.format(filename))
|
||||
c.run('twine upload dist/*')
|
||||
|
|
Loading…
Reference in a new issue