This repository was archived by the owner on May 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathgulpfile.js
More file actions
114 lines (100 loc) · 4.27 KB
/
gulpfile.js
File metadata and controls
114 lines (100 loc) · 4.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
'use strict'
/****
* startDev ('default', 'browserify', 'nodemon', 'browser-sync', 'watch-less', 'watch-js')
* Runs nodemon, browsersync and watch tasks for .less and .js.
* Also runs browserify for the frontend js to be piped through.
*/
require('./gulpTasks/startDev')
/*****
* NOTE: we dont manually build the sqlite bindings any more as we now use the electron-rebuild package
* which is triggered in the npm task. We also use the default sqlite3 install as it now uses FTS5.
*/
/****
* buildSqlite3LibBindings ('buildSqlite')
* https://github.com/mapbox/node-sqlite3
*
* Build sqlite3 lib bindings against the source that comes with the npm sqlite3 lib, or
* against an externally installed sqlite, as at the moment, the binary downloads
* that come with a regular 'npm install sqlite3' dont include fts5 support.
*
* Install What is required by your OS for node-gyp before running this task.
* https://github.com/nodejs/node-gyp
*
*/
// require('./gulpTasks/buildSqlite3LibBindings')
/****
* buildSqlite3LibBindingsForRandomDates ('buildSqliteForRandomDates')
*
* This task is for building sqlite3 lib for running the generateRandomDatesForSavedPages. On
* Windows and Linux, when gulp runs these tasks, it uses node rather than electron to run them, and
* since sqlite3 is installed for electron and not node, it doesn't work. So we uninstall the electron
* sqlite3 and install regular node sqlite3 (from our repo so it has the FTS5) and then we can run the gulp
* task to generate the random dates.
*
*/
// require('./gulpTasks/buildSqlite3LibBindingsForRandomDates')
/****
* selfsignElectronForDev ('selfsign')
* Self-sign the electron app for development on OSX so that we dont constantly have to click on
* the allow incomming connections alert that pops up each time we run electron.
* (note: may still need to confirm the accept incomming connections dialog once after this).
* (OSX only).
*/
require('./gulpTasks/selfsignElectronForDev')
/****
* generateRandomDatesForSavedPages ('randomDates')
* Sets random dates to the pages saved in pagesdb.
* This is helpful to check that the dateFilter on the frontend and in the extensions is
* working properly.
* (Only working on OSX atm).
*/
require('./gulpTasks/generateRandomDatesForSavedPages')
/****
* resetCheckedForExpiryForBookmarkExpiryChecks ('resetCheckedForExpiry')
* Set checkedForExpiry to false for each row in pagesdb. This is handy for
* when tweaking bookmarkExpiry or checking that bookmarkExpiry is working.
* (Only working on OSX atm).
*/
require('./gulpTasks/resetCheckedForExpiryForBookmarkExpiryChecks')
/****
* serverModuleSizes ('serverModuleSizes')
* Uses ndu https://github.com/groupon/ndu
* ndu is a tool for analyzing the size of dependencies in a node.js
* application. It's similar to disc, but for server-side dependencies instead of
* client-side depedencies.
* (Windows not yet supported)
* (Only set to run on OSX atm).
*/
require('./gulpTasks/serverModuleSizes')
/****
* analyzeFrontendModuleSize ('frontendModuleSize')
* Uses disc https://github.com/hughsk/disc
* Disc is a tool for analyzing the module tree of browserify project bundles.
* It's especially handy for catching large and/or duplicate modules which might be
* either bloating up your bundle or slowing down the build process.
* (Only set to run on OSX atm).
*/
require('./gulpTasks/analyzeFrontendModuleSize')
/****
* alterGotPackageJson ('alterGotPackageJson')
* This is for in case ever want to switch to got version 6. Would need to
* use babel to transform it on frontend.
* https://gist.github.com/Darkle/d44ac3ae27b46e17fe96fd52322c48f4
*/
// require('./gulpTasks/alterGotPackageJson')
/****
* nosourcemaps.js ('nosourcemaps')
* Remove all the sourcemap files from the frontend js bundles
* and the frontend css built from the less files.
* Run browserify for the frontend source, omiting souremap files.
* Run less for the frontend less files, omiting souremap files.
* Strip any console calls from the frontend js bundles.
*/
require('./gulpTasks/build/nosourcemaps')
/****
* build.js ('packageosx', 'packagewin64', 'packagewin32', 'packagelinux64', 'packagelinux32')
* Build the app for distribution as an executable.
*/
require('./gulpTasks/build/buildPackages')
require('./gulpTasks/bumpVersion')
require('./gulpTasks/build/createWindowsInstaller')