Browse Source

Minify CSS

master
Frederic Guillot 5 years ago
parent
commit
9234657b17
  1. 1
      ChangeLog
  2. 7
      Makefile
  3. 2
      app/helpers/template.php
  4. 1
      assets/css/app.min.css
  5. 1
      package.json

1
ChangeLog

@ -19,6 +19,7 @@ Version 1.2.0 (unreleased)
* Add functional tests (Json-RPC API and Fever API)
* Add unit tests
* Minify Javascript and add automated syntax check on the CI
* Minify CSS
Migration procedure from 1.1.x to 1.2.0:

7
Makefile

@ -9,6 +9,7 @@
.PHONY: sync-locales
.PHONY: find-locales
CSS_FILE = assets/css/app.min.css
JS_FILE = assets/js/app.min.js
CONTAINER = miniflux
IMAGE = miniflux/miniflux
@ -26,6 +27,12 @@ docker-destroy:
docker-run:
@ docker run --rm --name $(CONTAINER) -P $(IMAGE):$(TAG)
css: $(CSS_FILE)
$(CSS_FILE): assets/css/app.css
@ yarn install || npm install
@ cat $^ | ./node_modules/.bin/cleancss -o $@
js: $(JS_FILE)
$(JS_FILE): assets/js/src/app.js \

2
app/helpers/template.php

@ -47,7 +47,7 @@ function css()
}
}
return 'assets/css/app.css?version='.filemtime('assets/css/app.css');
return 'assets/css/app.min.css?version='.filemtime('assets/css/app.min.css');
}
function format_bytes($size, $precision = 2)

1
assets/css/app.min.css vendored

File diff suppressed because one or more lines are too long

1
package.json

@ -1,5 +1,6 @@
{
"dependencies": {
"clean-css": "^3.4.23",
"jshint": "^2.9.4",
"uglify-js": "^2.7.5"
}

Loading…
Cancel
Save