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
//import { File, WorkFlowContext, Plugin } from "fuse-box"; | |
import { File, WorkFlowContext, Plugin } from "../../fuse-box/.dev"; | |
import { ChildProcess } from "child_process"; | |
import { resolve } from "path"; | |
import { readFile } from "fs"; | |
import { tmpName } from "tmp"; | |
import * as spawn from "cross-spawn"; | |
import { findAllDependencies } from "find-elm-dependencies" | |
const tmp = () => |
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
import { FuseBox, PostCSSPlugin, LESSPlugin, CSSPlugin, QuantumPlugin, Sparky } from "fuse-box"; | |
import { ElmPlugin } from "fuse-box-elm-plugin"; | |
import * as path from "path"; | |
const homeDir = "app"; | |
const destDir = "dist"; | |
Sparky.task("build", () => { | |
console.log(path.resolve(__dirname, "node_modules", "normalize.css")); | |
const fuse = FuseBox.init({ |
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 { FuseBox, PostCSSPlugin, LESSPlugin, CSSPlugin, Sparky } = require("fuse-box"); | |
const { ElmPlugin } = require("./ElmPluginClass"); | |
const path = require("path"); | |
const homeDir = "app"; | |
const destDir = "dist"; | |
Sparky.task("build", () => { | |
const fuse = FuseBox.init({ | |
homeDir, |
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
// This works | |
Sparky.task("copy:assets", () => Sparky.watch("./assets/**/*", { base: homeDir }).dest("./dist")); | |
Sparky.task("copy:vendor", () => Sparky.watch("./vendor/**/*", { base: homeDir }).dest("./dist")); | |
Sparky.task("copy:index", () => Sparky.watch("./index.html", { base: homeDir }).dest("./dist")); | |
Sparky.task("copy", ["copy:assets", "copy:vendor", "copy:index"], () => {}); | |
// But this doesn't | |
Sparky.task("copy", () => { | |
return Promise.all([ | |
Sparky.watch("./assets/**/*", { base: homeDir }).dest("./dist"), |
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 { FuseBox, WebIndexPlugin, LESSPlugin, CSSPlugin } = require("fuse-box"); | |
const path = require("path"); | |
const fuse = FuseBox.init({ | |
homeDir: "app", | |
output: "dist/$name.js", | |
plugins: [ | |
WebIndexPlugin(), | |
[ | |
LESSPlugin({ paths: [ path.resolve(__dirname, "node_modules") ] }), |
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
--- FuseBox 2.5.0-beta.1 --- | |
→Typescript config: /tsconfig.json | |
Acorn error: Unexpected token (16:70) | |
File: /Users/dave/Projects/Couloir/ctp/title-sss/app/js/app.ts | |
14 } | |
15 else { | |
16 throw new Error(`Error loading config.json: ${ + res.status + } (${ + res.statusText + })`); | |
17 } | |
18 }) |
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
exampleGet :: ∀ e. Aff (ajax :: AJAX | e) (Array String) | |
exampleGet = do | |
res <- get "some end point" | |
pure [""] | |
{- | |
No type class instance was found for | |
Network.HTTP.Affjax.Response.Respondable t2 |
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
function clickjackElement(doc: Document, element: HTMLElement, pollingInterval: number = 500) { | |
const clickjacker = document.createElement("span"); | |
clickjacker.style.position = "absolute"; | |
clickjacker.style.cursor = "pointer"; | |
clickjacker.style.backgroundColor = "red"; | |
clickjacker.style.opacity = "0.5"; | |
element.parentNode.insertBefore(clickjacker, element.nextSibling); |
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
effect module Component.Licensing.WebSocket where { command = MyCmd, subscription = MySub } exposing | |
( send | |
, listen | |
, listenWithDisconnect | |
, keepAlive | |
) | |
{-| Web sockets make it cheaper to talk to your servers. | |
Connecting to a server takes some time, so with web sockets, you make that |
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
function clickjackElement(doc: Document, element: HTMLElement, pollingInterval: number = 500) { | |
const clickjacker = document.createElement("div"); | |
clickjacker.style.position = "absolute"; | |
const scrollParent = getScrollParent(element, false); | |
const positionElement = () => { | |
const elementRect = element.getBoundingClientRect(); | |
const shadowRootRect = (<any>doc).host.getBoundingClientRect(); |