Minimal steps required to create a custom elemenet in Polymer 1.0, without any aid from tools like Yeoman and Gulp.
I have used the Quick tour of Polymer as a reference.
- Install Node.
Minimal steps required to create a custom elemenet in Polymer 1.0, without any aid from tools like Yeoman and Gulp.
I have used the Quick tour of Polymer as a reference.
| import mongoose from 'mongoose'; | |
| let schema = new mongoose.Schema({ | |
| email: { type: String, required: true, unique: true }, | |
| password: { type: String, required: true } | |
| }); | |
| schema.statics.findOrCreate = async (conditions, opt_attr) => { | |
| let document = await User.findOne(conditions); |
Inspiration: https://twitter.com/samccone/status/722826060161617923
Modern JavaScript engines support an increasing intersection of ES2015 (and above) features which simply don't require transpilation in order to be successfully parsed and executed. This project lays out a proposal for a lightweight Autoprefixer-style tool that takes as input a target set of browsers (A) which check against a source of data for supported ES features (Kangax ES6 tables (B) (see https://github.com/kangax/compat-table/blob/gh-pages/data-es6.js) and generate a mapping to Babel transforms for features requiring transpilation that are not supported (C) or not fully supported (e.g behind flags or staged but not flipped on to default).
To avoid the introduction of even more configuration files, this tool could piggyback off of some config we could
| export const CACHE_STALE_AT_HEADER = 'x-edge-cache-stale-at'; | |
| export const CACHE_STATUS_HEADER = 'x-edge-cache-status'; | |
| export const CACHE_CONTROL_HEADER = 'Cache-Control'; | |
| export const CLIENT_CACHE_CONTROL_HEADER = 'x-client-cache-control'; | |
| export const ORIGIN_CACHE_CONTROL_HEADER = 'x-edge-origin-cache-control'; | |
| enum CacheStatus { | |
| HIT = 'HIT', | |
| MISS = 'MISS', | |
| REVALIDATING = 'REVALIDATING', |