npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ivanpierre/cljstron-simple

v0.0.3

Published

ClojureScript skeleton in node.js with electron

Downloads

7

Readme

CLJStron-simple (CLJStron plug)

Project

A library to manage and develop electron applications in ClojureScript... and Clojure?

Goals

State of project

Project is now a WIP in pre-alpha stage as of 22th of October 2017. :mask:

It is only as for now a simple experimental electron app used as a sandbox.

Version

  • @ivanpierre/[email protected] first beta version will be moved to cljstron on NPM as [email protected].
  • GitHub repository: https://github.com/cljstron/cljs-node-electron-boot. First beta version will be moved to cljstron/CLJStron repository with release 0.0.1-beta1.

Dependencies (as for now)

NPM

  • [email protected] It's necessary to compile the project. Why? because of the compiler... :unamused:.
  • [email protected] The compiler for now, but this will be in a module afterward (compiler agnostic). Root compilation will be a raw lein project.

Clojars

  • [camel-snake-kebab "0.4.0"] It's used to manage snake-cased and camelCased keys. I will change to the camel-case library included in electron package, or not... :wink:

Installation

As it's an alpha release, I suppose you already know how to install programs and the configuration of your computer... :yum:

Prerequisites

  • leinigen
  • git
    • If you're on a mac, you'll probably will have to install XCode which is in the Apple Store.
    • hint : if when you use git you have message about XCode, that's it... :grin:
    • If you install it you'll have to aggree to the licence aggrement : type 'sudo xcodebuild -license', give your password, hit the space key, or enter, until you're at the end of the licence, type aggree [ENTER], and you're done.
  • node.js that includes npm, the package manager. You can also use the yarn manager if it's your favorite tool. I figure out you know how to translate the following npm commands... :innocent:
  • Not mandatory but useful, a node version selector nvm so you can play with the lastest node.js version.
    • if you do it, change version before proceeding...
  • with npm install :
    • latest version of npm : npm i -g "npm@latest"
    • shadow-cljs : npm i -g "shadow-cljs"
    • electron : npm i -g "[email protected]"

Installing project

Go in a developpement directory or create it.

create and download the project directory :

git clone https://github.com/cljstron/cljs-node-electron-boot.git

You should be in the project directory :

cd cljs-node-electron-boot

And download the needed libraries :

npm install

Compiling project

Compile the mainand renderer applications in development mode:

  • shadow-cljs compile main
  • shadow-cljs compile renderer

If you've got errors... you're at work... :grin: Go to the Editing the project part. And try to figure out why, by reading the error messages.

I'll try to only push working versions, but I'm on a mac now, so Windows and Linux releases have not been tested.

You can also put an issue on the project's GitHub repository issues page.

Lanching the project

It's just :

electron . or npm start

Normally you have an open window with infos on the versions of your electron environment.

For mac users, closing the windows doesn't stop the program, you have to go to the menu and close the application. Bad mac habit, but you can change it, see editing code.

Editing the project

You can use whatever editor that support Clojure and ClojureScript

  • EMACS
  • Atom
  • Eclipse
  • Vi
  • LightTable
  • NightCode
  • Sublime
  • IntelliJ
  • ...

or even with no support. I use Visual Sudio Code with0 Clojure (I test for now), ParInfer, Rainbow Brackets (buggy) packages, and I use the Integrated Terminal to lauch compilation as I wait for the REPL, Compilation and Reboot On Edit modules.

Application structure

├== -> generated code     ├**  -> downloaded libraries     
[directory]               ├++  -> compiled libraries and runtime in development mode
                                  all integrated in generated code on production
.
├── README.md                      This page
├── [docs]                         Documentation directory
│   └── Home.md                    Junk file
├── LICENSE                        Licence file
│
├── cljs.edn                       Futur project file for cljsjs "Lumo"
├── clojure.clj                    Futur project file for leiningen
├── project.boot                   Futur project file for boot
├── shadow-cljs.edn                The working project file for shadow-cljs
├── package.json                   Project file for the application as npm package
│
├** package-lock.json              Control file for the loaded npm packages
├** [node_modules]                 Repository of the npm packages
│
├++ [target]                       Compiled AOT, cache and runtime of main application libraries
│
├── [resources]                    Public HTML root directory for the renderer
│   ├== [js]                       Compiled AOT, cache an executables for renderer
│   │   ├++ [cljs-runtime]         Library and runtime for renderer
│   │   ├++ manifest.json          Manifest of libraries and runtime
│   │   └== simple.js              The compiled main program for the renderer
│   │
│   ├── app.edn                    Application descriptor
│   ├── index.html                 Empty page to create content from javascript
│   └== main.js                    The compiled main program of the application
│
└── [src]                          Sources root
    │
    ├── [cljstron]                 Root of cljstron library
    │   ├── [main]                 Root for helper function for main application
    │   │   ├── interop.cljs       A file to translate recursively JS->CLJS structures (unused)
    │   │   └── window.cljs        Helper for windows management, containers of renderers
    │   ├── [common]               Root for helper function for both applications
    │   └── [renderer]             Root for helper function for renderer application
    │
    ├── [cljstron_simple]          Sources for plug
    │   ├── [main]                 Main plug sources
    │   │   └── main.cljs          Source for main. Manage the windows and events
    │   ├── [common]               Both main and renderer plug sources
    │   └── [renderer]             Renderer plug sources
    │       └── simple.cljs        Source for renderer.
    │
    └── main.cljs                  Main entry point. Activate cljstron_simple 

A last thing... the doc for electron is here. It may help... :innocent: