-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Conflicts: # data/data.json
- Loading branch information
Showing
110 changed files
with
10,730 additions
and
5,221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,5 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
### Node template | ||
# Logs | ||
logs | ||
*.log | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (http://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directory | ||
# https://docs.npmjs.com/misc/faq#should-i-check-my-node-modules-folder-into-git | ||
node_modules | ||
|
||
# WebStorm config file | ||
.idea | ||
|
||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,31 @@ | ||
# YoudaoDict | ||
|
||
```bash | ||
```shell | ||
npm install | ||
webpack -p | ||
npm run build | ||
``` | ||
|
||
自制有道词典 Chrome 扩展,使用[有道词典 api](http://fanyi.youdao.com/openapi) | ||
|
||
## Install 安装 | ||
## 安装 | ||
|
||
* 去 [Chrome 官方商店](https://chrome.google.com/webstore/detail/youdao-dict/geboigdomoihijcamklnhlcgnnpdgkmg)安装。 | ||
|
||
* 下载 [crx 文件](https://github.com/youngdze/YoudaoDict/releases)安装。 | ||
|
||
## 使用 | ||
|
||
点击扩展图标输入进行翻译 | ||
## 开发 | ||
|
||
![YoudaoDict Screenshot](screenshot/youdaos1.png) | ||
|
||
双击或按 Ctrl 对选择区域进行翻译 | ||
```shell | ||
npm run dev | ||
``` | ||
|
||
![YoudaoDict Screenshot](screenshot/youdaos2.png) | ||
在 Chrome 扩展页面点击载入开发中的扩展,选择 `build` 目录。 | ||
|
||
设置 | ||
## 功能 | ||
|
||
![YoudaoDict Screenshot](screenshot/youdaos3.png) | ||
* 点击扩展图标输入进行翻译 | ||
* 双击或按 Ctrl 对选择区域进行翻译 | ||
* 添加生词至有道单词本 | ||
|
||
## 版权 | ||
|
||
* DO WHATEVER YOU WANT | ||
* DO WHATEVER YOU WANT |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
'use strict'; | ||
|
||
const gulp = require('gulp'); | ||
const jade = require('gulp-jade'); | ||
const imagemin = require('gulp-imagemin'); | ||
const pngquant = require('imagemin-pngquant'); | ||
const webpack = require('webpack-stream'); | ||
const webpackConf = require('./webpack.config.js'); | ||
|
||
const NODE_ENV = process.env.NODE_ENV || 'dev'; | ||
|
||
gulp.task('manifest', () => { | ||
gulp.src('manifest.json').pipe(gulp.dest('build')); | ||
}); | ||
|
||
gulp.task('moveLib', () => { | ||
gulp.src('src/lib/**/*.js').pipe(gulp.dest('build/lib')); | ||
}); | ||
|
||
gulp.task('jade', () => { | ||
gulp.src(['src/tpl/popup.jade', 'src/tpl/options.jade']) | ||
.pipe(jade()) | ||
.pipe(gulp.dest('build')); | ||
}); | ||
|
||
gulp.task('imagemin', () => { | ||
gulp.src('src/img/icon.png') | ||
.pipe(imagemin({ | ||
progressive: true, | ||
svgoPlugins: [{removeViewBox: false}], | ||
use: [pngquant()] | ||
})) | ||
.pipe(gulp.dest('build/img')); | ||
}); | ||
|
||
gulp.task('webpack', () => { | ||
gulp.src('./src/script/*.js') | ||
.pipe(webpack(webpackConf)) | ||
.pipe(gulp.dest('build')); | ||
}); | ||
|
||
gulp.task('default', ['manifest', 'moveLib', 'jade', 'imagemin', 'webpack'], () => { | ||
if(Object.is(NODE_ENV, 'dev')) { | ||
gulp.watch(['./manifest.json'], ['manifest']); | ||
gulp.watch(['./src/tpl/*.jade'], ['jade']); | ||
gulp.watch(['./src/tpl/*.jade', './src/style/*.scss', './src/script/**/*.js'], ['webpack']); | ||
} | ||
}); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.