This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const functions = require('firebase-functions'); | |
const capabilities = require('browser-capabilities'); | |
const rp = require('request-promise'); | |
const request = require('request'); | |
exports.serve = functions.https.onRequest((req, res) => { | |
const baseUrl = 'https://' + functions.config().firebase.authDomain; | |
// Fetch the hosted polymer.json to read the build configuration | |
return rp({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"hosting": { | |
"public": "build", | |
"ignore": [ | |
"firebase.json", | |
"**/.*", | |
"**/node_modules/**" | |
], | |
"rewrites": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"builds": [ | |
{ | |
"name": "modern-es6", | |
"browserCapabilities": ["es2015"], | |
"preset": "es6-unbundled", | |
"basePath": true | |
}, { | |
"name": "fallback-es5", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Polymer 1.x --> | |
<link rel="import" href="../polymer/polymer.html"> | |
<dom-module id="my-name"> | |
<template> | |
<style> | |
/* Amazing CSS to make my-name shine goes here */ | |
</style> | |
<span>[[firstname]] [[lastname]]</span> | |
<template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Table-valued function to return a list of dates via a recursive query | |
CREATE FUNCTION [dbo].[dyn_dates](@DateFrom datetime, @DateTo datetime) | |
RETURNS @table TABLE (date_day datetime) | |
AS | |
BEGIN | |
WITH dates AS ( | |
SELECT date_day = @DateFrom | |
UNION ALL | |
SELECT DATEADD(dd, 1, dates.date_day) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// take all bower dependencies | |
gulp.src(['bower_components/**/*']) | |
// run all html files through crisper for CSP | |
.pipe($.if('*.html', $.crisper())) | |
// put everything into ./{{dest}}/components/ | |
.pipe(gulp.dest(path.join(destDir, 'components'))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gulp.watch(['dev/**'], $.batch(function (events, cb) { | |
var paths = []; | |
events.on('data', function (evt) { | |
paths.push(evt.path); | |
}).on('end', function () { | |
lr.changed({ | |
body: { | |
files: paths | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dom-module id="request-data-binding1"> | |
<template> | |
<discovery-api-elements | |
name="plus" version="v1"></discovery-api-elements> | |
<google-signin | |
client-id="..." | |
scopes="..." | |
is-authorized="{{isAuthorized}}"></google-signin> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Polymer({ | |
is: 'with-debounce', | |
properties: { | |
property1: { | |
type: String, | |
observer: '_doSomething' | |
}, | |
property2: { | |
type: String, | |
observer: '_doSomething' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dom-element id="demo-hangout-app"> | |
<template> | |
<hangout-app on-ready="readyCallback"> | |
<h1>My Hangout App</h1> | |
</hangout-app> | |
</template> | |
</dom-element> | |
<script> | |
Polymer({ |
NewerOlder