Skip to content

Instantly share code, notes, and snippets.

//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 = () =>
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({
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 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"),
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") ] }),
--- 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 })
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
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);
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
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();