Implement AssetPack
This commit is contained in:
parent
4adc4b18b0
commit
d9bf249728
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -38,3 +38,6 @@ inc/
|
|||
/PostText.conf
|
||||
/PostText.yaml
|
||||
/PostText.yml
|
||||
|
||||
# AssetPack cache
|
||||
/assets/cache/
|
||||
|
|
|
@ -14,6 +14,7 @@ use PostText::Model::Thread;
|
|||
# Load Mojo plugins
|
||||
plugin 'Config';
|
||||
plugin 'TagHelpers::Pagination';
|
||||
plugin AssetPack => {pipes => [qw{Css Combine}]};
|
||||
|
||||
# Helpers
|
||||
helper pg => sub {
|
||||
|
@ -96,5 +97,7 @@ if (my $threads_per_page = app->config->{'threads_per_page'}) {
|
|||
app->thread->threads_per_page($threads_per_page)
|
||||
}
|
||||
|
||||
app->asset->process('main.css', 'css/PostText.css');
|
||||
|
||||
# Send it
|
||||
app->start();
|
||||
|
|
|
@ -24,6 +24,5 @@ Run the tests locally (against development environment)
|
|||
|
||||
## TODOs
|
||||
|
||||
1. Setup [Mojolicious::Plugin::AssetPack](https://metacpan.org/pod/Mojolicious::Plugin::AssetPack)
|
||||
1. Pick a date format
|
||||
1. Reply model
|
||||
|
|
8
assets/assetpack.db
Normal file
8
assets/assetpack.db
Normal file
|
@ -0,0 +1,8 @@
|
|||
[css-min:css/PostText.css]
|
||||
checksum=942e7be1d2
|
||||
format=css
|
||||
minified=1
|
||||
[css-min:https://unpkg.com/98.css]
|
||||
checksum=4f089bc53f
|
||||
format=css
|
||||
minified=1
|
1
assets/cache/98-6dcfb1396a.min.css
vendored
Normal file
1
assets/cache/98-6dcfb1396a.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
assets/cache/PostText-58189683ab.min.css
vendored
Normal file
1
assets/cache/PostText-58189683ab.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.field-with-error{}
|
2
assets/cache/unpkg.com/98.css
vendored
Normal file
2
assets/cache/unpkg.com/98.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
assets/css/PostText.css
Normal file
1
assets/css/PostText.css
Normal file
|
@ -0,0 +1 @@
|
|||
.field-with-error {}
|
1
cpanfile
1
cpanfile
|
@ -1,3 +1,4 @@
|
|||
requires 'Mojolicious';
|
||||
requires 'Mojo::Pg';
|
||||
requires 'Mojolicious::Plugin::TagHelpers::Pagination';
|
||||
requires 'Mojolicious::Plugin::AssetPack';
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<title>Post::Text - <%= title %></title>
|
||||
<%= asset 'main.css' %>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Post::Text</h1>
|
||||
|
|
Loading…
Reference in New Issue
Block a user