You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Web Reload is a browser extension and runtime script for browsers which monitors active resources on a web page and reloads them as they change. It's available as web extensions for browsers that support the web extension API, the extension enables injection of the runtime script with the click of a toggle button. The runtime script however will work on all modern browsers as a standalone script w
const styles = { color: lighten(0.2, '#000'), "font-size": modularScale(1), [hiDPI(1.5)]: { "font-size": modularScale(1.25) } } const styles = { color: '#333', "font-size": '1.33em', '@media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min--moz-device-pixel-ratio: 1.5), only screen and (-o-min-device-pixel-ratio: 1.5/1), only screen and (min-resolution: 144dpi), only scr
先日、JavaScriptファイルのロード中に、循環importによる初期化エラーが出て困ったので、図をつくって可視化してみました。 生成物は一番下にあります。 JavaScriptにおける他ファイル参照 ブラウザ上で動くJavaScriptコードを書くうえでは、奇妙な制約が多々あります。 言語自体が奇妙な場合も多いですが(本当に多い!)、他ファイルのimport的な機能は、もともと「ブラウザが通信してソースファイルをダウンロードしないといけない」という都合もあるため、なかなかに無茶な仕組みになっています。 そもそも最近までimport自体が存在しなかったので、適当なライブラリで専用の記法を使うか、トランスパイラで糖衣構文に変換するという手法が用いられています。 2015年のECMAScript2015(ES6)でようやくimportという構文が仕様に入りましたが、今のところどのブラウザも
More than 3.1 million developers read our announcement post of Next.js. More than 110 contributors have submitted patches, examples or improved our documentation. Over 10,000 developers have starred us on GitHub. Today, we are proud to introduce Next 2.0 to the world. What follows is a quick summary of every new feature and improvement we have made. Link to headingReact Made Easy and SimpleNext.js
Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article? 概要 babel-plugin-lodashは、babelのトランスパイル時にlodashのimportを個別の関数のimportに変換してくれるプラグインです。個別の関数のimportにすることで、スクリプトバンドルのサイズを抑えることができます。 変換対象としてlodash以外のパッケージを指定することができ、条件を満たしたパッケージであれば、lodashと同様に必要なオブジェクトだけをバンドルに含めるように変換することができます。これにより、大幅にバンドルのサイズを削減できる場合があります。 実際にサンプルを作って試してみたところ
import assert from 'assert-match' import { loose, arrayOf, type } from 'assert-match/matchers' // or const { loose, arrayOf, type } = assert.matchers const actual = { str: 'abc', obj: { b: 1, c: 2 }, nums: [ 1, 2, 'x' ], }, expected = { str: 'abc', obj: loose({ b: 1 }), nums: arrayOf(type('number')), } assert.deepEqual(actual, expected) // AssertionError: { str: 'abc', obj: { b: 1 }, nums: [ 1, 2,
Slides: http://kcd.im/beginner-asts-slides More on writing a Codemod with Babel: https://youtu.be/Hn6Ca6gzNsw The Abstract Syntax Tree. It sounds a lot worse than it is. It’s actually quite simple and enables some powerful tools. BabelJS uses it to transform your code from ES.Next to ES5. ESLint uses it to lint your code. And with a knowledge of how it works, you can extend these and other tools
Async/await in Node.js opens up a host of powerful design patterns. Tasks that used to take complex libraries or intricate promise chaining can now be done with rudimentary if statements and for loops. I already wrote about these kind of design patterns with co, but async/await makes these patterns accessible in vanilla Node.js, no outside libraries required. Retrying Failed Requests The power of
TL;DR Use scale transforms when animating clips. You can prevent the children from being stretched and skewed during the animation by counter-scaling them. Previously we’ve posted updates on how to create performant parallax effects and infinite scrollers. In this post, we’re going to look over what’s involved if you want performant clip animations. If you want to see a demo, check out the Sample
JavaScriptでメモリ効率を考える その1(シングルフレームバッファ篇)←この記事 JavaScriptでメモリ効率を考える その2(メモリアロケータ篇) 通常のオブジェクト生成 これは一つのあるあるですが、ゲームを製作していると、 「よーし、パパこのタイミングでオブジェクト1万個作っちゃうぞー!」 というふざけたことがままあります。(ないです) それはつまりコードにするとこんな感じ。 function loop(){ // ふふふ、万単位の弾幕でプレイヤーをぶっころそう! let i = 10000; while(i--){ // 弾の位置をいっぱい作るぞー! const vec = new Vector3(i, i, i); } requestAnimationFrame(loop); } class Vector3{ constructor(x, y, z){ this.x =
無料で自動化環境を整備できることで有名な Google Apps Script ですが、以前はブラウザで JavaScript を用いて開発する必要があったため辛い部分もありました(人による)。 現在は公式からローカル開発をするための公式 CLI ツールが提供されているので、静的型付けの恩恵を受けるべく TypeScript を用いて開発できるようにしてみました。 公式の CLI ツール G Suite Developers Blog: Advanced Development Process with Apps Script danthareja/node-google-apps-script: The easiest way to develop Google Apps Script projects インストール自体は Node.js が入っている環境であれば npm install
JavaScript has a quite fascinating history. Brendan Eich created on his own the first language prototype in just ten days. Its implementation was highly influenced by the concepts of first-class functions from Scheme and prototypes from Self. Initially, it was developed under the name Mocha, but released as LiveScript. The latter name didn’t last long either. Java was so hot back in 1995, that Net
100+ different counter apps... ��{ �� ` �� 100+ different js counter apps... 101-hyperapp-v2.x.js �C{ �� 0 e �� import { h, app } from "hyperapp" app({ init: 0, view: state => ( <main> <h1>{state}</h1> <button onclick={state => state - 1}>-</button> <button onclick={state => state + 1}>+</button> </main> ), container: document.body }) 102-react-values.js �l� �� P � �� import { NumberValue } from
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く