Skip to content

Commit

Permalink
Cuttle :)
Browse files Browse the repository at this point in the history
  • Loading branch information
oakmac committed Jan 19, 2015
1 parent 1a7dd59 commit 28872fb
Show file tree
Hide file tree
Showing 20 changed files with 73 additions and 66 deletions.
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2014 Chris Oakman and contributors
Copyright 2015 Chris Oakman and contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand All @@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 changes: 15 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
# cljsbuild-ui
# Cuttle

A user interface for the ClojureScript Compiler.

<img src="screenshots/2014-10-30-preview.png">

## Goal

Getting started with ClojureScript is one of the more difficult things about
the language. JS devs are often unfamiliar with Leiningen and project.clj seems
very foreign initially. The goal of this project is to reduce the barrier to
entry for new ClojureScript devs.
Getting started with ClojureScript is one of the more difficult things about the
language. JavaScript developers are often unfamiliar with Leiningen and
project.clj seems very foreign initially. The goal of this project is to reduce
the barrier to entry for new ClojureScript devs.

We also want to improve the usability of the compiler in day-to-day workflows.
The user should be able to build/clean their projects with a few clicks, and
they should see meaningful errors and warnings at a glance.

## Development Setup

Development is currently in a very early stage and things should be expected to
break on a regular basis.

1. Install [Leiningen] and [Node.js].
1. One-time setup. Run from the project directory:

Expand Down Expand Up @@ -65,11 +62,20 @@ If you want Chrome Dev Tools to auto-open when you start the program, add a
`config.json` file in the `app/` folder. An `example.config.json` is
provided. This is disabled in the release.

## About the Name

Cuttle is named after the [Cuttlefish] because [Shaun] likes cephalopods.

Cuttle is not an acronym and should be capitalized like a proper noun when used
in a sentence.

## License

All code licensed under the terms of the [MIT
License](https://github.com/oakmac/cljsbuild-ui/blob/master/LICENSE.md).
License](https://github.com/oakmac/cuttle/blob/master/LICENSE.md).

[Leiningen]:http://leiningen.org
[Node.js]:http://nodejs.org
[Atom Shell]:https://github.com/atom/atom-shell
[Cuttlefish]:http://en.wikipedia.org/wiki/Cuttlefish
[Shaun]:https://github.com/shaunlebron
2 changes: 1 addition & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<title>ClojureScript Compiler</title>
<title>Cuttle - ClojureScript Compiler</title>
<link rel="stylesheet" href="css/main.min.css">
</head>
<body>
Expand Down
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name" : "cljsbuild-ui",
"name" : "Cuttle",
"version" : "0.1.0",
"main" : "app.js"
}
}
2 changes: 1 addition & 1 deletion launch.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:: Launch cljsbuild-ui using our local Atom Shell installation
:: Launch Cuttle using our local Atom Shell installation
:: (on Windows)

atom-shell\atom.exe app
2 changes: 1 addition & 1 deletion launch.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Launch cljsbuild-ui using our local Atom Shell installation
# Launch Cuttle using our local Atom Shell installation
# (Mac, Linux, or Cygwin)

