Coder Social home page Coder Social logo

reactor's Introduction

archived in 2024

I created and used this tool to create fast frontends using esbuild. It was experimental and is today irrlevant since we have tools like https://github.com/vitejs/vite, which I use on every frontends.

Reactor

Build Status License version

๐Ÿช„ A simple "CreateReactApp-like", using esbuild, to bootstrap your React app and npm scripts.

> npx reactor
Usage: reactor <command>

Commands:
  reactor create  bootstrap your React app with initial files
  reactor start   run the local dev server
  reactor build   use esbuild to create the distribution files
  reactor toc     generate TOC for your documentation from your markdown files

create your app

First prepare your new project with a startup package.json:

> mkdir yourApp; cd yourApp
> npm i --save-dev @uralys/reactor

Let's create your boot files:

> npx reactor create

โ˜ข๏ธ reactor updated you files successfully.
โœ… you can now start your App
> npm run start:dev

You can now version and push your project to your repository

> git init
> git add .
> git commit -m "Initial commit from @uralys/reactor"
> git remote add origin https://github.com/your-new-repo
> git push origin master

commands

Once your app is created, you can use:

  • npm run start:dev to run a local server with esbuild and live-server
  • npm run build to build you /public distribution with esbuild

TOC (Optional)

  • npm run toc to generate TOC from you markdowns if you use Reactor to generate a documentation website. I'll document this later.

indexation (Optional)

Config

You can update reactor.config.js:

{
  esbuild: {
    ...esbuildOptions
  },
  documentation: {
    source: './path/to/docs',
    dist: './path/to/tocs'
  },
  start: {
    hosts: ["platform.localhost"]
  },
  sitemap: {
    publicPath = './public',
    links = [],
    hostname: 'https://your.domain',
    outputName = 'sitemap.xml'
  }
}

If your project uses dotenv, call it from the top of reactor.config.js

import dotenv from 'dotenv';
dotenv.config();

Tips and suggestions

monitoring

frontend

backend

  • use serverless!
  • use netlify to deploy. (Note: set NODE_VERSION in environnment vars)

dev:publish Reactor

> npm version patch
> ggpush --tags
> npm run release

reactor's People

Contributors

chrisdugne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

reactor's Issues

state management

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.