A frontend web compiler for building slim UIs.

Related tags

Cryptography delgada
Overview

Delgada

NPM Version License: MIT

❗️ Warning: This is not production ready software and is in very active development. ❗️

What is Delgada?

Delgada is a small frontend compiler that enables developers to write vanilla HTML, CSS, and JavaScript with similar ergonomics and composability to a modern frontend framework.

Getting Started

To quickly get up and running you can install the project template to scaffold out a new project.

npx degit delgada-ui/template my-delgada-project
cd my-delgada-project
npm install
npm start

Documentation

Read a high level overview of the current syntax and functionality available in Delgada.

License

MIT

Comments
  • Update naming conventions

    Update naming conventions

    Description of changes

    Add some small (opinionated) naming convention changes

    • All web components must be placed in a src/components/islands directory now
    • All web component files must be PascalCase (i.e. CounterButton.js)
    • All static components in the src/pages directory can be optionally PascalCase
    opened by hawkticehurst 0
  • Add `scripts` config to metadata object

    Add `scripts` config to metadata object

    Description of changes

    Add a scripts config to the metadata object. This implements the ability to define scripts that will run on a given page.

    To use this feature, add any scripts to the public directory.

    Then on a given javascript or markdown page, add a scripts config option and pass it an array of the script files that should be run on that page.

    export const metadata = {
      scripts: ['script.js', 'another-script.js']
    }
    

    For each script in the array, a script tag will be added to the final page output in the following format.

    <script type="module" src="/script.js"></script>
    <script type="module" src="/another-script.js"></script>
    
    opened by hawkticehurst 0
  • Use `console.time` instead of `performance`

    Use `console.time` instead of `performance`

    Description of changes

    Experiment with switching out the performance API for console.time in an effort to address a downstream deployment error where Cloudflare Pages seemingly does not load the performance API into its runtime.

    opened by hawkticehurst 0
  • Add static file serving

    Add static file serving

    Description of changes

    Implement static file serving at the root of the build path.

    It means all files placed in the public directory can be referenced like the below (instead of a relative reference):

    <!-- New way -->
    <img src="/my-image.png" alt="Some alt text" />
    
    <!-- Old way -->
    <img src="./public/my-image.png" alt="Some alt text" />
    

    This PR also implements the same sort of logic for web component files, which makes the internal implementation for adding script tags that reference WC files easier.

    opened by hawkticehurst 0
  • Implement optional page templates

    Implement optional page templates

    Description of changes

    Add the ability for a _template.js to not be added to a given pages directory and still build correctly.

    Also, fix a bug where an empty style tag would still be added to the final page output even if no styles were defined.

    opened by hawkticehurst 0
  • Update build output structure

    Update build output structure

    Description of changes

    This PR flattens the file structure of the Delgada compiler build directory output. The goal of this change is to better accommodate how static file routing works on services like Cloudflare Pages.

    As an example, the compiler previously would output a build directory that looked something like this:

    build/
    ├─ about/
    │  ├─ index.css
    │  ├─ index.html
    │  ├─ index.js
    ├─ writing/
    │  ├─ post-1/
    │  │  ├─ index.css
    │  │  ├─ index.html
    │  │  ├─ index.js
    ├─ index.css
    ├─ index.html
    ├─ index.js
    

    This PR will now make the same output look like this:

    build/
    ├─ writing/
    │  ├─ post-1.css
    │  ├─ post-1.html
    │  ├─ post-1.js
    ├─ about.css
    ├─ about.html
    ├─ about.js
    ├─ index.css
    ├─ index.html
    ├─ index.js
    
    opened by hawkticehurst 0
  • Update docs

    Update docs

    Description of changes

    Updates the Delgada overview doc to reflect the new Rust-based compiler and some changes that came along with it.

    Also, updates the repo README.

    opened by hawkticehurst 0
  • Update output build paths

    Update output build paths

    Description of changes

    Update output build paths that will be used in the inserted link/script tags of built CSS and JS files.

    This resolves a bug where the dev server will locate all files from the given root, instead of the current folder where HTML, CSS, and JS files live.

    For example, associated CSS and JS files referenced in an HTML file located at build/about/index.html (where build is the root of the dev server) previously had file paths like so:

    <link href="index.css" rel="stylesheet">
    <script src="index.js" type="module"></script>
    

    This resulted in an error because the dev server would try to locate these files at build/index.css and build/index.js (instead of build/about/index.css and build/about/index.js).

    Now all associated CSS and JS files will have more complete file paths that take into account this behavior, like so:

    <link href="about/index.css" rel="stylesheet">
    <script src="about/index.js" type="module"></script>
    
    opened by hawkticehurst 0
  • Implement component props and template syntax

    Implement component props and template syntax

    Description of changes

    Implements basic component props and template syntax into the Delgada compiler.

    An example of the syntax:

    // File: hello-link.html
    
    <a href="{link}">Hello {name}</a>
    
    // File: index.html
    
    <!--
      import './hello-link.html'
    -->
    
    <hello-link 
      name="world"
      link="https://example.com"
    ></hello-link>
    
    opened by hawkticehurst 0
  • Implement multi-page compilation

    Implement multi-page compilation

    Description of changes

    Implements multi-page compilation into the Delgada compiler using the pages directory convention. If a pages directory is found all sub-directories with an index.html file will be compiled as a distinct page of the website.

    Also implements automatic copying of assets directories into the build folder.

    opened by hawkticehurst 0
  • Change build output file stems from `build` to `index`

    Change build output file stems from `build` to `index`

    Description of changes

    Change build output file names in the following ways so that they better follow the conventions of browser and server conventions (i.e. seeking an index.html file in a given directory).

    • build.html --> index.html
    • build.css --> index.css
    • build.js --> index.js
    opened by hawkticehurst 0
