Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Commit

Permalink
Update deps, switch to single package.json, switch to yarn, remove le…
Browse files Browse the repository at this point in the history
…gacy config migration
  • Loading branch information
jwheare committed Sep 28, 2017
1 parent 50bc059 commit 2e1745a
Show file tree
Hide file tree
Showing 11 changed files with 3,211 additions and 78 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
node_modules
**/node_modules
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
app/node_modules
dist
npm-debug.log*
.DS_Store
Expand Down
4 changes: 4 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.7.1
ignore: {}
patch: {}
22 changes: 12 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
dist: node_modules
npm run dist
PKG := $(shell command -v yarn 2> /dev/null || command -v npm 2> /dev/null)

node_modules: package.json
${PKG} install

node_modules: package.json app/package.json
npm install
dist: node_modules
${PKG} run dist

clean:
rm -Rf ./dist

distclean: clean
rm -Rf ./node_modules ./app/node_modules ./.nvm
rm -Rf ./node_modules ./.nvm

dev: node_modules
npm run app
${PKG} run app

test: node_modules
npm run test
${PKG} run test

mac: node_modules
npm run mac
${PKG} run mac

win: node_modules
npm run win
${PKG} run win

ci: test dist

encryptenv:
travis encrypt-file .travis.env --add

.PHONY: dist clean distclean dev test ci
.PHONY: dist clean distclean dev test mac win ci encryptenv
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ documentation](http://electron.atom.io/docs/v0.37.8/).

### Build Requirements
* Node JS version 5.3 or higher
* NPM
* yarn (recommended upstream) or NPM (works fine)

On Linux, you also need the `icnsutils`, `graphicsmagick`, and
`xz-utils` packages.

### Running

Run `npm install` in the root of the repository. `make dev` will run the
app quickly (without icons).
Run `make dev` in the root of the repository to run the app quickly (without icons).

To build a full version, `make dist`.

Expand Down
3 changes: 0 additions & 3 deletions app/.snyk

This file was deleted.

17 changes: 1 addition & 16 deletions app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ const dialog = electron.dialog;
const path = require('path');
const FS = require('fs');

const ConfigStore = require('configstore');
const Config = require('electron-config');
const ContextMenu = require('./context_menu');
const Menu = require('./menu');
const Tray = electron.Tray;

const _ = require('lodash');
const is = require('electron-is');
const mime = require('mime-types');
const unusedFilename = require('unused-filename');
require('electron-dl')();
const log = require('electron-log');
Expand All @@ -45,19 +43,6 @@ function setupConfig () {
'userScriptPath': path.join(app.getPath('userData'), 'user-script.js')
};

// Migrate from old config, remove this in time
let oldConfig = new ConfigStore(app.getName());
try {
Object.keys(defaults).concat('x', 'y').forEach(key => {
if (oldConfig.has(key)) {
defaults[key] = oldConfig.get(key);
}
});
FS.unlinkSync(oldConfig.path);
} catch (exc) {
// noop
}

return new Config({
defaults: defaults
});
Expand Down Expand Up @@ -489,7 +474,7 @@ function handleProtocolUrls () {
var isHandler = (
app.isDefaultProtocolClient('irc') &&
app.isDefaultProtocolClient('ircs')
);
);

if (!isHandler && !config.get('neverPromptIrcUrls')) {
dialog.showMessageBox({
Expand Down
33 changes: 0 additions & 33 deletions app/package.json

This file was deleted.

2 changes: 1 addition & 1 deletion electron-builder.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"mac": {
"category": "public.app-category.productivity",
"target": [
"dmg",
"zip"
Expand All @@ -18,7 +19,6 @@
"icon": null
},
"appId": "com.irccloud.desktop",
"category": "public.app-category.productivity",
"protocols": [
{
"name": "IRC server URL",
Expand Down
42 changes: 32 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,43 @@
{
"name": "irccloud-desktop-build",
"name": "irccloud-desktop",
"productName": "IRCCloud",
"description": "IRCCloud Desktop Client",
"author": {
"name": "IRCCloud Ltd.",
"email": "team@irccloud.com",
"url": "https://www.irccloud.com"
},
"repository": "https://github.com/irccloud/irccloud-desktop",
"license": "Apache-2.0",
"version": "0.4.0",
"main": "app/main.js",
"scripts": {
"postinstall": "install-app-deps",
"postinstall": "electron-builder install-app-deps",
"pack": "build",
"dist": "build",
"test": "eslint .",
"app": "electron ./app",
"app": "electron .",
"mas": "build --mac mas",
"mac": "build --mac dir",
"dmg": "build --mac dmg",
"win": "build --win nsis-web --ia32 --x64"
"win": "build --win nsis-web --ia32 --x64",
"test": "eslint . && snyk test"
},
"devDependencies": {
"electron-builder": "^13.9.0",
"electron": "^1.4.15",
"eslint": "^3.15.0",
"devtron": "^1.4.0"
"devtron": "^1.4.0",
"electron": "^1.7.8",
"electron-builder": "^19.31.1",
"eslint": "^4.7.2",
"snyk": "^1.41.1"
},
"dependencies": {}
"dependencies": {
"electron-config": "^1.0.0",
"electron-dl": "^1.10.0",
"electron-is": "^2.4.0",
"electron-log": "^2.2.9",
"electron-spell-check-provider": "^1.1.0",
"electron-updater": "^2.10.1",
"lodash": "^4.17.4",
"open": "0.0.5",
"unused-filename": "^1.0.0"
}
}
Loading

0 comments on commit 2e1745a

Please sign in to comment.