Skip to content

Commit

Permalink
build with node
Browse files Browse the repository at this point in the history
  • Loading branch information
hankxdev committed Jul 4, 2017
1 parent 7dc4407 commit e5fbfd3
Show file tree
Hide file tree
Showing 29 changed files with 60 additions and 23 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Expand Up @@ -48,4 +48,8 @@ Temporary Items

# IDE
.idea/
*.zip
*.zip

#deploy stuff
node_modules/
deploy/
27 changes: 27 additions & 0 deletions gulpfile.js
@@ -0,0 +1,27 @@
/**
* Created by yrst on 7/4/2017.
*/
var gulp = require('gulp');
var zip = require('gulp-zip');
var debug = require('gulp-debug');
var clean = require('gulp-clean');
var replace = require("gulp-string-replace");
var fs = require('fs');

var manifest = JSON.parse(fs.readFileSync('src/manifest.json'));

gulp.task('zip', function () {
return gulp.src("src/**/*")
.pipe(zip("deploy/extmanager.zip"))
.pipe(gulp.dest("./"))
.pipe(debug({title: "zip done"}));
});

gulp.task("increaseVersion", function () {
manifest.version = (+manifest.version + 0.1).toFixed(1);
var json = JSON.stringify(manifest);
fs.writeFile("src/manifest.json", json, "utf8");
});


gulp.task("build", ["increaseVersion", "zip"]);
22 changes: 0 additions & 22 deletions manifest.json

This file was deleted.

27 changes: 27 additions & 0 deletions package.json
@@ -0,0 +1,27 @@
{
"name": "one-click-extensions-manager",
"version": "1.0.0",
"description": "View, enable, disable, remove your extensions with ease.",
"main": "popup.js",
"dependencies": {},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "node ./node_modules/gulp/bin/gulp.js build"
},
"repository": {
"type": "git",
"url": "git+https://github.com/HangYang/one-click-extensions-manager.git"
},
"keywords": [
"chrome",
"extension",
"webextension"
],
"author": "Hank Yang, Federico Brigante",
"license": "MIT",
"bugs": {
"url": "https://github.com/HangYang/one-click-extensions-manager/issues"
},
"homepage": "https://github.com/HangYang/one-click-extensions-manager#readme"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes
1 change: 1 addition & 0 deletions src/manifest.json
@@ -0,0 +1 @@
{"name":"__MSG_extName__","description":"__MSG_extDesc__","version":"1.4","manifest_version":2,"homepage_url":"https://github.com/HangYang/one-click-extensions-manager","default_locale":"en","permissions":["management"],"icons":{"16":"logo.png","128":"logo.png"},"browser_action":{"default_icon":"logo.png","default_popup":"popup.html"},"options_ui":{"page":"options.html"}}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes

1 comment on commit e5fbfd3

@fregante
Copy link
Collaborator

@fregante fregante commented on e5fbfd3 Jul 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to manually make a zip file, nor gulp.

This is all that's needed: https://github.com/sindresorhus/refined-github/blob/57eea6f/package.json#L7-L10

{
"release:amo": "cd extension && webext submit",
"release:cws": "cd extension && webstore upload --auto-publish",
"release": "run-s build update-version release:*",
"update-version": "dot-json extension/manifest.json version $(date -u +%y.%-m.%-d.%-H%M)"
}

Please sign in to comment.