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

Commit

Permalink
Add analytics support, fix packaging by reverting electron-packager
Browse files Browse the repository at this point in the history
  • Loading branch information
ide committed Mar 29, 2016
1 parent 32d24ce commit 14d10e9
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 52 deletions.
3 changes: 2 additions & 1 deletion gulp/package-tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ async function packageAppAsync(signed) {
ignore: [/^\/src(\/|$)/, /^\/\.babelrc$/],
overwrite: true,
prune: true,
'osx-sign': signed ? { identity: CODE_SIGNING_IDENTITY } : null,
// 'osx-sign': signed ? { identity: CODE_SIGNING_IDENTITY } : null,
sign: signed ? CODE_SIGNING_IDENTITY : null,
});

logger.info(`Packaged ${signed ? 'signed' : 'unsigned'} app at ${appPath}`);
Expand Down
126 changes: 81 additions & 45 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
},
"homepage": "https://github.com/exponentjs/xde#readme",
"dependencies": {
"@exponent/electron-cookies": "^1.0.0",
"@exponent/json-file": "^4.0.0",
"autobind-decorator": "^1.3.3",
"babel-polyfill": "^6.7.4",
Expand All @@ -29,9 +30,9 @@
"git-info-async": "^1.1.0",
"lodash": "^4.6.1",
"radium": "^0.17.0",
"react": "^0.14.7",
"react": "^0.14.8",
"react-bootstrap": "^0.28.4",
"react-dom": "^0.14.7",
"react-dom": "^0.14.8",
"react-loading-indicator": "^0.2.0",
"xdl": "0.0.10"
},
Expand All @@ -43,10 +44,10 @@
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-1": "^6.5.0",
"electron-packager": "^6.0.0",
"electron-packager": "^5.2.1",
"electron-prebuilt": "^0.37.2",
"eslint": "^2.5.3",
"eslint-config-exponent": "^1.0.7",
"eslint-config-exponent": "^1.0.8",
"eslint-plugin-react": "^4.2.3",
"gulp": "gulpjs/gulp#4.0",
"gulp-babel": "^6.1.2",
Expand Down
2 changes: 0 additions & 2 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import 'babel-polyfill';

import electron from 'electron';
import os from 'os';
import path from 'path';
import process from 'process';

import Menu from './remote/Menu';

Expand Down
17 changes: 17 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@
<title>Exponent XDE</title>
<link rel="stylesheet" href="./bootstrap-3.3.5.min.css" />
<link rel="stylesheet" href="./xde.css" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

(() => {
'use strict';
let ElectronCookies = require('@exponent/electron-cookies');
ElectronCookies.enable({ origin: 'https://xde.exp.host' });

ga('create', 'UA-53647600-6', 'auto');
ga('set', 'location', 'https://xde.exp.host/');
ga('set', 'checkProtocolTask', null);
ga('send', 'pageview');
})();
</script>
</head>
<body>
<div id="app">
Expand Down

0 comments on commit 14d10e9

Please sign in to comment.