Skip to content

Commit ba38e16

Browse files
committed
General improvements
- Add Changelog file - Add env-template file - Improved README for building steps - Moved static files to src - Remove dist from repo - Udate version - Themed scrollbars
1 parent c1d8116 commit ba38e16

16 files changed

+6525
-1711
lines changed

.babelrc

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
{
2-
"presets":[ "react", "env" ],
3-
"plugins": ["transform-object-rest-spread"],
2+
"presets": ["@babel/preset-env", "@babel/react"],
3+
"plugins": [
4+
"@babel/plugin-proposal-class-properties",
5+
"@babel/plugin-syntax-export-default-from",
6+
"transform-export-extensions",
7+
"@babel/plugin-proposal-object-rest-spread"
8+
],
49
"compact" : false,
510
"env": {
611
"production": {
712
"plugins": [ "transform-react-remove-prop-types" ]
13+
814
}
915
}
1016
}

.env-template

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
WEB_EXT_API_KEY=""
2+
WEB_EXT_API_SECRET=""

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ jspm_packages
107107
.web-ext-artifacts
108108
key.pem
109109

110-
.env
110+
.env*
111+
!.env-template
111112

112113
web-ext-artifacts
114+
dist

CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
9+
## [1.2.1] - 2019-02-18
10+
### Added
11+
- web-ext as a dependency
12+
- changelog file
13+
14+
### Changed
15+
- Webpack now cleans dist dir
16+
- upgrade dependencies
17+
- simplier build and start command

README.md

+11-5
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,24 @@ Inspired by [Reddit Submission Finder](https://addons.mozilla.org/en-US/firefox/
1616

1717
# Running and building from source
1818

19-
Currently using webpack and web-ext to build the addon, if you want to try it yourself run
19+
Currently using webpack and web-ext to build the addon, if you want to try it yourself follow this steps:
20+
21+
To install the project dependencies run:
2022

2123
`yarn install` or `npm install`
2224

23-
To start the develpment process run:
25+
To start webpack on dev mode run:
26+
27+
`yarn start` or `npm run start`
2428

25-
`yarn start:dev` or `npm run start:dev`
29+
To run the addon on firefox run:
2630

27-
`yarn start:fox` or `npm run start:fox`
31+
`web-ext run -s dist --firefox=PATH_TO_YOUR_FIREFOX_BIN --pre-install`
2832

29-
To build the addon run:
33+
To build the production webpack bundle run:
3034

3135
`yarn build:prod` or `npm run build:prod`
3236

37+
To build the addon zip run:
38+
3339
`yarn build:fox` or `npm run build:fox`

dist/search.js

-8
This file was deleted.

dist/search.map

-1
This file was deleted.

package.json

+20-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,19 @@
11
{
22
"name": "busca.afk",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "busca.afk extension to search links on reddit or more",
55
"main": "js/script.js",
66
"scripts": {
7-
"start:fox":
8-
"web-ext run -s dist --browser-console -p default --firefox=/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin",
7+
"start":
8+
"web-ext run -s dist --browser-console --firefox=firefox-developer-edition --verbose --pre-install",
9+
"start:macos":
10+
"web-ext run -s dist --browser-console -p default --firefox=/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin --pre-install",
911
"test": "eslint src/**/*.js && web-ext lint -s dist",
12+
"build": "webpack --watch --progress",
1013
"build:chrome":
1114
"crx pack dist -o build/ligo.crx && web-ext build -s dist -a build",
12-
"build:fox": "web-ext build -s dist --overwrite-dest",
13-
"sign:fox": "env-cmd ./.env web-ext sign",
14-
"build:dev": "webpack --watch --progress",
15+
"build:fox": "webpack -p && web-ext build -s dist --overwrite-dest",
16+
"sign:fox": "env-cmd ./.env web-ext -s dist sign",
1517
"build:prod": "webpack -p",
1618
"precommit": "lint-staged"
1719
},
@@ -42,16 +44,21 @@
4244
"prettier": "1.9.1"
4345
},
4446
"dependencies": {
47+
"@babel/cli": "^7.2.3",
48+
"@babel/core": "^7.3.3",
49+
"@babel/plugin-proposal-class-properties": "^7.3.3",
50+
"@babel/plugin-proposal-object-rest-spread": "^7.3.2",
51+
"@babel/plugin-syntax-export-default-from": "^7.2.0",
52+
"@babel/preset-env": "^7.3.1",
53+
"@babel/preset-react": "^7.0.0",
4554
"archiver": "^2.1.0",
4655
"autoprefixer": "^7.2.1",
47-
"babel-cli": "^6.26.0",
48-
"babel-core": "^6.26.0",
49-
"babel-loader": "^7.1.1",
50-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
51-
"babel-preset-env": "^1.6.1",
52-
"babel-preset-react": "^6.24.1",
56+
"babel-loader": "^8.0.5",
57+
"babel-plugin-transform-export-extensions": "^6.22.0",
5358
"choo": "^6.6.0",
5459
"choo-devtools": "^2.2.0",
60+
"clean-webpack-plugin": "^1.0.1",
61+
"copy-webpack-plugin": "^4.6.0",
5562
"css-loader": "^0.28.4",
5663
"dotenv": "^4.0.0",
5764
"env-cmd": "^7.0.0",
@@ -60,6 +67,7 @@
6067
"precss": "^2.0.0",
6168
"style-loader": "^0.19.0",
6269
"urijs": "^1.19.0",
70+
"web-ext": "^2.9.3",
6371
"webpack": "^3.4.1"
6472
},
6573
"peerDependencies": {}

src/containers/app/style.css

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
* {
22
box-sizing: border-box;
33
font-family: var(--font);
4+
scrollbar-color: var(--medium-gray) var(--black);
5+
scrollbar-width: thin;
46
}
57

68
html,
File renamed without changes.
File renamed without changes.
File renamed without changes.

dist/manifest.json renamed to src/public/manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"name": "busca.afk",
1010
"description": "busca.afk extension",
1111
"author": "Mario Carballo Zama",
12-
"version": "1.2.0",
12+
"version": "1.2.1",
1313
"icons": {
1414
"16": "img/icon.svg",
1515
"19": "img/icon.svg",
File renamed without changes.

webpack.config.js

+12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
const path = require('path');
2+
const CleanWebpackPlugin = require('clean-webpack-plugin');
3+
const CopyWebpackPlugin = require('copy-webpack-plugin');
24

35
module.exports = {
46
devtool: 'cheap-module-source-map',
@@ -37,4 +39,14 @@ module.exports = {
3739
},
3840
],
3941
},
42+
43+
plugins: [
44+
new CleanWebpackPlugin('dist'),
45+
new CopyWebpackPlugin([
46+
{
47+
from: path.resolve(__dirname, './src/public'),
48+
to: path.resolve(__dirname, 'dist'),
49+
},
50+
]),
51+
],
4052
};

0 commit comments

Comments
 (0)