Releases(v0.8.0)
  • v0.8.0(Aug 20, 2022)

    Features

    • update naming conventions: Adds some small (opinionated) naming convention changes.
      • All web components must be placed in a src/components/islands directory
      • All web component files must be PascalCase (i.e. CounterButton.js)
      • All static components in the src/pages directory can be optionally PascalCase
    Source code(tar.gz)
    Source code(zip)
  • v0.7.0(Jun 28, 2022)

  • v0.6.2(Jun 26, 2022)

  • v0.6.1(Jun 24, 2022)

    Bug fixes

    • use console.time: Fix downstream deployment bug where the usage of the performance API was causing Cloudflare Pages builds to crash because it (seemingly) does not load the performance API in its runtime environment
    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Jun 12, 2022)

    Features

    • add markdown support: Implement support for markdown-based pages
    • add static file serving: Implement static file serving where any files in public are mapped to the root URL (/)

    Admin

    • convert to typescript: Convert the Delgada codebase to use TypeScript
    • reorganize project: Restructure the codebase into a series of more focused modules
    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Jun 2, 2022)

    Features

    • optional page templates: Add the ability to not define a _template.js file inside a given pages directory

    Bug fixes

    • empty style tag: Fix bug where an empty style tag was being added to final build output when a page did not define any styles
    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(May 29, 2022)

  • v0.4.0(May 29, 2022)

    Features

    • inlineCSS config: Add a new page metadata option that determines if the given page styles should be built inline or in a CSS file
    • useTemplate config: Add a new page metadata option that determines if the given page should use its local _template.js file
    Source code(tar.gz)
    Source code(zip)
  • v0.3.0(May 28, 2022)

  • v0.2.0(May 28, 2022)

    Starting fresh 🌱

    This release marks a pivot in Delgada as a project.

    The project originally started as a Node-based web compiler (that was later converted to Rust) which had similar ergonomics and syntax to Svelte or Vue.

    In this release, Delgada pivots back to a Node/JavaScript implementation and has been completely rebuilt from the ground up with an entirely new programming model and syntax that leans more heavily on modern web standards and conventions.

    Features

    • file-system router: implement initial file-system based routing
    • page templates: implement initial syntax and functionality for handling flexible page templates
    • html and css tags: add template literal tags for handling HTML and CSS in static components / page styles
    • static components: implement initial syntax and functionality for handling static markup components
    • page and component styles: implement initial functionality and syntax for defining page/component styles
    • web component support: add initial functionality to support WCs as a first-class citizen
    Source code(tar.gz)
    Source code(zip)
Owner
Delgada
A frontend web compiler for building slim UIs.
Delgada
Simple template for building smart contract(Rust) and RPC Client(web3.js) on Solana (WIP) ⛏👷🚧⚠️

Solana BPF Boilerplate Simple template for building smart contract(Rust) and RPC Client(web3.js) on Solana This boilerplate provides the following. Si

ono 6 Jan 30, 2022
nAssets are Nova Finance’s framework for building programmable assets.

nAssets are Nova Finance’s framework for building programmable assets. nAssets can be used to tokenize and store collective forms of value while also instructing assets to yield, exchange or rebalance.

