Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Pedestal Team
committed
Mar 9, 2013
0 parents
commit 1c86f60
Showing
156 changed files
with
29,435 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
pom.xml | ||
target/ | ||
.lein-deps-sum | ||
.lein-failures | ||
.lein-repl-history | ||
.DS_Store | ||
*~ | ||
out/ | ||
tmp/ | ||
logs/ | ||
generated-js/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Pedestal | ||
======== | ||
|
||
The Pedestal web application framework | ||
|
||
### Installing Libraries ### | ||
|
||
|
||
Run `lein sub install` in the top level directory to install all the | ||
library components in your local Maven repository. | ||
|
||
The demo project uses Leiningen checkouts to allow simultaneous | ||
development of libraries and the application. See the [Leiningen FAQ](https://github.com/technomancy/leiningen/blob/master/doc/FAQ.md) | ||
for details. | ||
|
||
Copyright | ||
---------------------------------------- | ||
|
||
Copyright © 2012 Relevance, Inc. All rights reserved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/target | ||
/lib | ||
/classes | ||
/checkouts | ||
pom.xml | ||
*.jar | ||
*.class | ||
.lein-deps-sum | ||
.lein-failures | ||
.lein-plugins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Pedestal Application template | ||
|
||
Generate a new Pedestal Application. | ||
|
||
|
||
## Usage | ||
|
||
From within this project run: | ||
|
||
```bash | ||
lein install | ||
``` | ||
|
||
Add a new dependency to your Leiningen user profile in `~/.lein/profiles.clj`: | ||
|
||
```clj | ||
{:user {:plugins {pedestal-app/lein-template "0.0.9-SNAPSHOT"}}} | ||
``` | ||
|
||
When you are ready to create a new project, run: | ||
|
||
```bash | ||
lein new pedestal-app example | ||
cd example | ||
lein repl | ||
``` | ||
|
||
where `example` is the project name. | ||
|
||
At the REPL type: | ||
|
||
```clj | ||
(run) | ||
``` | ||
|
||
and then open a browser to `http://localhost:3000`. | ||
|
||
You now have a working development environment! | ||
|
||
|
||
## License | ||
|
||
Copyright (c) 2013 Relevance, Inc. All rights reserved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(defproject pedestal-app/lein-template "0.0.9-SNAPSHOT" | ||
:description "A Pedestal Application template." | ||
:eval-in-leiningen true) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
(ns leiningen.new.pedestal-app | ||
(:use [leiningen.new.templates :only [renderer name-to-path ->files]])) | ||
|
||
(defn base-files [render data] | ||
[[".gitignore" (render ".gitignore" data)] | ||
["README.md" (render "README.md" data)] | ||
["project.clj" (render "project.clj" data)] | ||
|
||
[(str "app/assets/stylesheets/{{name}}.css") | ||
(render "app/assets/stylesheets/project.css" data)] | ||
["app/assets/javascripts/xpath.js" | ||
(render "app/assets/javascripts/xpath.js" data)] | ||
|
||
["tools/public/404.html" (render "tools/public/404.html" data)] | ||
["tools/public/design.html" (render "tools/public/design.html" data)] | ||
["tools/public/favicon.ico" (render "tools/public/favicon.ico" data)] | ||
["tools/public/index.html" (render "tools/public/index.html" data)] | ||
["tools/public/stylesheets/bootstrap.css" | ||
(render "tools/public/stylesheets/bootstrap.css" data)] | ||
["tools/public/stylesheets/pedestal.css" | ||
(render "tools/public/stylesheets/pedestal.css" data)] | ||
["tools/public/javascripts/bootstrap.js" | ||
(render "tools/public/javascripts/bootstrap.js" data)] | ||
["tools/public/javascripts/jquery-min.js" | ||
(render "tools/public/javascripts/jquery-min.js" data)] | ||
["tools/public/javascripts/pedestal/js/api.js" | ||
(render "tools/public/javascripts/pedestal/js/api.js" data)] | ||
|
||
["config/config.clj" (render "config/config.clj" data)] | ||
["config/logback.xml" (render "config/logback.xml" data)] | ||
["config/user.clj" (render "config/user.clj" data)] | ||
|
||
["test/{{sanitized}}/test/behavior.clj" (render "test/behavior.clj" data)]]) | ||
|
||
(defn annotated-project [data] | ||
(let [render (renderer "pedestal-app/annotated")] | ||
(apply ->files data | ||
["app/src/{{sanitized}}/behavior.clj" (render "app/src/behavior.clj" data)] | ||
["app/src/{{sanitized}}/services.cljs" (render "app/src/services.cljs" data)] | ||
["app/src/{{sanitized}}/html_templates.clj" (render "app/src/html_templates.clj" data)] | ||
["app/src/{{sanitized}}/rendering.cljs" (render "app/src/rendering.cljs" data)] | ||
["app/src/{{sanitized}}/start.cljs" (render "app/src/start.cljs" data)] | ||
["app/src/{{sanitized}}/simulated/services.cljs" (render "app/src/simulated/services.cljs" data)] | ||
["app/src/{{sanitized}}/simulated/start.cljs" (render "app/src/simulated/start.cljs" data)] | ||
["app/templates/application.html" (render "app/templates/application.html" data)] | ||
["app/templates/{{name}}.html" (render "app/templates/project.html" data)] | ||
(base-files render data)))) | ||
|
||
(defn default-project [data] | ||
(let [render (renderer "pedestal-app/plain")] | ||
(apply ->files data | ||
["app/src/{{sanitized}}/behavior.clj" (render "app/src/behavior.clj" data)] | ||
["app/src/{{sanitized}}/html_templates.clj" (render "app/src/html_templates.clj" data)] | ||
["app/src/{{sanitized}}/rendering.cljs" (render "app/src/rendering.cljs" data)] | ||
["app/src/{{sanitized}}/start.cljs" (render "app/src/start.cljs" data)] | ||
["app/src/{{sanitized}}/simulated/start.cljs" (render "app/src/simulated/start.cljs" data)] | ||
["app/templates/application.html" (render "app/templates/application.html" data)] | ||
["app/templates/{{name}}.html" (render "app/templates/project.html" data)] | ||
(base-files render data)))) | ||
|
||
(defn pedestal-app | ||
"A Pedestal application project template." | ||
[name & args] | ||
(let [data {:name name | ||
:sanitized (name-to-path name)}] | ||
(case (first args) | ||
"annotated" (annotated-project data) | ||
(default-project data)))) |
3 changes: 3 additions & 0 deletions
3
app-template/src/leiningen/new/pedestal_app/annotated/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
out/ | ||
target/ | ||
logs/ |
9 changes: 9 additions & 0 deletions
9
app-template/src/leiningen/new/pedestal_app/annotated/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# {{name}} | ||
|
||
Start working on this application by writing its behavior in the file | ||
`app/src/{{sanitized}}/behavior.clj` | ||
|
||
## Links | ||
|
||
* [Getting Started](https://github.com/relevance/platform/tree/master/app#usage) | ||
* [Overview of how pedestal-client applications work](https://github.com/relevance/platform/wiki/Client-Application-Model) |
Oops, something went wrong.