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 2012 Akseli Palén. | |
* Created 2012-07-15. | |
* Licensed under the MIT license. | |
* | |
* <license> | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files | |
* (the "Software"), to deal in the Software without restriction, | |
* including without limitation the rights to use, copy, modify, merge, |
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 autoprefixer = require('autoprefixer'); | |
module.exports = function(gulp, config, plugins) { | |
return function() { | |
gulp.src(config.sourceAssets + 'scss/*.scss') | |
.pipe(plugins.plumber()) | |
.pipe(plugins.sourcemaps.init()) | |
.pipe(plugins.sass({ includePaths : config.sassPaths })) | |
// .pipe(plugins.combineMq({ beautify: false })) | |
.pipe(plugins.postcss([ autoprefixer(config.autoprefixer) ])) |
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
class Economic extends Printer { | |
constructor(name) { | |
super(name); | |
} | |
} |
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
let printers = [ | |
new AllInOne('HP 1'), | |
new AllInOne('HP 2'), | |
new Economic('HP 3'), | |
]; |
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
function printerFunctionalities(printers) { | |
console.log('Impressoras digitalizando: '); | |
for (let printer of printers) { | |
if (printer.scan) { | |
console.log(`${printer.name} is ${printer.scan()}`); | |
} | |
} | |
} |
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
import Swal from 'sweetalert2'; | |
export class HttpClient { | |
get(url) { | |
return fetch(url, { | |
headers: { | |
Accept: 'application/json' | |
} | |
}).then(response => { | |
if (response.ok) { |
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
import Swal from 'sweetalert2'; | |
export default class ErrorHandler { | |
static handle(response) { | |
if (response.status == 401) { | |
Swal({ | |
title: 'Não autorizado', | |
type: 'error' | |
}); | |
} else if (response.status == 404) { |
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
import ErrorHandler from './error-handler'; | |
export default class HttpClient { | |
get(url) { | |
return fetch(url, { | |
headers: { | |
Accept: 'application/json' | |
} | |
}).then(response => { | |
if (response.ok) { |
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
class Rectangle { | |
constructor(width, height) { | |
this._width = width; | |
this._height = height; | |
} | |
get width() { | |
return this._width; | |
} |
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
class Circle { | |
constructor(radius) { | |
this._radius = radius; | |
} | |
get radius() { | |
return this._radius; | |
} | |
set radius(value) { |
OlderNewer