In the root of your project, add .gitlab-ci.yml
with the configuration below.
image: node:latest
stages:
If you use Storybook with Next.js and have components using next/link
you'll have to mock next/router
the same you would for testing with Jest or others. Simply create a file with the mock router as shown below and import it in your Storybook config.
This is based on some information from an issue on Next.js:
@mixin for-size($range) { | |
$phone-upper-boundary: 600px; | |
$tablet-portrait-upper-boundary: 900px; | |
$tablet-landscape-upper-boundary: 1200px; | |
$desktop-upper-boundary: 1800px; | |
@if $range == phone-only { | |
@media (max-width: #{$phone-upper-boundary - 1}) { @content; } | |
} @else if $range == tablet-portrait-up { | |
@media (min-width: $phone-upper-boundary) { @content; } |
import React from 'react'; | |
const MIN_SCALE = 1; | |
const MAX_SCALE = 4; | |
const SETTLE_RANGE = 0.001; | |
const ADDITIONAL_LIMIT = 0.2; | |
const DOUBLE_TAP_THRESHOLD = 300; | |
const ANIMATION_SPEED = 0.04; | |
const RESET_ANIMATION_SPEED = 0.08; | |
const INITIAL_X = 0; |
git rm -r --cached . | |
git add . | |
git commit -m "fixing .gitignore" |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Here is a list of scopes to use in Sublime Text 2 snippets - | |
ActionScript: source.actionscript.2 | |
AppleScript: source.applescript | |
ASP: source.asp | |
Batch FIle: source.dosbatch | |
C#: source.cs | |
C++: source.c++ | |
Clojure: source.clojure | |
CoffeeScript: source.coffee |
license: gpl-3.0 |
AZHU.storage = { | |
save : function(key, jsonData, expirationMin){ | |
if (!Modernizr.localstorage){return false;} | |
var expirationMS = expirationMin * 60 * 1000; | |
var record = {value: JSON.stringify(jsonData), timestamp: new Date().getTime() + expirationMS} | |
localStorage.setItem(key, JSON.stringify(record)); | |
return jsonData; | |
}, | |
load : function(key){ | |
if (!Modernizr.localstorage){return false;} |