Nova Finance 45 Dec 28, 2021
Rust-native building blocks for the Cardano blockchain ecosystem

Pallas Rust-native building blocks for the Cardano blockchain ecosystem. Introduction Pallas is an expanding collection of modules that re-implements

null 78 Dec 6, 2022
Simple example for building a blockchain in Rust

rust-blockchain-example Simple example for building a blockchain in Rust Start using RUST_LOG=info cargo run This starts the client locally. The block

mario 51 Dec 31, 2022
The Stage 2 building block to reach the dream of DSNs with Bitcoin DeFi

rust-nostr Intro A complete suite of nostr Bitcoin libraries that can be used to develop Decentralized Social Networks (DSN) with integrated Bitcoin f

Raj 82 Jan 2, 2023
Rust starter project for building CLI and libraries, with great CI

Using the starter project: find where bumblefoot is and replace it with the name of your project. $ rg bumblefoot This is a dual library and binary pr

Rusty Ferris Club 19 Nov 19, 2022
A demo app covering building an eBPF load-balancer in Rust

eBPF Rust UDP LoadBalancer Demo This is an example of creating a UDP load-balancer in Rust as an eXpress Data Path (XDP) type eBPF program using the a

Shane Utt 17 Jan 5, 2023
CLI tool for deterministically building and verifying executable against on-chain programs or buffer accounts

Solana Verify CLI A command line tool to build and verify solana programs. Users can ensure that the hash of the on-chain program matches the hash of

Ellipsis Labs 5 Jan 30, 2023
`llm-chain` is a powerful rust crate for building chains in large language models allowing you to summarise text and complete complex tasks

llm-chain ?? llm-chain is a collection of Rust crates designed to help you work with Large Language Models (LLMs) more effectively. Our primary focus

Sobel IO 36 Apr 6, 2023
A minimal template for building smart contracts with Cairo 1.0

Minimal Cairo 1.0 Template Built with auditless/cairo-template A minimal template for building smart contracts with Cairo 1.0 using the Quaireaux proj

Auditless 68 Apr 21, 2023
Kryptokrona SDK in Rust for building decentralized private communication and payment systems.

Kryptokrona Rust SDK Kryptokrona is a decentralized blockchain from the Nordic based on CryptoNote, which forms the basis for Monero, among others. Cr

null 5 May 25, 2023
Zero-Knowledge Assembly language and compiler

zkAsm A Zero-Knowledge circuit assembly language, designed to represent Zero-Knowledge circuits in a compressed format, to be stored on blockchains. I

null 1 Dec 30, 2021
An experimental rust zksnarks compiler with embeeded bellman-bn128 prover

Za! An experimental port of the circom zk-SNARK compiler in Rust with embedded bellman-bn128 prover. I created it as a PoC port of the existing JavaSc

adria0.eth 39 Aug 26, 2022
Compiler development environment.

compiler-dev 北大编译实践教学用编译器开发环境 (Compiler Development Environment). 该仓库的内容将被打包为 Docker 镜像, 所以不建议直接使用该仓库, 具体使用方法见使用方法一节. 使用方法 WIP. 镜像中包含的内容 必要的工具: git, f

PKU Compiler Course 2 Feb 26, 2022
MLIR Rust multi-level compiler framework

MLIR-RS Multi-Level Intermediate Representation framework for Rust. What Modern programming language design is moving towards multi-level lowering to

Conrad Ludgate 16 May 29, 2023
A brand-new multi-scenarios smart contract compiler framework

The Smart Intermediate Representation The Smart Intermediate Representation(short for IR) project is a new compiler framework intended for smart contr

AntChainOpenLabs 62 Jan 2, 2024
Implementation of the Web Cryptography specification in Rust.

[wip] webcrypto Implementation of the Web Cryptography specification in Rust. This crate hopes to ease interoperability between WASM and native target

Divy Srivastava 5 Mar 7, 2022
Web-Scale Blockchain for fast, secure, scalable, decentralized apps and marketplaces.

Building 1. Install rustc, cargo and rustfmt. $ curl https://sh.rustup.rs -sSf | sh $ source $HOME/.cargo/env $ rustup component add rustfmt When buil

Solana Foundation 9.8k Jan 3, 2023
Onlyfans-type web service based on TOR with maximum privacy features.

onionfans Onlyfans-type web service based on TOR with maximum privacy features. Features "Vanishing" single-use feed CDN links Landing page No JavaScr

Dowland Aiello 8 Sep 14, 2022