forked from greizgh/pelican-material
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasks.py
27 lines (19 loc) · 754 Bytes
/
tasks.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from invoke import task, run
import os
import shutil
@task
def clean():
"""Remove generated files"""
shutil.rmtree('static/font')
os.remove('static/css/materialize.min.css')
os.remove('static/js/materialize.min.js')
os.remove('static/js/jquery.min.js')
@task
def build():
"""Build local version of site"""
run('sassc -t compressed materialize-src/sass/materialize.scss static/css/materialize.min.css')
run('rsync -a --delete materialize-src/font/ static/font')
shutil.copy2('jquery-2.1.4.min.js', 'static/js/jquery.min.js')
shutil.copy2('materialize-src/js/bin/materialize.min.js', 'static/js/')
shutil.copy2('mdl/material.min.css', 'static/css/')
shutil.copy2('mdl/material.min.js', 'static/js/')