https://github.com/punit-naik/figwheel-npm-example
Shows the usage of NPM deps with leiningen
https://github.com/punit-naik/figwheel-npm-example
cljsbuild clojure clojurescript figwheel nodejs npm
Last synced: 3 months ago
JSON representation
Shows the usage of NPM deps with leiningen
- Host: GitHub
- URL: https://github.com/punit-naik/figwheel-npm-example
- Owner: punit-naik
- Created: 2021-12-01T09:43:05.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-24T07:05:36.000Z (about 2 years ago)
- Last Synced: 2025-01-16T00:36:51.674Z (5 months ago)
- Topics: cljsbuild, clojure, clojurescript, figwheel, nodejs, npm
- Language: Clojure
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# figwheel-npm-example
[](https://clojars.org/org.clojars.punit-naik/figwheel-npm-example)
Shows the usage of NPM deps with leiningen.
## Overview
Stores a string with left padding using the [left-pad](https://www.npmjs.com/package/left-pad/v/1.1.3) in the [`app-state`](https://github.com/punit-naik/figwheel-npm-example/blob/main/src/org/clojars/punit_naik/figwheel_npm_example/core.cljs#L10) atom and prints it to the browser console after every hot code reload.
## Setup
To get an interactive development environment run:
lein figwheel
and open your browser at [localhost:3449](http://localhost:3449/).
This will auto compile and send all changes to the browser without the
need to reload. After the compilation process is complete, you will
get a Browser Connected REPL. An easy way to try it is:(js/alert "Am I connected?")
and you should see an alert in the browser window.
To clean all compiled files:
lein clean
To create a production build run:
lein do clean, cljsbuild once min
And open your browser in `resources/public/index.html`. You will not
get live reloading, nor a REPL.## License
Copyright © 2021 [Punit Naik](https://github.com/punit-naik)
Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.