diff options
| author | Eliot Whalan <ewhal@pantsu.cat> | 2016-06-18 07:56:35 +0200 |
|---|---|---|
| committer | Eliot Whalan <ewhal@pantsu.cat> | 2016-06-18 07:56:35 +0200 |
| commit | ea911c6ddc146739edfa4089dbdb9bf7d9053707 (patch) | |
| tree | aa8cc30af2ecf773610846b4b47073b8e9de3f7d /Makefile | |
| parent | e199b9f914d57724c9a08ca3749a08a7aad46256 (diff) | |
Add makefile
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..82ce430 --- /dev/null +++ b/Makefile @@ -0,0 +1,25 @@ +all: mkdirs swig min-css min-js copy + +swig: + @node node_modules/swig/bin/swig.js render -j dist.json templates/faq.swig > dist/faq.html + @node node_modules/swig/bin/swig.js render -j dist.json templates/index.swig > dist/index.html + @node node_modules/swig/bin/swig.js render -j dist.json templates/tools.swig > dist/tools.html + +mkdirs: + @mkdir -p ./dist/img + +min-css: + @node ./node_modules/.bin/cleancss --s0 ./static/css/pomf.css > ./dist/pomf.min.css + +min-js: + @echo "// @source https://git.pantsu.cat/pantsu/pomf/tree/js" >> ./dist/pomf.min.js + @echo "// @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt Expat" >> ./dist/pomf.min.js + @node ./node_modules/.bin/uglifyjs --screw-ie8 ./static/js/app.js >> ./dist/pomf.min.js + @echo "// @license-end" >> ./dist/pomf.min.js + +copy: + @cp -r ./static/php/* ./dist/ + @cp ./static/img/*.png ./dist/img + @cp ./static/img/favicon.ico ./dist/favicon.ico + + |
