-
Notifications
You must be signed in to change notification settings - Fork 26
/
config.js
121 lines (119 loc) · 4.06 KB
/
config.js
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
115
116
117
118
119
120
121
var execSync = require('child_process').execSync,
appVersion = null;
try {
appVersion = execSync('git describe --tags').toString().replace(/(\r\n|\n|\r)/gm, '');
} catch(e) {
console.log('Warning: Can\'t run "git describe" for determine app version');
}
module.exports = {
// App name ID is used for iron-localstorage element and Service Worker cache ID
appNameId: 'polymer-starter-kit-plus',
// App theme is directory name in app/themes
appTheme: 'default-theme',
// App version from git is used for deploy task and frontend
appVersion: appVersion,
// Autoprefixer
autoprefixer: {
// https://github.com/postcss/autoprefixer#browsers
browsers: [
// Setup for WebComponents Browser Support
// https://github.com/WebComponents/webcomponentsjs#browser-support
'Explorer >= 10',
'ExplorerMobile >= 10',
'Firefox >= 30',
'Chrome >= 34',
'Safari >= 7',
'Opera >= 23',
'iOS >= 7',
'Android >= 4.4',
'BlackBerry >= 10'
]
},
// BrowserSync
browserSync: {
browser: 'default', // or ["google chrome", "firefox"]
https: false, // Enable https for localhost development.
notify: false, // The small pop-over notifications in the browser.
port: process.env.PORT || 3000, // Environment variable $PORT is for Cloud9 IDE
ui: {
port: 3001
}
},
// Deploy task
deploy: {
// Choose hosting
hosting: 'gae', // or firebase, gcs, ssh
// Firebase
// Firebase requires Firebase Command Line Tools to be installed and configured.
// For info on tool: https://www.firebase.com/docs/hosting/command-line-tool.html
firebase: {
env: {
development: 'polymer-starter-kit-plus-dev', // subdomain
staging: 'polymer-starter-kit-plus-staging',
production: 'polymer-starter-kit-plus'
}
},
// Google App Engine
// GAE requires Google Cloud SDK to be installed and configured.
// For info on SDK: https://cloud.google.com/sdk/
gae: {
env: {
development: 'polymer-starter-kit-plus-dev', // project ID
staging: 'polymer-starter-kit-plus-staging',
production: 'polymer-starter-kit-plus'
},
// Promote the deployed version to receive all traffic.
// https://cloud.google.com/sdk/gcloud/reference/preview/app/deploy
promote: true
},
// Google Cloud Storage
// GCS requires Google Cloud SDK with gsutil to be installed and configured.
// For info on SDK: https://cloud.google.com/sdk/
gcs: {
acl: { // https://cloud.google.com/storage/docs/access-control
development: 'public-read',
staging: 'public-read',
production: 'public-read'
},
env: { // https://cloud.google.com/storage/docs/reference-uris
development: 'dev.example.com', // bucket
staging: 'staging.example.com',
production: 'www.example.com'
},
cacheTTL: {
development: '0',
staging: '0',
production: '315360000', // 10 years
productionNoCache: '300' // 5 min for files without revision hash
}
},
// Any Linux hosting with SSH
// Install your SSH public key ~/.ssh/id_rsa.pub onto a remote Linux
// Example command: ssh-copy-id [email protected]
ssh: {
env: {
development: '/path/to/remote-dir-dev', // remote dir must not exist
staging: '/path/to/remote-dir-staging',
production: '/path/to/remote-dir'
},
host: 'server.example.com',
port: 22,
user: 'root'
}
},
// PageSpeed Insights
// Please feel free to use the `nokey` option to try out PageSpeed
// Insights as part of your build process. For more frequent use,
// we recommend registering for your own API key. For more info:
// https://developers.google.com/speed/docs/insights/v1/getting_started
pageSpeed: {
key: '', // need uncomment in task
nokey: true,
site: 'https://polymer-starter-kit-plus.firebaseapp.com',
strategy: 'mobile' // or desktop
},
// Service Worker
serviceWorker: {
cacheDisabled: false
}
};