Skip to content

Commit 6d7ef3f

Browse files
committed
Merge branch 'add-gulp'
2 parents 56c8a09 + e60cd1d commit 6d7ef3f

File tree

13 files changed

+10176
-107
lines changed

13 files changed

+10176
-107
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ language: node_js
44

55
node_js:
66
- '10'
7-
8-
before_script:
9-
- export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start
7+
cache: npm
8+
services:
9+
- xvfb
1010

1111
install:
1212
- npm install

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ npm run develop
3838

3939
Toggle DevTools:
4040

41-
* OSX: <kbd>Cmd</kbd> <kbd>Alt</kbd> <kbd>I</kbd> or <kbd>F12</kbd>
41+
* macOS: <kbd>Cmd</kbd> <kbd>Alt</kbd> <kbd>I</kbd> or <kbd>F12</kbd>
4242
* Linux: <kbd>Ctrl</kbd> <kbd>Shift</kbd> <kbd>I</kbd> or <kbd>F12</kbd>
4343
* Windows: <kbd>Ctrl</kbd> <kbd>Shift</kbd> <kbd>I</kbd> or <kbd>F12</kbd>
4444

@@ -48,12 +48,8 @@ Modify [electron-builder.yml](./electron-builder.yml) to edit package info.
4848

4949
For a full list of options see: https://github.com/electron-userland/electron-builder/wiki/Options.
5050

51-
Create a package for OSX, Windows and Linux
52-
```
53-
npm run pack
54-
```
51+
Create a package for macOS, Windows or Linux using one of the following commands:
5552

56-
Or target a specific platform
5753
```
5854
npm run pack:mac
5955
npm run pack:win

app/renderer/index.html

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,10 @@
22
<html>
33
<head>
44
<title>My App</title>
5+
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline'">
56
</head>
67
<body>
78
<div id="app"></div>
89
<script src="./app.js" data-container="#app"></script>
9-
<script>
10-
if (process.env.BROWSER_SYNC_CLIENT_URL) {
11-
const current = document.currentScript;
12-
const script = document.createElement('script');
13-
script.src = process.env.BROWSER_SYNC_CLIENT_URL;
14-
script.async = true;
15-
current.parentNode.insertBefore(script, current);
16-
}
17-
</script>
1810
</body>
1911
</html>

gulpfile.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const { task, series } = require('gulp');
2+
const rimraf = require('rimraf');
3+
4+
const scripts = require('./tasks/scripts');
5+
const assets = require('./tasks/assets');
6+
const watch = require('./tasks/watch');
7+
const dist = require('./tasks/distribution');
8+
9+
task('clean', function(done) {
10+
rimraf('./build', done);
11+
});
12+
task('build', series('clean', assets.copyHtml, scripts.build));
13+
task('develop', series('clean', watch.start));
14+
task('pack-win', series('build', dist.packWin));
15+
task('pack-linux', series('build', dist.packLinux));
16+
task('pack-mac', series('build', dist.packMac));

0 commit comments

Comments
 (0)