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
# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file | |
# except in compliance with the License. A copy of the License is located at | |
# | |
# http://aws.amazon.com/apache2.0/ | |
# | |
# or in the "license" file accompanying this file. This file is distributed on an "AS IS" | |
# BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | |
# License for the specific language governing permissions and limitations under the License. |
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
image: maven:3.3.9 | |
pipelines: | |
default: | |
- step: | |
script: | |
- mvn -version |
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
var gulp = require('gulp'); | |
var uglify = require('gulp-uglify'); | |
var livereload = require('gulp-livereload'); | |
var concat = require('gulp-concat'); | |
var minifyCss = require('gulp-minify-css'); | |
var autoprefixer = require('gulp-autoprefixer'); | |
var plumber = require('gulp-plumber'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var sass = require('gulp-sass'); | |
var babel = require('gulp-babel'); |
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
//referencia do prompt | |
var bannerInstall; | |
if ('serviceWorker' in navigator){ | |
navigator.serviceWorker | |
.register('sw.js') | |
.then(function () { | |
console.log('Service worker está registrado!'); | |
}); | |
} |
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
self.addEventListener('install', function (event) { | |
console.log('[Service Worker] Instalando Service Worker...', event); | |
}); | |
self.addEventListener('activate', function (event) { | |
console.log('[Service Worker] Ativando Service Worker ...', event); | |
return self.clients.claim(); | |
}); | |
self.addEventListener('fetch', function (event) { |
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
if ('serviceWorker' in navigator){ | |
navigator.serviceWorker | |
.register('sw.js') | |
.then(function () { | |
console.log('Service worker está registrado!'); | |
}); | |
} |
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
<!doctype html> | |
<html lang="pt-br"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" | |
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<title>Meu Primeiro PWA</title> | |
<link rel="shortcut icon" href="src/images/icons/favicon.png"> | |
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700" rel="stylesheet"> | |
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> |
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
{ | |
"name": "Meu Primeiro PWA", | |
"short_name": "MP PWA", | |
"icons": [ | |
{ | |
"src": "src/images/icons/app-icon-48x48.png", | |
"type": "image/png", | |
"sizes": "48x48" | |
}, | |
{ |
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
<!DOCTYPE html> | |
<html lang="pt-br"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Upload</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
<style> | |
.top-buffer { margin-top:20px; } | |
</style> | |
</head> |
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
document.getElementsByClassName("btn")[0].addEventListener("click", function () { | |
var arquivos = document.getElementsByClassName("arquivos")[0].files; | |
var dados = new FormData(); | |
var url = new XMLHttpRequest(); | |
for (var i = 0; i < arquivos.length; i++) { | |
dados.append("arquivo[]", arquivos[i]); | |
} |
NewerOlder