# from: http://stackoverflow.com/a/17072017/142317
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "cljsbuild-ui",
"homepage": "https://github.com/oakmac/cljsbuild-ui",
"name": "Cuttle",
"homepage": "https://github.com/oakmac/cuttle",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/oakmac/cljsbuild-ui.git"
"url": "https://github.com/oakmac/cuttle.git"
},
"dependencies": {
"express": "4.1.x",
Expand Down
6 changes: 3 additions & 3 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
(defproject cljsbuild-ui "0.1.0-SNAPSHOT"
(defproject cuttle "0.1.0-SNAPSHOT"
:description "A user interface for the ClojureScript compiler."
:url "https://github.com/oakmac/cljsbuild-ui"
:url "https://github.com/oakmac/cuttle"
:license {
:name "MIT License"
:url "https://github.com/oakmac/cljsbuild-ui/blob/master/LICENSE.md"
:url "https://github.com/oakmac/cuttle/blob/master/LICENSE.md"
:distribution :repo}

:source-paths ["src-clj"]
Expand Down
12 changes: 6 additions & 6 deletions release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# Create cljsbuild-ui release using our local Atom Shell installation
# Create Cuttle release using our local Atom Shell installation
# (Mac, Linux, or Cygwin)

#----------------------------------------------------------------------
Expand Down Expand Up @@ -76,14 +76,14 @@ if [ "$OS" == "mac" ]; then
FULL_PLIST="$(pwd)/$RELEASE_DIR/$PLIST"

defaults write $FULL_PLIST CFBundleIconFile 'app/img/clojure-logo.icns'
defaults write $FULL_PLIST CFBundleDisplayName 'CLJS-UI'
defaults write $FULL_PLIST CFBundleName 'CLJS-UI'
defaults write $FULL_PLIST CFBundleDisplayName 'Cuttle'
defaults write $FULL_PLIST CFBundleName 'Cuttle'

mv $RELEASE_DIR/Atom.app $RELEASE_DIR/ClojureScript.app
mv $RELEASE_DIR/Atom.app $RELEASE_DIR/Cuttle.app

elif [ "$OS" == "linux" ]; then

mv $RELEASE_DIR/atom $RELEASE_DIR/ClojureScript
mv $RELEASE_DIR/atom $RELEASE_DIR/Cuttle

elif [ "$OS" == "windows" ]; then

Expand All @@ -93,7 +93,7 @@ elif [ "$OS" == "windows" ]; then
--resourceName:1 \
--resourceFile:$RELEASE_RSRC/app/img/clojure-logo.ico

mv $RELEASE_DIR/atom.exe $RELEASE_DIR/ClojureScript.exe
mv $RELEASE_DIR/atom.exe $RELEASE_DIR/Cuttle.exe

fi

Expand Down
2 changes: 1 addition & 1 deletion setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ call grunt download-atom-shell
echo. & echo Building lein profile tool...
call build-lein-profile-tool.bat

echo. & echo Setup complete.
echo. & echo Cuttle setup complete.
2 changes: 1 addition & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ grunt download-atom-shell
echo; echo "Building lein profile tool..."
./build-lein-profile-tool.sh

echo; echo "Setup complete."
echo; echo "Cuttle setup complete."
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
(ns cuttle.cljsbuild.config
"Utilities for parsing the cljsbuild config."
#_(:require
[clojure.pprint :as pprint]))

;;; Taken from "lein-cljsbuild" for retrieving normalized cljsbuild configs.
;;;
;;; Source:
Expand All @@ -8,11 +13,6 @@
;;; or wait for this cljsbuild pull-request to retrieve opts
;;; with `lein cljsbuild list`: https://github.com/emezeske/lein-cljsbuild/pull/338

(ns cljsbuild-ui.cljsbuild.config
"Utilities for parsing the cljsbuild config."
#_(:require
[clojure.pprint :as pprint]))

(defn in-target-path [target-path subpath]
(str target-path "/cljsbuild-" subpath))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns cljsbuild-ui.config
(ns cuttle.config
(:require
[clojure.walk :refer [keywordize-keys]]
[cljsbuild-ui.util :refer [file-exists? js-log log]]))
[cuttle.util :refer [file-exists? js-log log]]))

