This file contains hidden or 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
/* | |
// Ideia de uso: | |
const fmongo = FunctionalMongo('mongodb://0.0.0.0:27017/yhub') | |
.collect('User') | |
.byId({ id }) | |
*/ | |
import { curry, objOf } from 'ramda' |
This file contains hidden or 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
// | |
// Create a resource file, for example: 'resources/user.js'. | |
// Create your resource-actions and export your custom resource | |
// | |
// File: resources/user.js | |
import { resources } from 'x-resources' | |
const baseURL = 'https://api.github.com' |
This file contains hidden or 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 axios from "axios" | |
axios.defaults.headers.put['Content-Type'] = 'application/json'; | |
axios.defaults.headers.post['Content-Type'] = 'application/json'; | |
const getDefaultActions = () => ({ | |
get: { method: 'GET' }, | |
save: { method: 'POST' }, | |
query: { method: 'GET' }, | |
update: { method: 'PUT' }, | |
remove: { method: 'DELETE' }, |
This file contains hidden or 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
// He said that importing like this: | |
import Comp1 from './dummy/Comp1' | |
// is faster than importing like this: | |
import { Comp1 } from './dummy' |
This file contains hidden or 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 | |
path = require('path'), | |
config = require('../config'), | |
cssUtils = require('./css-utils'), | |
glob = require('glob'), | |
webpack = require('webpack'), | |
merge = require('webpack-merge'), | |
baseWebpackConfig = require('./webpack.base.conf'), | |
ExtractTextPlugin = require('extract-text-webpack-plugin'), | |
HtmlWebpackPlugin = require('html-webpack-plugin'), |
This file contains hidden or 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="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="format-detection" content="telephone=no"> | |
<meta name="msapplication-tap-highlight" content="no"> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=5, minimum-scale=1, width=device-width"> | |
<title>Quasar App</title> | |
<link rel="icon" href="statics/quasar-logo.png" type="image/x-icon"> |
This file contains hidden or 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 | |
// ... | |
SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin'), | |
loadMinified = require('./load-minified'), | |
// ... | |
module.exports = merge(baseWebpackConfig, { | |
// ... | |
plugins: [ | |
// ... |
This file contains hidden or 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() { | |
'use strict'; | |
// Check to make sure service workers are supported in the current browser, | |
// and that the current page is accessed from a secure origin. Using a | |
// service worker from an insecure origin will trigger JS console errors. | |
const isLocalhost = Boolean(window.location.hostname === 'localhost' || | |
// [::1] is the IPv6 localhost address. | |
window.location.hostname === '[::1]' || | |
// 127.0.0.1/8 is considered localhost for IPv4. |
This file contains hidden or 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 fs = require('fs') | |
var UglifyJS = require('uglify-es') | |
module.exports = function(filePath) { | |
var code = fs.readFileSync(filePath, 'utf-8') | |
var result = UglifyJS.minify(code) | |
if (result.error) return '' | |
return result.code | |
} |
This file contains hidden or 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 | |
// ... | |
PreloadWebpackPlugin = require('preload-webpack-plugin'), | |
// ... | |
module.exports = merge(baseWebpackConfig, { | |
// ... | |
plugins: [ | |
// ... | |
new PreloadWebpackPlugin({ |
NewerOlder