⚡⚙️ Fast prototyping with template engines and integrated frontend tools. Vituum is a small wrapper around Vite.

Overview

Logo

npm package node compatility

⚙️ Vituum

Still in early development.

Fast prototyping with template engines and integrated frontend tools

  • Vite integrated
  • 🚀️ Fast prototyping
  • 🛠️ Integrated tools
  • 💡 Template engines
  • 📦 Modular structure
  • ✉️ Email templates

Vituum is a small wrapper around Vite which includes predefined config and set of plugins.
It's a mix of words Vite (French word for "quick") and Tuum (Estonian word for "core").

  • Primary focus is on backend integration, but can be used for anything.
  • Modified build command vituum build is used, which supports building of template engine files with extname such as .twig or .pug

Learn more about Vituum on Features page.

🪄 Get started

mkdir my-project && cd my-project
npm i vituum --save-dev

Config

Each Vituum project needs to have config via vite.config.js
Read the Docs to learn more about configuration

import { defineConfig } from 'vituum'

export default defineConfig({
  // vituum config here
})

You can try Vituum online on Stackblitz or view all examples on GitHub

📌 Future plans

  • refactoring and rewrite to TypeScript
  • tests written via Vitest

Requirements

Licence

MIT

Comments
  • Get error ERR_UNSUPPORTED_ESM_URL_SCHEME with command build

    Get error ERR_UNSUPPORTED_ESM_URL_SCHEME with command build

    Hello! Windows: 11 Node: 16.20 Npm: 8.19 In console i see error: Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:'

    bug 
    opened by Solunsky 10
  • headless and build commands are inverted

    headless and build commands are inverted

    I was trying to build some templates with the command vituum build , but every time, the views folder from the output directory was been deleted. It was until I tried the command vituum headless that finally the views folder wasn't deleted.

    bug 
    opened by alexandrpunk 5
  • Exclude Files (JSON) from being processed by Vituum

    Exclude Files (JSON) from being processed by Vituum

    We have a couple of (example data) JSON files within our project (/data/categories.json etc.), which are requested and processed from the front-end. Those should not be processed by the template engines and only be served by the server when called from the front-end.

    Right now those get processed by vituum and lead to errors like this one:

    Error: ENOENT: no such file or directory, open '/abcdef/src/views/data/categories.json.html'
        at Object.openSync (node:fs:599:3)
        at Object.readFileSync (node:fs:467:35)
        at file:///abcdef/node_modules/vituum/plugins/middleware.js:48:142 
    

    What's the approach here? Is there a setting to exclude certain files? Should I change the project structure somehow?

    Cheers

    opened by superflausch 5
  • How to change the path of pug pages when building a project?

    How to change the path of pug pages when building a project?

    Hi!

    I have configured vituum. At the moment, when the project is being built (npm run build), the pug pages from src/views/ are going to dist/views/ How can I change the path during assembly so that pug pages are assembled in dist/ (without the views folder, that is, in the dist folder itself)

    My repository with my configuration: vituum-gulp-template

    opened by TiroZit 5
  • Server HMR error messages only flashing

    Server HMR error messages only flashing

    After altering our existing Vite project to Vituum the HMR error message overlay only flashes briefly in the browser before disappearing.

    Restarting vite will render the error message once, after a browser refresh or a refresh because of a file change the error message will only flash briefly again.

    Any ideas what could cause this behaviour?

    Cheers

    opened by superflausch 3
  • [vituum + twig] project build directory

    [vituum + twig] project build directory

    When building the project, the files are collected in the public folder, while the build.outDir parameter is ignored.

    vite.config.js:

    import { defineConfig } from 'vituum';
    import twig from '@vituum/twig';
    
    export default defineConfig({
      integrations: [twig()],
      templates: {
        format: 'twig',
      },
      build: {
        outDir: '../dist',
      },
    });
    
    

    The build.rollupOptions.output option also doesn't work.

    vite.config.js:

    // ...
    export default defineConfig({
      // ...
      build: {
        // ...
        rollupOptions: {
          output: {
            entryFileNames: `assets/js/[name].js`,
            chunkFileNames: `assets/js/[name].js`,
            assetFileNames: `assets/[name].[ext]`
          }
        }
      }
    });
    
    

    The test was carried out both on a local Linux machine and in a stackblitz environment.

    opened by alexsoin 0
  • Question : advice on how to integrate with storybook

    Question : advice on how to integrate with storybook

    Hi,

    Thank you for this great tool! It makes it super easy to use and configure handlebars and nunjucks templates in my vite projects. I was wondering if you had any advice regarding integration with storybook's vite builder. I have use webpack and handlebars-loader webpack plugin https://github.com/pcardune/handlebars-loader to load .hbs templates inside component.stories.js storybook files in the past... I don't have a lot of experience with Vite so I am not sure how to go about it, since when I try to import an .hbs template inside a js file I get the following error:

    Internal server error: Failed to parse source for import analysis because the content contains invalid JS syntax. You may need to install appropriate plugins to handle the .hbs file format, or if it's an asset, add "**/*.hbs" toassetsIncludein your configuration.

    any advice on how to get it working would be greatly appreciated.

    thank you

    opened by offbeat-dev 0
  • Allow handlebars partials to be defined in a directory and used globally without relative paths

    Allow handlebars partials to be defined in a directory and used globally without relative paths

    Is there any chance Vituum could provide a functionality similar to what handlebars-loader does when using its partialDirs option in order to use any partial without the need of specifying it's relative path? Not sure what would be the best approach to get it working.

    Thank you in advance for any info you can provide regarding this question.

    enhancement 
    opened by offbeat-dev 0
