Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
add version to options html
Browse files Browse the repository at this point in the history
  • Loading branch information
theowenyoung committed Nov 8, 2022
1 parent 6979c95 commit 410e6e1
Show file tree
Hide file tree
Showing 11 changed files with 210 additions and 23 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Change Log


## 0.0.17
## 0.0.16.1

- Support Nitter
- Support https://mail.jabber.org/pipermail/juser/2020-December/007186.html, http://antirez.com/news/137

## 0.0.16

Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.Phony: start
start:
web-ext run -s ./src

.Phony: build
build:
npm run build
19 changes: 16 additions & 3 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ const zip = require("gulp-zip");
const fs = require("fs");
const babel = require("gulp-babel");
const sourcemaps = require("gulp-sourcemaps");

const manifest = require("./src/manifest.json");
const replace = require('gulp-replace');
gulp.task("clean", (cb) => {
fs.rmSync("dist", { recursive: true, force: true });
cb();
Expand Down Expand Up @@ -69,13 +70,25 @@ gulp.task("chrome-zip", () => {
.pipe(gulp.dest("dist"));
});

gulp.task("chrome-replace",()=>{
return gulp.src(["dist/chrome/options/options.html"])
.pipe(replace("__IMMERSIVE_TRANSLATE_VERSION__",manifest.version))
.pipe(gulp.dest("dist/chrome/options/"));
})

console.log("manifest.version", manifest.version)
gulp.task("firefox-replace",()=>{
return gulp.src(["dist/firefox/options/options.html"])
.pipe(replace("__IMMERSIVE_TRANSLATE_VERSION__",manifest.version))
.pipe(gulp.dest("dist/firefox/options/"));
})
gulp.task(
"firefox-build",
gulp.series("firefox-copy", "firefox-babel", "firefox-zip")
gulp.series("firefox-copy", "firefox-babel", "firefox-replace","firefox-zip")
);
gulp.task(
"chrome-build",
gulp.series("chrome-copy", "chrome-rename", "chrome-babel", "chrome-zip")
gulp.series("chrome-copy", "chrome-rename", "chrome-babel", "chrome-replace","chrome-zip")
);

gulp.task("default", gulp.series("clean", "firefox-build", "chrome-build"));
158 changes: 158 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"chrome 70"
],
"scripts": {
"build": "npx gulp"
"build": "npx gulp",
"firefox":"npx gulp firefox-build "
},
"devDependencies": {
"@babel/core": "^7.19.3",
Expand All @@ -15,6 +16,7 @@
"@types/firefox-webext-browser": "^94.0.1",
"gulp": "^4.0.2",
"gulp-babel": "^8.0.0",
"gulp-replace": "^1.1.3",
"gulp-sourcemaps": "^3.0.0",
"gulp-zip": "^5.1.0"
}
Expand Down
2 changes: 1 addition & 1 deletion src/chrome_manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"default_locale": "en",
"name": "Immersive Translate",
"description": "支持整页翻译·双语显示·只翻译正文。布局全面优化,和浏览器阅读模式类似,对Twitter, Reddit等网站做了定制优化",
"version": "0.0.16",
"version": "0.0.16.1",
"homepage_url": "https://github.com/theowenyoung/Traduzir-paginas-web",

"commands": {
Expand Down
Loading

0 comments on commit 410e6e1

Please sign in to comment.