GithubHelp home page GithubHelp logo

littledivy / dext.ts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lucacasonato/dext.ts

0.0 1.0 0.0 567 KB

The Preact Framework for Deno

Home Page: https://deno.land/x/dext

License: MIT License

TypeScript 97.51% Dockerfile 0.98% CSS 0.03% JavaScript 1.47%

dext.ts's Introduction

dext.ts

logo

The Preact Framework for Deno. Dext.ts is heavily inspired by Next.js.

  • Zero config
  • Pre-render pages at build time (SSG)
  • Tiny (example is only 5.75KB of JS)
  • Client hydration
  • Built-in routing
  • Zero config TypeScript support
  • File-system routing
  • Code-splitting, bundling, and tree shaking built in

Installing

To install, run the following command. This will make the dext CLI available in your path.

deno install --allow-read --allow-write --allow-env --allow-net --allow-run --unstable -f -n dext https://deno.land/x/[email protected]/cli.ts

Getting started

To create a new project run dext create myproject. This will scaffold a new dext project in the myproject folder. This folder contains a few files:

  • deps.ts contains all of your projects dependencies.
  • pages/index.tsx is the source for the / of your project.
  • pages/user/[name].tsx is the source for all routes at /user/[name] (e.g. /user/luca and /user/bartek).
  • tsconfig.json is the TypeScript configuration that the project uses.
  • .gitignore tells git to ignore the .dext folder that is created by dext dev and dext build.

Now that you have a project set up, you can start the development server using dext dev. After a few seconds you can view your built page at http://127.0.0.1:3000. When you change any of the files in the pages directory, your project will be rebuilt automatically, and the page will be automatically reloaded in the browser.

When you are ready to deploy to production, run dext build. This will generate a production optimized build. You can start a production webserver to serve this build with dext start.

Example

For an example, see the /example folder. You can create a production build it by running dext build, and then serve it by running dext start. You can also run dext dev to start watching, building, and serving.

You can also see a deployed version of this example on at https://dext.fly.dev.

dext.ts's People

Contributors

lucacasonato avatar kt3k avatar bartlomieju avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.