-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# EditorConfig helps developers define and maintain consistent | ||
# coding styles between different editors and IDEs | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.hbs] | ||
insert_final_newline = false | ||
|
||
[*.{diff,md}] | ||
trim_trailing_whitespace = false |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
module.exports = { | ||
root: true, | ||
parserOptions: { | ||
ecmaVersion: 2017, | ||
sourceType: 'module' | ||
}, | ||
extends: 'eslint:recommended', | ||
env: { | ||
browser: true | ||
}, | ||
rules: { | ||
"no-inline-comments": "off", | ||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Created by .ignore support plugin (hsz.mobi) | ||
### JetBrains template | ||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | ||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 | ||
|
||
# User-specific stuff: | ||
.idea/**/workspace.xml | ||
.idea/**/tasks.xml | ||
.idea/dictionaries | ||
|
||
# Sensitive or high-churn files: | ||
.idea/**/dataSources/ | ||
.idea/**/dataSources.ids | ||
.idea/**/dataSources.xml | ||
.idea/**/dataSources.local.xml | ||
.idea/**/sqlDataSources.xml | ||
.idea/**/dynamic.xml | ||
.idea/**/uiDesigner.xml | ||
|
||
# Gradle: | ||
.idea/**/gradle.xml | ||
.idea/**/libraries | ||
|
||
# CMake | ||
cmake-build-debug/ | ||
|
||
# Mongo Explorer plugin: | ||
.idea/**/mongoSettings.xml | ||
|
||
## File-based project format: | ||
*.iws | ||
|
||
## Plugin-specific files: | ||
|
||
# IntelliJ | ||
out/ | ||
|
||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
# Cursive Clojure plugin | ||
.idea/replstate.xml | ||
|
||
# Crashlytics plugin (for Android Studio and IntelliJ) | ||
com_crashlytics_export_strings.xml | ||
crashlytics.properties | ||
crashlytics-build.properties | ||
fabric.properties | ||
|
||
node_modules | ||
dist | ||
dou-enhancer.zip |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright 2018 Gennady Dogaev | ||
|
||
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. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
This repo contains source code for DOU Enhancer - Chrome extension that adds WYSIWYG editor and | ||
images preview to dou.ua | ||
|
||
 | ||
|
||
## Building | ||
|
||
Run `gulp build` to build extension or `gulp` to build extension and watch for changes | ||
|
||
## Reference | ||
|
||
[Getting Started: Building a Chrome Extension](https://developer.chrome.com/extensions/getstarted) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
/* eslint-env node */ | ||
|
||
"use strict"; | ||
|
||
const | ||
gulp = require('gulp'), | ||
gulpSequence = require('gulp-sequence'), | ||
babel = require('gulp-babel'), | ||
del = require('del'), | ||
eslint = require('gulp-eslint'), | ||
sass = require('gulp-sass'), | ||
zip = require('gulp-zip'); | ||
|
||
/** | ||
* Check js with eslint | ||
*/ | ||
const eslintSrc = ['**/*.js', '!node_modules/**/*.js', '!dist/**/*.js']; | ||
gulp.task('eslint', () => | ||
gulp.src(eslintSrc) | ||
.pipe(eslint()) | ||
.pipe(eslint.formatEach('compact', process.stderr)) | ||
); | ||
gulp.task('watch-eslint', () => gulp.watch(eslintSrc, ['eslint'])); | ||
|
||
/** | ||
* Clean 'dist' directory | ||
*/ | ||
gulp.task('cleanup', () => del('dist')); | ||
|
||
/** | ||
* Copy vendor files | ||
*/ | ||
const vendorSrc = ['node_modules/**/tinymce/**/*']; | ||
gulp.task('vendor', () => | ||
gulp.src(vendorSrc) | ||
.pipe(gulp.dest('dist/vendor')) | ||
); | ||
gulp.task('watch-vendor', () => gulp.watch(vendorSrc, ['vendor'])); | ||
|
||
/** | ||
* Copy static files like manifest, icons, htmls | ||
*/ | ||
const staticSrc = ['src/static/**/*']; | ||
gulp.task('static', () => | ||
gulp.src(staticSrc) | ||
.pipe(gulp.dest('dist')) | ||
); | ||
gulp.task('watch-static', () => gulp.watch(staticSrc, ['static'])); | ||
|
||
/** | ||
* Build scss files | ||
*/ | ||
const scssSrc = ['src/style/content.scss', 'src/style/popup.scss', 'src/style/tinymce-content.scss']; | ||
gulp.task('scss', () => | ||
gulp.src(scssSrc) | ||
.pipe(sass()) | ||
.pipe(gulp.dest('dist/css')) | ||
); | ||
gulp.task('watch-scss', () => gulp.watch(scssSrc, ['scss'])); | ||
|
||
/** | ||
* Build js files using babel | ||
*/ | ||
const jsSrc = ['src/content.js', 'src/background.js', 'src/popup.js']; | ||
gulp.task('js', () => | ||
gulp.src(jsSrc) | ||
.pipe(babel({ | ||
presets: [ | ||
["@babel/preset-env", { | ||
"targets": { | ||
"browsers": ["last 2 chrome versions"] | ||
} | ||
}] | ||
] | ||
})) | ||
.pipe(gulp.dest('dist/js')) | ||
); | ||
gulp.task('watch-js', () => gulp.watch(jsSrc, ['js'])); | ||
|
||
gulp.task('zip', () => | ||
del('dou-enhancer.zip') | ||
.then(() => gulp.src('dist/**/*') | ||
.pipe(zip('dou-enhancer.zip')) | ||
.pipe(gulp.dest('./') | ||
) | ||
) | ||
); | ||
|
||
/** | ||
* Public tasks to use in command line | ||
*/ | ||
|
||
gulp.task('build', gulpSequence('eslint', 'cleanup', 'vendor', 'static', 'scss', 'js')); | ||
gulp.task('package', gulpSequence('build', 'zip')); | ||
gulp.task('watch', gulpSequence(['watch-eslint', 'watch-vendor', 'watch-static', 'watch-scss', 'watch-js'])); | ||
gulp.task('default', gulpSequence('build', 'watch')); | ||
|