🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs
bundle
✨ .d.ts
bundle + type-checking
🧐 Source maps
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
// From http://robots.thoughtbot.com/an-introduction-to-webgl | |
var app = function () { | |
var canvas = document.getElementById('canvas'), | |
gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl'); | |
// Create elements on the page which contain your shaders. | |
// I like using script tags with a different type attribute, like: | |
// `<script id="vertex-shader" type="x-vertex/x-shader">` | |
// You could also just put the shaders inline, but I hate escaping line breaks. | |
var shaders = { |
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
#![allow(non_snake_case)] | |
#![allow(dead_code)] | |
// port of: | |
// Creating and Printing a TypeScript AST | |
// https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API#creating-and-printing-a-typescript-ast | |
extern crate typescript_ts as ts; | |
extern crate chakracore; | |
use chakracore::context::ContextGuard; |
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
-- | |
-- Move this file to your neovim lua runtime path ie. ~/.config/nvim/lua/au.lua | |
-- | |
local cmd = vim.api.nvim_command | |
local function autocmd(this, event, spec) | |
local is_table = type(spec) == 'table' | |
local pattern = is_table and spec[1] or '*' | |
local action = is_table and spec[2] or spec | |
if type(action) == 'function' then |
- Add
autocomplete="off"
onto<form>
element; - Add hidden
<input>
withautocomplete="false"
as a first children element of the form.
<form autocomplete="off" method="post" action="">
<input autocomplete="false" name="hidden" type="text" style="display:none;">
...
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
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/ | |
# GitLab uses docker in the background, so we need to specify the | |
# image versions. This is useful because we're freely to use | |
# multiple node versions to work with it. They come from the docker | |
# repo. | |
# Uses NodeJS V 9.4.0 | |
image: node:9.4.0 | |
# And to cache them as well. |
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
const transformer = options => ({ | |
apply: 'post', | |
transform({ code, isBuild }) { | |
if (!isBuild) return code | |
return code.replace('</body>', `<script defer type="module"> | |
const KEY = 'ga:user' | |
const UID = (localStorage[KEY] = localStorage[KEY] || Math.random() + '.' + Math.random()) | |
const onError = err => console.error('[vite vitals] ', err) | |
const onDebug = (label, payload) => console.log(label, payload) |
yarn create vite
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
{ | |
// Config for IDE to reload | |
"compileOnSave": true, | |
"exclude": [ | |
// Specifies an array of filenames or patterns that should be skipped when resolving include. | |
// Default: | |
// ["node_modules", "bower_components", "jspm_packages"], plus the value of outDir if one is specified. | |
"**/*.spec.ts", | |
"node_modules" | |
], |