-
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dessant
committed
Jun 17, 2017
0 parents
commit 3cb3096
Showing
36 changed files
with
7,749 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
'plugins': ['lodash'], | ||
'presets': [['env', {'targets': {'firefox': 53}}]] | ||
} |
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,9 @@ | ||
{ | ||
"parserOptions": { | ||
"ecmaVersion": 8, | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
"semi": 2 | ||
} | ||
} |
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,3 @@ | ||
node_modules/ | ||
artifacts/ | ||
dist/ |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017 Armin Sebastian | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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 @@ | ||
# Search by Image |
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,79 @@ | ||
var path = require('path'); | ||
var exec = require('child_process').exec; | ||
var gulp = require('gulp'); | ||
var gulpSeq = require('gulp-sequence'); | ||
var webpack = require('webpack'); | ||
var cleanCSS = require('gulp-clean-css'); | ||
var htmlmin = require('gulp-htmlmin'); | ||
var svgmin = require('gulp-svgmin'); | ||
var concat = require('gulp-concat'); | ||
var sass = require('gulp-sass'); | ||
var del = require('del'); | ||
|
||
gulp.task('clean', function() { | ||
return del(['dist']); | ||
}); | ||
|
||
gulp.task('js', function(done) { | ||
exec('webpack --display-error-details --colors', function( | ||
err, | ||
stdout, | ||
stderr | ||
) { | ||
console.log(stdout); | ||
console.log(stderr); | ||
done(err); | ||
}); | ||
}); | ||
|
||
gulp.task('html', function() { | ||
return gulp | ||
.src('src/**/*.html', {base: '.'}) | ||
.pipe(htmlmin({collapseWhitespace: true})) | ||
.pipe(gulp.dest('dist')); | ||
}); | ||
|
||
gulp.task('css:options', function() { | ||
return gulp | ||
.src(['src/options/*.scss']) | ||
.pipe( | ||
sass({ | ||
includePaths: [path.resolve(__dirname, 'node_modules')] | ||
}).on('error', sass.logError) | ||
) | ||
.pipe(cleanCSS({level: 2})) | ||
.pipe(concat('style.bundle.css')) | ||
.pipe(gulp.dest('dist/src/options')); | ||
}); | ||
|
||
gulp.task('css:upload', function() { | ||
return gulp | ||
.src(['src/upload/*.scss']) | ||
.pipe( | ||
sass({ | ||
includePaths: [path.resolve(__dirname, 'node_modules')] | ||
}).on('error', sass.logError) | ||
) | ||
.pipe(cleanCSS({level: 2})) | ||
.pipe(concat('style.bundle.css')) | ||
.pipe(gulp.dest('dist/src/upload')); | ||
}); | ||
|
||
gulp.task('css', ['css:options', 'css:upload']); | ||
|
||
gulp.task('svg', function() { | ||
return gulp | ||
.src('src/**/*.svg', {base: '.'}) | ||
.pipe(svgmin()) | ||
.pipe(gulp.dest('dist')); | ||
}); | ||
|
||
gulp.task('copy', function() { | ||
gulp | ||
.src(['src/manifest.json', 'src/_locales*/**/*', 'LICENSE']) | ||
.pipe(gulp.dest('dist')); | ||
}); | ||
|
||
gulp.task('build', gulpSeq('clean', ['js', 'html', 'css', 'svg', 'copy'])); | ||
|
||
gulp.task('default', ['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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"name": "search-by-image", | ||
"version": "0.1.0", | ||
"author": "Armin Sebastian", | ||
"repository": "https://github.com/dessant/search-by-image", | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "gulp build", | ||
"start": "web-ext run --bc --url 'about:addons' -s dist/", | ||
"exec": "yarn run build && yarn run start", | ||
"build-ext": "yarn run build && web-ext build -s dist/ -a artifacts/", | ||
"inspect": "webpack --profile --json > report.json; webpack-bundle-analyzer report.json --mode static && sleep 6 && rm report.{json,html}" | ||
}, | ||
"dependencies": { | ||
"lodash": "^4.17.4", | ||
"spinkit": "^1.2.5", | ||
"uuid": "^3.0.1", | ||
"vue": "^2.3.3", | ||
"vuedraggable": "^2.11.0" | ||
}, | ||
"devDependencies": { | ||
"babel-loader": "^6.4.1", | ||
"babel-plugin-lodash": "^3.2.11", | ||
"babel-preset-env": "^1.3.3", | ||
"babili-webpack-plugin": "^0.0.11", | ||
"commander": "^2.9.0", | ||
"css-loader": "^0.28.1", | ||
"del": "^2.2.2", | ||
"fs-extra": "^2.1.2", | ||
"gulp": "^3.9.1", | ||
"gulp-clean-css": "^3.0.4", | ||
"gulp-concat": "^2.6.1", | ||
"gulp-htmlmin": "^3.0.0", | ||
"gulp-sass": "^3.1.0", | ||
"gulp-sequence": "^0.4.6", | ||
"gulp-svgmin": "^1.2.3", | ||
"lodash-webpack-plugin": "^0.11.2", | ||
"sass-loader": "^6.0.5", | ||
"shortid": "^2.2.8", | ||
"vue-loader": "^12.0.4", | ||
"vue-template-compiler": "^2.3.3", | ||
"web-ext": "^1.8.1", | ||
"webpack": "^2.3.3", | ||
"webpack-bundle-analyzer": "^2.4.0" | ||
} | ||
} |
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,153 @@ | ||
{ | ||
"extensionName": { | ||
"message": "Search by Image", | ||
"description": "Name of the extension." | ||
}, | ||
|
||
"extensionDescription": { | ||
"message": "Reverse image search using the most popular search engines, such as Google, Bing, Yandex, Baidu and TinEye.", | ||
"description": "Description of the extension." | ||
}, | ||
|
||
|
||
"engineName:google:short": { | ||
"message": "Google", | ||
"description": "Short name of the search engine." | ||
}, | ||
|
||
"engineName:google:full": { | ||
"message": "Google Images", | ||
"description": "Full name of the search engine." | ||
}, | ||
|
||
"engineName:bing:short": { | ||
"message": "Bing", | ||
"description": "Short name of the search engine." | ||
}, | ||
|
||
"engineName:bing:full": { | ||
"message": "Bing Images", | ||
"description": "Full name of the search engine." | ||
}, | ||
|
||
"engineName:yandex:short": { | ||
"message": "Yandex", | ||
"description": "Short name of the search engine." | ||
}, | ||
|
||
"engineName:yandex:full": { | ||
"message": "Yandex.Images", | ||
"description": "Full name of the search engine." | ||
}, | ||
|
||
|
||
"engineName:baidu:short": { | ||
"message": "Baidu", | ||
"description": "Short name of the search engine." | ||
}, | ||
|
||
"engineName:baidu:full": { | ||
"message": "Baidu Image Search", | ||
"description": "Full name of the search engine." | ||
}, | ||
|
||
"engineName:tineye:short": { | ||
"message": "TinEye", | ||
"description": "Short name of the search engine." | ||
}, | ||
|
||
"engineName:tineye:full": { | ||
"message": "TinEye Reverse Image Search", | ||
"description": "Full name of the search engine." | ||
}, | ||
|
||
|
||
"contextMenuItemTitle:allEngines:main": { | ||
"message": "Search all engines for image", | ||
"description": "Title of the context menu item." | ||
}, | ||
|
||
"contextMenuItemTitle:allEngines:sub": { | ||
"message": "All engines", | ||
"description": "Title of the context menu item." | ||
}, | ||
|
||
"contextMenuItemTitle:engine:main": { | ||
"message": "Search $ENGINE$ for image", | ||
"description": "Title of the context menu item.", | ||
"placeholders": { | ||
"engine" : { | ||
"content" : "$1", | ||
"example" : "Google" | ||
} | ||
} | ||
}, | ||
|
||
"contextMenuGroupTitle:searchImage:main": { | ||
"message": "Search image on...", | ||
"description": "Title of the context menu group." | ||
}, | ||
|
||
|
||
"optionSectionTitle:engines": { | ||
"message": "Search engines", | ||
"description": "Title of the search engine options section." | ||
}, | ||
|
||
"optionSectionDescription:engines": { | ||
"message": "Toggle search engines and customize their order (drag and drop)", | ||
"description": "Description of the search engine options section." | ||
}, | ||
|
||
"optionSectionTitle:misc": { | ||
"message": "Miscellaneous", | ||
"description": "Title of the miscellaneous options section." | ||
}, | ||
|
||
"optionTitle:searchAllEngines": { | ||
"message": "Search all engines", | ||
"description": "Title of the option." | ||
}, | ||
|
||
"optionValue:searchAllEnginesLocation:menu": { | ||
"message": "from menu", | ||
"description": "Value of the option." | ||
}, | ||
|
||
"optionValue:searchAllEnginesLocation:submenu": { | ||
"message": "from submenu", | ||
"description": "Value of the option." | ||
}, | ||
|
||
"optionTitle:tabInBackgound": { | ||
"message": "Open new tabs in the background", | ||
"description": "Title of the option." | ||
}, | ||
|
||
"optionTitle:localGoogle": { | ||
"message": "Use local Google site", | ||
"description": "Title of the option." | ||
}, | ||
|
||
|
||
"error:InvalidPageUrl": { | ||
"message": "The page URL is not valid. Try searching for the image again.", | ||
"description": "Error message." | ||
}, | ||
|
||
"error:sessionExpired": { | ||
"message": "The session has expired. Try searching for the image again.", | ||
"description": "Error message." | ||
}, | ||
|
||
"error:InvalidImageUrl:dataUri": { | ||
"message": "Searching for data URI images is not supported on $ENGINE$.", | ||
"description": "Error message.", | ||
"placeholders": { | ||
"engine" : { | ||
"content" : "$1", | ||
"example" : "Google Images" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.