Skip to content

Commit

Permalink
replace the fuck gulp with python build 🔧
Browse files Browse the repository at this point in the history
  • Loading branch information
madneal committed Feb 13, 2018
1 parent b34f64e commit 0349922
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 46 deletions.
32 changes: 30 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
import os.
import os
import shutil
import zipfile
zip_dir = 'export-to-markdown'
zip_filename = zip_dir + '.zip'

def create_dir():
os.makedirs(zip_dir)

def move_files():
shutil.copytree('icons', zip_dir + '/icons')
shutil.copytree('scripts', zip_dir + '/scripts')
shutil.copyfile('manifest.json', zip_dir + '/manifest.json')
shutil.copyfile('popup.html', zip_dir + '/popup.html')
shutil.copyfile('load.svg', zip_dir + '/load.svg')
os.remove(zip_dir + '/scripts/turndown.js')


def zip():
zipf = zipfile.ZipFile(zip_filename, 'w', zipfile.ZIP_DEFLATED)
for root, dirs, files in os.walk(zip_dir):
for file in files:
print(root + ':' + file)
zipf.write(os.path.join(root, file))

if __name__ == '__main__':
print(123)
if os.path.isdir(zip_dir):
shutil.rmtree(zip_dir)
os.remove(zip_filename)
create_dir()
move_files()
zip()
44 changes: 0 additions & 44 deletions gulpfile.js

This file was deleted.

0 comments on commit 0349922

Please sign in to comment.