Code Monkey home page Code Monkey logo

advertisers's Introduction

shadow-cljs + tailwindcss

This is an example of how to setup shadow-cljs and tailwindcss

Setup

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

This runs the shadow-cljs server, builds tailwind-css and runs 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 you can open browser http://localhost:8020 and get started.

Config

shadow-cljs is configured by the shadow-cljs.edn file and the UI is available at http://localhost:9630.

tailwindcss is configured by the tailwind.config.js file.

postcss is configured in postcss.config.js file.

Also check npm scripts configured in package.json, to understand how everything is stitched together for dev and release commands.

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.

PS. Most probably you want to connect to the REPL from your editor, and not type in the terminal.

Release

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

npm run release

advertisers's People

Contributors

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