By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| 'use strict'; | |
| const fs = require('fs'); | |
| const glob = require('glob').sync; | |
| const mkdirp = require('mkdirp').sync; | |
| const sass = require('node-sass'); | |
| const path = require('path'); | |
| const streams = require('stream'); | |
| const runner = {}; |
| /** | |
| * Used for inter-object communication. | |
| * (Semi-)drop in replacement for Rik Schennink's Observer. | |
| * | |
| * Implementation differences: | |
| * - ES6 | |
| * - The use of WeakMaps | |
| * - inform() and conceal() don't return a boolean indicating success. | |
| * - Subscription fn's are called with seperate arguments, instead of one data parameter. This is backwards compatible. | |
| * |
| # set the base image to Debian | |
| # https://hub.docker.com/_/debian/ | |
| FROM debian:latest | |
| # replace shell with bash so we can source files | |
| RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
| # update the repository sources list | |
| # and install dependencies | |
| RUN apt-get update \ |
| // UPDATE: In 2023, you should probably stop using this! The narrow version of Safari that | |
| // does not support `nomodule` is probably not being used anywhere. The code below is left | |
| // for posterity. | |
| /** | |
| * Safari 10.1 supports modules, but does not support the `nomodule` attribute - it will | |
| * load <script nomodule> anyway. This snippet solve this problem, but only for script | |
| * tags that load external code, e.g.: <script nomodule src="nomodule.js"></script> | |
| * | |
| * Again: this will **not** prevent inline script, e.g.: |
| #!/bin/bash | |
| # Launch inside a create-react-app project after building the production build. | |
| # Require `jq`. | |
| diff \ | |
| <(find src -type f \( -name '*.js' -o -name '*.jsx' -o -name '*.css' \) | sort) \ | |
| <(cat build/**/*.map | jq --raw-output '.sources | join("\n")' \ | |
| | grep -v '\.\./' | grep -E '\.(js|jsx|css)$' \ | |
| | sed "s#^#src/#" | sort | uniq) \ |
| "use strict"; | |
| // Generate webpack config with CLI service | |
| const webpackConfig = require("@vue/cli-service/webpack.config.js"); | |
| // Create express app | |
| const express = require("express"); | |
| const app = express(); | |
| // Configure webpack as middleware |
use git diff to generate file list
git diff --name-only master
add ext filter
| import { Ref, reactive, onMounted, watch, toRefs } from '@vue/composition-api' | |
| // const { data, error } = useSWR('/api/user', fetcher) | |
| export type fetcherFn<Data> = (...args: any) => Data | Promise<Data> | |
| function isDocumentVisible (): boolean { | |
| if ( | |
| typeof document !== 'undefined' && | |
| typeof document.visibilityState !== 'undefined' | |
| ) { |