Code Monkey home page Code Monkey logo

capi's Introduction

Capi frontend

Running the project

WASM dependency

The core logic is in a WASM binary. Download a release from https://github.com/ivanschuetz/capi/releases and unzip the contents in <project root>/wasm (create wasm directory if needed). When doing this while the server is already running, just refresh the browser (it might be needed to clear the browser's cache).

Install dependencies

npm install

Start project

Dev

Start:

npm run dev

Prod

Build:

npm build --release

Start:

npm start

Contributing

Format

In general it's helpful to enable format on save on the IDE.

ts, tsx

For VSCode, install the Prettier extension.

With CLI, if needed, call this from the project's root to format all files:

npx prettier --write .

There should be no differences between CLI and VSCode formatting.

Note that running Prettier is also neecessary to sort correctly Tailwind attributes (this happens via the installed Tailwind Prettier plugin).

sass

For VSCode, Install the Sass extension. โš ๏ธ Sass is deprecated. New styling will be developed with Tailwind.

Make a pull request

Create a branch, open a pull request and request a review. Use descriptive commit messages. Split work in commits that can be easily understood and reverted.

Recommended extensions (VS Code)

  • Prettier

  • Tailwind IntelliSense

    • It's recommended to add the following attributes to tailwindCSS.classAttributes, in order for autocomplete etc. to work in custom component properties:
      • bgColor

Misc

Exporting SVGs

SVGs that use theme colors should be exported as components:

npx @svgr/cli -- <svg path>hello.svg > <project path>components/icons/SvgHello.tsx

Then remove colors from exported svg and pass as tailwind classes. Addjust size properties if needed. Orient with existing ones.

capi's People

Contributors

ivnsch 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.