GithubHelp home page GithubHelp logo

doglooksgood / shadow-cljs-tailwindcss Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jacekschae/shadow-cljs-tailwindcss

0.0 1.0 0.0 609 KB

shadow-cljs + tailwindcss-jit

JavaScript 7.57% CSS 0.58% HTML 3.98% Clojure 87.87%

shadow-cljs-tailwindcss's Introduction

shadow-cljs + tailwindcss-jit

This is a example of how to setup shadow-cljs and using tailwindcss-jit

Development

git clone https://github.com/jacekschae/shadow-cljs-tailwindcss.git app
cd app
npm install
npm run dev

This runs the shadow-cljs server process and postcss. It will observe cljs-runtime/*.js files in dev and will use main.js for creating a release build.

The first startup takes a bit of time since it has to download all the dependencies and do some prep work. Once this is running we can get started.

To run your app open http://localhost:9630 and do it with shadow-cljs ui

shadow-cljs is configured by the shadow-cljs.edn config.

tailwindcss is configured by the tailwind.config.js file. Postcss is configured in postcss.config.js. Also checkout npm scripts configured in package.json

Live reload

Live reload is configured for *.cljs and *.css files. This is actually not true, it's using only output of shadow-cljs files *.js files to be exact, but you know, for the sake of clarity. More info in tailwind.config.js.

REPL

During development you can start a REPL.

From the command line use npx shadow-cljs cljs-repl app.

shadow-cljs - config .../shadow-cljs.edn
shadow-cljs - connected to server
cljs.user=>

This can now be used to eval code in the browser (assuming you still have it open). Try (js/alert "Hi.") and take it from there. You might want to use rlwrap npx shadow-cljs cljs-repl app if you intend to type a lot here.

You can exit the REPL by either CTRL+C or typing :repl/quit.

Release

To create a release artifact run npm run release which will createa a js and css assests.

npm run release

shadow-cljs-tailwindcss's People

Contributors

dependabot-preview[bot] avatar jacekschae 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.