Skip to content

Commit

Permalink
remove icon and add the fuck gulp
Browse files Browse the repository at this point in the history
  • Loading branch information
madneal committed Feb 12, 2018
1 parent 9561be4 commit d7bee5a
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.vscode
node_modules
46 changes: 41 additions & 5 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,44 @@
const fs = require('fs')
const gulp = require('gulp')
const del = require('del')
const zip = require('gulp-zip')
const archiver = require('archiver')
const runSequence = require('run-sequence')
const zipDir = 'export-to-markdown'

gulp.task('createDir', function() {
fs.mkdirSync(zipDir, 0755)
fs.mkdirSync(zipDir + '/icons', 0755)
fs.mkdirSync(zipDir + '/scripts', 0755)
})
// gulp.task('createDir', function() {
// // if (fs.existsSync(zipDir)) {
// // del(zipDir)
// // }
// // if (fs.existsSync(zipDir + '.zip')) {
// // del(zipDir + '.zip')
// // }
// fs.mkdirSync(zipDir, 0755)
// fs.mkdirSync(zipDir + '/icons', 0755)
// fs.mkdirSync(zipDir + '/scripts', 0755)
// })

gulp.task('moveFile', function() {
gulp.src('icons/*.png')
.pipe(gulp.dest(zipDir + '/icons'))
gulp.src('scripts/*.js')
.pipe(gulp.dest(zipDir + '/scripts'))
del(zipDir + '/scripts/turndown.js')
gulp.src(['load.svg', 'manifest.json', 'popup.html'])
.pipe(gulp.dest(zipDir + '/'))
})

gulp.task('clear', function() {
del(zipDir)
del('export-to-markdown.zip')
})

gulp.task('zip', function() {
return gulp.src(zipDir + '/*')
.pipe(zip(zipDir + '.zip'))
.pipe(gulp.dest('./'))
})

gulp.task('chrome', function (callback) {
runSequence('clear', 'moveFile', callback);
});
Binary file removed icons/icon-128.png
Binary file not shown.
Binary file removed icons/icon-16.png
Binary file not shown.
Binary file removed icons/icon-19.png
Binary file not shown.
Binary file removed icons/icon-38.png
Binary file not shown.
Binary file removed icons/icon-48.png
Binary file not shown.
Binary file removed icons/icon-64.png
Binary file not shown.
Binary file removed icons/icon.png
Binary file not shown.
Binary file removed icons/icon1.png
Binary file not shown.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Export to Markdown",
"short_name": "ExportToMarkdown",
"description": "This is utilized to export the story in Medium to a markdown format file.",
"version": "0.1.5",
"version": "0.1.6",
"icons": {
"16": "icons/medium-16.png",
"48": "icons/medium-48.png",
Expand Down
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dependencies": {
"archiver": "^2.1.1",
"del": "^3.0.0"
}
}

0 comments on commit d7bee5a

Please sign in to comment.