Releases(0.0.38)
Owner
Vituum
⚡⚙️ Fast prototyping with template engines and integrated frontend tools. Vituum is a small wrapper around Vite.
Vituum
A wrapper around IPFS for speeding up the loading of web3 frontend applications.

ipfs-wrapper A wrapper around ipfs-core for speeding up the loading of web3 frontend applications. Used on Blogchain. Requirements NodeJS v14.5.0 or h

Capsule Social 15 Sep 14, 2022
Chess Engine Battles & Analysis using UCI Engines

Chess Engine Battles & Analysis Written in TypeScript, using UCI Engine, managed from NodeJS Tested using Stockfish, LCZero, Beserk and SmallBrain for

Vladimir Mandic 2 Oct 10, 2022
A frontend framework containing of tools for fast development of dashboard, panel, etc.

Khaos-Admin A frontend framework containing of tools for fast development of dashboard, panel, etc. Tools We Provide Fast Development: We handle data

Hamrah Mechanic 7 Nov 27, 2022
An Apache Kafka prototyping and monitoring tool.

Design and scale a real-time streaming data pipeline at the click of a button. evaStudio (beta) is a web GUI and testing playground for quickly design

OSLabs Beta 58 Nov 2, 2022
Concept Art/Prototyping faster with AIDA (AIDAdiffusion), "All-In-one" app for running Stable Diffusion on windows PC locally.

AIDAdiffusion Concept Art/Prototyping faster with ourbunka internal tool AIDA (AIDAdiffusion), "All-In-one" app for running Stable Diffusion on window

null 7 Nov 23, 2022
Thin wrapper around Rant-Lang for Obsidian.md

Obsidian Rant-Lang Thin wrapper around the Rant language Rust crate to be used in Obsidian. "Rant is a high-level procedural templating language with

Leander Neiss 10 Jul 12, 2022
A thin wrapper around arweave-js for versioned permaweb document management.

?? ar-wrapper A thin wrapper around arweave-js for versioned permaweb document management. Helps to abstract away complexity for document storage for

verses 8 May 12, 2022
A simple nodejs module which is wrapper around solc that allows you to compile Solidity code

Simple Solidity Compiler It's a simple nodejs module which is wrapper around solc that allows you to compile Solidity code and get the abi and bytecod

King Rayhan 4 Feb 21, 2022
A nuxt 2 wrapper around derrickreimer/fathom-client to be able to use usefathom.com in all its glory

This package is a nuxt 2 wrapper around derrickreimer/fathom-client to be able to use usefathom.com in all its glory. Thanks to @derrickreimer for this framework agnostic library ❤️‍??.

wellá 6 Aug 18, 2022
A maybe slightly safer-ish wrapper around eval Function constructors

evalish A maybe slightly safer-ish wrapper around eval Function constructors Please maybe try something else first.. Please. evalish is a small helper

Phil Pluckthun 24 Sep 6, 2022
A jQuery plugin wrapper around Bootstrap Alerts, to create Notifications (Toasts)

bootstrap-show-notification A jQuery plugin wrapper around Bootstrap 4 Alerts, to show them as toasts (also called notifications) dynamically from Jav

Stefan Haack 10 Aug 22, 2022
A maybe slightly safer-ish wrapper around eval Function constructors

evalish A maybe slightly safer-ish wrapper around eval Function constructors Please maybe try something else first.. Please. evalish is a small helper

0no.co 22 Aug 21, 2022
An even simpler wrapper around native Fetch to strip boilerplate from your fetching code!

Super lightweight (~450 bytes) wrapper to simplify native fetch calls using any HTTP method (existing or imagined). Features Fully typed/TypeScript su

Kevin R. Whitley 49 Dec 28, 2022
Follow along with blog posts, code samples, and practical exercises to learn how to build serverless applications from your local Integrated development environment (IDE).

Getting started with serverless This getting started series is written by the serverless developer advocate team @AWSCloud. It has been designed for d

AWS Samples 55 Dec 28, 2022
A plugin that uses multiple block, Tailwind and is fully integrated into the standard build process

Tailwind CSS Custom Block Plugin This repo leverages the @wordpress/scripts package and it's ability to use PostCSS to introduce TailwindCSS to the bu

Ryan Welcher 3 Dec 31, 2022
A Hackable Markdown Note Application for Programmers. Version control, AI completion, mind map, documents encryption, code snippet running, integrated terminal, chart embedding, HTML applets, plug-in, and macro replacement.

Yank Note A hackable markdown note application for programmers Download | Try it Online >>> Not ecommended English | 中文说明 [toc]{level: [2]} Highlights

洋子 4.3k Dec 31, 2022
Create, Customize and Commit your project's ReadMe in VS Code with an integrated extension

VS Code Readme Editor ?? A VS Code extension to create, customize and save your Readme without having to leave your project workspace. Built with Type

Sumit Nalavade 22 Dec 29, 2022
⚙ With a little preparation, the typescript eslint generic rules for vodyani may be readily integrated into projects.

Vodyani eslint-config ⚙ With a little preparation, the typescript eslint generic rules for vodyani may be readily integrated into projects. Installati

Vodyani 1 Sep 7, 2022
Football Chat Bot. Integrated into Amazon Web Services

football-chat-bot-aws Football Chat Bot. Integrated into Amazon Web Services Local Setup Clone application repository: git clone https://github.com/to

Andrey Kuznetsov 5 Dec 29, 2022