Building block for hybrid Deno/Node scaffolding tools

Overview

Skaffe—building block for hybrid scaffolding tools

This library provides a simple way to copy around files that were shipped with your hybrid Deno/Node scaffolding CLI.

You can easily try this library from Deno.

deno run -A https://raw.githubusercontent.com/KnorpelSenf/skaffe/main/example.ts

This will demo the scaffolding by copying the example file itself into the current working directory.

Deno Example

Use the following code.

import { scaffold } from "https://deno.land/x/[email protected]/mod.ts";

const thisFile = import.meta.url;
const targetDirectory = Deno.cwd(); // using a dir will infer the file name

// Will copy this very source file into the working directory
await scaffold(thisFile, targetDirectory);

Node Example

Run

npm i skaffe

and use the following code.

const { scaffold } = require("skaffe");

const thisFile = __filename;
const targetDirectory = process.cwd(); // using a dir will infer the file name

// Will copy this very source file into the working directory
scaffold(thisFile, targetDirectory);

Why?

Deno modules can be on a remote host. They can also be local files. Node modules are always local.

Writing files works differently on Deno and Node, too.

When you are writing a scaffolding tool that ships a number of config files and source files, you can use skaffe to simply copy these files into the user's working directory. The library will download the file from a remote host if you're running a Deno script from remote, and it will copy over the files if you're running a local Deno script or if you're using Node.

As a result, you can focus on building an intuitive scaffolding tool for Deno and Node, and let skaffe do the nasty part.

What's in a Name?

The word skaffe is Norwegian and means provide. It also looks similar to the prefix of scaffolding.

You might also like...

Authenticate users into a web2 database to build a hybrid web2+web3 creator platform!

Creator Platform This project demonstrates how you can connect your web2 backend and integrate it with web3 using sign in with ethereum. Tools: React

Dec 16, 2022

This is a simple boilerplate for a Deno website, deployed with Deno Deploy.

Simple Deno Website Boilerplate This is a simple website boilerplate built using Deno and deployed using Deno Deploy. Demo at simple-deno-website-boil

Dec 3, 2022

TypeSafe MongoDB Atlas Data API SDK for Deno & Deno Deploy

Atlas SDK atlas_sdk is a TypeSafe MongoDB Atlas Data API SDK for Deno & Deno Deploy Links Docs Import Replace LATEST_VERSION with current latest versi

Dec 26, 2022

Deno bindings for yoga, using Deno FFI.

deno_yoga Deno bindings for yoga, using Deno FFI. Usage flags: --allow-ffi: Requires ffi access to "yogacore.dll", "libyogacore.so", "libyogacore.dyli

Feb 11, 2022

🛣️ A tiny and fast http request router designed for use with deno and deno deploy

Rutt Rutt is a tiny http router designed for use with deno and deno deploy. It is written in about 200 lines of code and is pretty fast, using an exte

Dec 10, 2022

A small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity

A small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity

Wren Wren is a small, but powerful HTTP library for Deno & Deno Deploy, built for convenience and simplicity. convenient aliases for HTTP responses au

Dec 12, 2022

deno-ja (Deno Japanese community) showcase

Showcase Deno本家よりも気軽に作ったものを公開できるようなShowcaseです。 スクリーンショットの撮影方法 短めのidを決めていただいて、下記のようにスクリプトを実行してください。 deno task screenshot [url] [id] ※エラーが出る場合は、下記を実行してみ

Oct 28, 2022

A command-line tool to manage Deno scripts installed via deno install

🏞️ nublar nublar is a command-line tool to manage your scripts installed via deno install. 🛳️ Installation deno install --allow-read --allow-write -

Dec 26, 2022

Cross platform shell tools for Deno inspired by zx.

dax Note: This is very early stages. Just started working on it. Cross platform shell tools for Deno inspired by zx. Differences: No globals or global

Dec 31, 2022
Comments
  • Infer file from source

    Infer file from source

    Allows people to pass a directory as the target path. Will then infer the file name from the source path, and join it with the given target directory.

    opened by KnorpelSenf 0
Owner
KnorpelSenf
KnorpelSenf
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
Opinionated collection of TypeScript definitions and utilities for Deno and Deno Deploy. With complete types for Deno/NPM/TS config files, constructed from official JSON schemas.

Schemas Note: You can also import any type from the default module, ./mod.ts deno.json import { type DenoJson } from "https://deno.land/x/[email protected]

deno911 2 Oct 12, 2022
A block preview that directly displays the block fields, including tabs.

Kirby Block Preview Fields This plugin for Kirby 3 displays the block fields directly in the block preview, including tabs. Inspired by the Kirby Fiel

JUNO 8 May 10, 2023
A NPM package powered by Yeoman that generates a scaffolding boilerplate for back-end workflow with Node.js.

generator-noderplate Generate Node.js starter files with just one command! We have deployed a npm package that will generate a boilerplate for nodejs

Samarjeet 3 Jan 24, 2022
Frontend, contracts, and merkle tree generator for use in quickly scaffolding ERC20 token airdrops.

Merkle Airdrop Starter Quickly bootstrap an ERC20 token airdrop to a Merkle tree of recipients. Steps: Generate Merkle tree of recipients by following

Anish Agnihotri 675 Dec 22, 2022
Tip Tweet is a hybrid dApp that provides a simple way to tip a tweet using Ethereum. Authors can claim their tips using their Twitter account. You only need the tweet URL to tip. 🚀 😎

Tip Tweet Table of Contents About Folder Structure Contract Deveopment Starting the App Usage Contributing About Tip Tweet is hybrid dApp that allows

Dias Junior 23 Nov 15, 2022
Smooth mobile touch slider for Mobile WebApp, HTML5 App, Hybrid App

iSlider iSlider is a lightweight, high-performant, no library dependencies cross-platform slide controller. It can help handling most sliding effects,

Baidu BEFE 1.7k Nov 25, 2022
Selectize is the hybrid of a textbox and select box

Selectize is the hybrid of a textbox and select box. It's jQuery based, and it has autocomplete and native-feeling keyboard navigation; useful for tagging, contact lists, etc.

null 12.9k Jan 5, 2023
Cross platform UI controls for progressive web and hybrid apps (plain JS, jQuery, Angular and React)

Mobiscroll What is Mobiscroll? Mobiscroll is a UI library for progressive webapps and hybrid development. Created with a lot of attention to usability

Mobiscroll 1.5k Dec 31, 2022