Skip to content

Commit

Permalink
Merge pull request kas-elvirov#46 from artem-solovev/gloc-45
Browse files Browse the repository at this point in the history
kas-elvirov#45 Moving to TypeScript
  • Loading branch information
kas-elvirov authored Mar 24, 2019
2 parents a780634 + 97dd2fa commit 478e386
Show file tree
Hide file tree
Showing 19 changed files with 4,864 additions and 3,173 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ jspm_packages
# Builds
/dist/
*.zip

# Token
.token
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"tslint.configFile": "./tslint.json"
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ___
# Browser extension GLOC ( [Chrome](https://chrome.google.com/webstore/detail/gloc-github-counter-lines/kaodcnpebhdbpaeeemkiobcokcnegdki?utm_source=chrome-ntp-icon), [Opera]() )
![Chrome](screens/browsers/chrome.png)
![Opera](screens/browsers/opera.png)
## **Current version: 7.6.17** ( 2018, 20 may )
## **Current version: 7.7.0** ( 2019, 24 march )
## **Initial release 2.0.1** ( 2017, 12 february )


Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"short_name": "__MSG_shortName__",
"author": "__MSG_author__",
"description": "__MSG_description__",
"version": "7.6.17",
"version": "7.7.0",

"browser_action": {
"default_icon": "img/icon128.png",
Expand Down
6,797 changes: 4,101 additions & 2,696 deletions package-lock.json

Large diffs are not rendered by default.

27 changes: 17 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gloc",
"version": "7.6.17",
"version": "7.7.0",
"description": "Extension counts the number of lines of code in GitHub pages.",
"main": "index.js",
"scripts": {
Expand All @@ -23,20 +23,27 @@
},
"homepage": "https://github.com/artem-solovev/gloc#readme",
"devDependencies": {
"babel-core": "^6.26.0",
"babel-eslint": "^8.2.2",
"babel-loader": "^7.1.4",
"babel-preset-env": "^1.6.1",
"copy-webpack-plugin": "^4.5.1",
"@types/chrome": "0.0.81",
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.6",
"babel-loader": "^7.1.5",
"babel-preset-env": "^1.7.0",
"copy-webpack-plugin": "^4.6.0",
"eslint": "^4.19.1",
"eslint-config-google": "^0.9.1",
"file-loader": "^1.1.11",
"grunt": "^1.0.2",
"grunt-cli": "^1.2.0",
"grunt": "^1.0.4",
"grunt-cli": "^1.3.2",
"grunt-contrib-compress": "^1.4.3",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"url-loader": "^1.0.1",
"webpack": "^2.2.0-rc.0"
"ts-loader": "^5.3.3",
"tslint": "^5.14.0",
"typescript": "^3.3.4000",
"typescript-tslint-plugin": "^0.3.1",
"uglifyjs-webpack-plugin": "^2.1.2",
"url-loader": "^1.1.2",
"webpack": "^4.29.0",
"webpack-cli": "^3.3.0"
}
}
10 changes: 0 additions & 10 deletions src/background.js

This file was deleted.

12 changes: 12 additions & 0 deletions src/background.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
chrome.runtime.onInstalled.addListener((details) => {
if (details.reason === 'install') {
chrome.runtime.openOptionsPage();
} else if (details.reason === 'update') {
const thisVersion = chrome.runtime.getManifest().version;
const newFeatures = '\n - small fixes \n - moved into TypeScript';
const statusMsg = `GitHub Gloc updated from ${details.previousVersion} to ${thisVersion}.
${newFeatures}`;

console.info(statusMsg);
}
});
30 changes: 30 additions & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export const APP_NAME = 'GitHub Gloc';
export const APP_CLASSNAME = 'github-gloc';
export const TRIES_DEFAULT = 5;
export const REPO_CLASS = 'repository-meta-content';

export const MESSAGE_IDS = {
POPUP: [
'addToken',
'github',
'shortName',
'indexWorksOnly',
'indexCountsFrom',
'indexProjectPage',
'indexUserPage',
'indexSearchPage',
'indexTrandingPage',
'indexEtc',
'attentionPlease',
'translateOurApp',
],
OPTIONS: [
'optionsTitle',
'github',
'shortName',
'optionsUlDescription',
'optionsAccess',
'optionsLimits',
'optionsCreateToken',
],
};
Loading

0 comments on commit 478e386

Please sign in to comment.