mirror of
https://github.com/responsively-org/responsively-app
synced 2024-11-10 06:44:13 +00:00
Browser extension initial commit
This commit is contained in:
parent
0072e86322
commit
6ac976eeec
10 changed files with 130 additions and 0 deletions
3
browser-extension/.gitignore
vendored
Normal file
3
browser-extension/.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
node_modules
|
||||
yarn.lock
|
||||
dist
|
4
browser-extension/.vscode/settings.json
vendored
Normal file
4
browser-extension/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
}
|
56
browser-extension/package.json
Normal file
56
browser-extension/package.json
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"name": "Responsively-Helper",
|
||||
"version": "0.0.1",
|
||||
"description": "An extension to open current browser page in Responsively app",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"lint": "run-p lint:*",
|
||||
"lint:js": "xo",
|
||||
"lint:css": "stylelint source/**/*.css",
|
||||
"lint-fix": "run-p 'lint:* -- --fix'",
|
||||
"test": "run-s lint:* build",
|
||||
"build": "webpack --mode=production",
|
||||
"start": "webpack --mode=development --watch",
|
||||
"version": "dot-json distribution/manifest.json version $VER",
|
||||
"release:cws": "webstore upload --source=distribution --auto-publish",
|
||||
"release:amo": "web-ext-submit --source-dir distribution",
|
||||
"release": "VER=$(daily-version) run-s build version release:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ianwalter/web-ext-webpack-plugin": "^0.1.0",
|
||||
"chrome-webstore-upload-cli": "^1.2.0",
|
||||
"copy-webpack-plugin": "^5.0.3",
|
||||
"daily-version": "^0.12.0",
|
||||
"dot-json": "^1.1.0",
|
||||
"eslint": "^6.1.0",
|
||||
"eslint-config-xo": "^0.26.0",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"size-plugin": "^1.2.0",
|
||||
"stylelint": "^10.1.0",
|
||||
"stylelint-config-xo": "^0.15.0",
|
||||
"terser-webpack-plugin": "^1.3.0",
|
||||
"web-ext": "^4.2.0",
|
||||
"web-ext-submit": "^4.2.0",
|
||||
"webpack": "^4.36.1",
|
||||
"webpack-cli": "^3.3.6",
|
||||
"xo": "^0.24.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"webext-options-sync": "^0.21.2",
|
||||
"webextension-polyfill": "^0.4.0"
|
||||
},
|
||||
"xo": {
|
||||
"envs": [
|
||||
"browser"
|
||||
],
|
||||
"ignores": [
|
||||
"dist"
|
||||
],
|
||||
"globals": [
|
||||
"browser"
|
||||
]
|
||||
},
|
||||
"stylelint": {
|
||||
"extends": "stylelint-config-xo"
|
||||
}
|
||||
}
|
BIN
browser-extension/public/icon.png
Normal file
BIN
browser-extension/public/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
browser-extension/public/logo_128.png
Normal file
BIN
browser-extension/public/logo_128.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.6 KiB |
BIN
browser-extension/public/logo_16.png
Normal file
BIN
browser-extension/public/logo_16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
BIN
browser-extension/public/logo_48.png
Normal file
BIN
browser-extension/public/logo_48.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.4 KiB |
19
browser-extension/public/manifest.json
Normal file
19
browser-extension/public/manifest.json
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "Responsively Helper",
|
||||
"version": "0.0.1",
|
||||
"description": "An extension to open current browser page in Responsively app",
|
||||
"homepage_url": "http://manojvivek.github.io/responsively-app",
|
||||
"manifest_version": 2,
|
||||
"icons": {
|
||||
"128": "logo_128.png",
|
||||
"48": "logo_48.png",
|
||||
"16": "logo_16.png"
|
||||
},
|
||||
"background": {
|
||||
"persistent": false,
|
||||
"scripts": [
|
||||
"browser-polyfill.min.js",
|
||||
"background.js"
|
||||
]
|
||||
}
|
||||
}
|
2
browser-extension/src/background.js
Normal file
2
browser-extension/src/background.js
Normal file
|
@ -0,0 +1,2 @@
|
|||
// eslint-disable-next-line import/no-unassigned-import
|
||||
console.log('Responsively Extension');
|
46
browser-extension/webpack.config.js
Normal file
46
browser-extension/webpack.config.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
const path = require('path');
|
||||
const SizePlugin = require('size-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const WebExtWebpackPlugin = require('@ianwalter/web-ext-webpack-plugin');
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
devtool: 'source-map',
|
||||
stats: 'errors-only',
|
||||
entry: {
|
||||
background: './src/background',
|
||||
options: './src/options'
|
||||
},
|
||||
output: {
|
||||
path: path.join(__dirname, 'dist'),
|
||||
filename: '[name].js'
|
||||
},
|
||||
plugins: [
|
||||
new SizePlugin(),
|
||||
new CopyWebpackPlugin([
|
||||
{
|
||||
from: '**/*',
|
||||
context: 'public',
|
||||
ignore: ['*.js']
|
||||
},
|
||||
{
|
||||
from: 'node_modules/webextension-polyfill/dist/browser-polyfill.min.js'
|
||||
}
|
||||
]),
|
||||
new WebExtWebpackPlugin({ sourceDir: path.join(__dirname, 'dist'), verbose: true }),
|
||||
],
|
||||
optimization: {
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
mangle: false,
|
||||
compress: false,
|
||||
output: {
|
||||
beautify: true,
|
||||
indent_level: 2 // eslint-disable-line camelcase
|
||||
}
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
};
|
Loading…
Reference in a new issue