;;------------------------------------------------------------------------------
;; Config File
Expand Down
14 changes: 7 additions & 7 deletions src-cljs/cljsbuild_ui/core.cljs → src-cljs/cuttle/core.cljs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
(ns cljsbuild-ui.core
(ns cuttle.core
(:require-macros
[cljs.core.async.macros :refer [go]]
[hiccups.core :as hiccups])
(:require
[cljs.core.async :refer [<!]]
[cljsbuild-ui.config :refer [app-data-path]]
[cljsbuild-ui.dom :refer [by-id hide-el! set-html! show-el!]]
[cljsbuild-ui.exec :refer [add-lein-profile!
[cuttle.config :refer [app-data-path]]
[cuttle.dom :refer [by-id hide-el! set-html! show-el!]]
[cuttle.exec :refer [add-lein-profile!
kill-all-leiningen-instances!
correct-java-installed?]]
[cljsbuild-ui.pages.main :as main-page]
[cljsbuild-ui.projects :refer [load-workspace!]]
[cljsbuild-ui.util :refer [file-exists?]]
[cuttle.pages.main :as main-page]
[cuttle.projects :refer [load-workspace!]]
[cuttle.util :refer [file-exists?]]
hiccups.runtime))

(enable-console-print!)
Expand Down
4 changes: 2 additions & 2 deletions src-cljs/cljsbuild_ui/dom.cljs → src-cljs/cuttle/dom.cljs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns cljsbuild-ui.dom
(ns cuttle.dom
(:require
[cljsbuild-ui.util :refer [js-log log]]))
[cuttle.util :refer [js-log log]]))

;;------------------------------------------------------------------------------
;; DOM Helper Functions
Expand Down
6 changes: 3 additions & 3 deletions src-cljs/cljsbuild_ui/exec.cljs → src-cljs/cuttle/exec.cljs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
(ns cljsbuild-ui.exec
(ns cuttle.exec
(:require-macros
[cljs.core.async.macros :refer [go]])
(:require
[cljs.reader :refer [read-string]]
[clojure.string :refer [join replace split-lines split trim]]
[cljs.core.async :refer [chan close! put!]]
[cljsbuild-ui.config :refer [config]]
[cljsbuild-ui.util :refer [file-exists? js-log log on-windows? path-join uuid]]))
[cuttle.config :refer [config]]
[cuttle.util :refer [file-exists? js-log log on-windows? path-join uuid]]))

(declare extract-target-from-start-msg parse-java-version)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
(ns cljsbuild-ui.pages.main
(ns cuttle.pages.main
(:require-macros
[cljs.core.async.macros :refer [go]])
(:require
[cljs.core.async :refer [<!]]
[clojure.string :refer [blank? join replace]]
[clojure.walk :refer [keywordize-keys]]
[quiescent :include-macros true]
[sablono.core :as sablono :include-macros true]
[cljsbuild-ui.config :refer [app-data-path config]]
[cljsbuild-ui.dom :refer [by-id hide-el! show-el!]]
[cljsbuild-ui.exec :as exec]
[cljsbuild-ui.projects :as projects :refer [load-project-file]]
[cljsbuild-ui.util :refer [date-format file-exists? homedir log js-log now
[cuttle.config :refer [app-data-path config]]
[cuttle.dom :refer [by-id hide-el! show-el!]]
[cuttle.exec :as exec]
[cuttle.projects :as projects :refer [load-project-file]]
[cuttle.util :refer [date-format file-exists? homedir log js-log now
on-mac? uuid write-file-async!]
:refer-macros [while-let]]))
:refer-macros [while-let]]
[quiescent :include-macros true]
[sablono.core :as sablono :include-macros true]))

(def ipc (js/require "ipc"))
(def open (js/require "open"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
(ns cljsbuild-ui.projects
(ns cuttle.projects
(:require-macros
[cljs.core.async.macros :refer [go]])
(:require
[cljs.core.async :refer [<! put! close! chan]]
[clojure.string :refer [replace]]
[cljs.reader :refer [read-string]]
[cljsbuild-ui.cljsbuild.config :refer [extract-options]]
[cljsbuild-ui.exec :refer [get-cljsbuild-with-profiles]]
[cljsbuild-ui.util :refer [file-exists? js-log log path-join path-dirname]]))
[clojure.string :refer [replace]]
[cuttle.cljsbuild.config :refer [extract-options]]
[cuttle.exec :refer [get-cljsbuild-with-profiles]]
[cuttle.util :refer [file-exists? js-log log path-join path-dirname]]))

(def fs (js/require "fs"))

Expand Down
5 changes: 3 additions & 2 deletions src-cljs/cljsbuild_ui/util.clj → src-cljs/cuttle/util.clj
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
(ns cljsbuild-ui.util)
(ns cuttle.util)

;; https://github.com/markmandel/while-let
(defmacro while-let
"Repeatedly executes body while test expression is true, evaluating the body with binding-form bound to the value of test."
"Repeatedly executes body while test expression is true, evaluating the body
with binding-form bound to the value of test."
[bindings & body]
(let [form (first bindings) test (second bindings)]
`(loop [~form ~test]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns cljsbuild-ui.util)
(ns cuttle.util)

;;------------------------------------------------------------------------------
;; Node Modules
Expand Down

1 comment on commit 28872fb

@comamitc
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.