Code Monkey home page Code Monkey logo

stefon's Issues

Support a shut down operation

It makes it more convenient to tear everything down and put it back, as in the stuart sierra workflow post or jig.

Update depencies for clj-time "0.6.0"?

Ring needs clj-time "0.6.0" while stefon depends on 0.4.4 and thats brake ring. Fix is to specify 0.6.0 depency explicit. May be it's time to update stefon so it's depends on newer version?

Maybe asking for something wrong, pardon then, just started with clojure stuff.

Installation instructions are missing a step

On ubuntu 12.04, just referencing the plugin and lib as in the readme gives you the following:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Unable to load library '/usr/java/packages/lib/amd64/libv8.so.clj-v8': /usr/java/packages/lib/amd64/libv8.so.clj-v8: cannot open shared object file: No such file or directory

Namespace 'v8.core' not found

I included dependencies in my project. When I try to reference [stefon.core :as stefon], I get this exception:

Failed trying to require myapp.handler with: java.lang.Exception: namespace 'v8.core' not found

How do I fix this? Do I add a separate dependency for clj-v8?

Static link-to-asset with with hash in query parameter

I want to use Stefon to serve up publicly linked to, compiled CoffeeScript files. However, this requires a static URL e.g. /resources/my-script.js?v=1234. Would it take to let (link-to-asset ...) output a static file path with the hash in the query parameter instead of in the file name?

Problems Finding JNA Library

I'm using a copy of Stefon that I checked out from the master branch. It builds and installs without issue. It works great from within my REPL environment (Cider) or when launched with a REPL via lein (lein repl). However, when I bundle my application as an uberjar, I'm seeing the following error at the top of my stacktrace:

Exception in thread "main" java.lang.UnsatisfiedLinkError: 
  Unable to load library '/usr/java/packages/lib/amd64/libv8.so.clj-v8': 
    /usr/java/packages/lib/amd64/libv8.so.clj-v8: 
      cannot open shared object file: No such file or directory

This seems especially odd since I don't have that path ("/usr/java/packages") on my system. I'm invoking my application with the following incantation:

java -Djna.library.path=target/native/linux/x86_64 \
-jar target/scrumboard-0.0.1-SNAPSHOT-standalone.jar

When I comment out my uses of Stefon and set my application to simply write the value of the "jna.library.path" System property, it does show the value I passed in. I've also tried suppling the absolute path to the library, that doesn't work either. I'm using the "x86_64" path since I'm on a 64bit OS (Ubuntu).

I did find the issue where this is being worked on and it looks like the issue was resolved. Indeed, the fact that it works from "lein repl" and from Cider implies that this is an issue that can be resolved. I'm wondering if maybe I'm doing something very obviously wrong.

My end goal is to deploy this application as a WAR via Tomcat. This is currently the way we deploy all of our Java applications, the goal is to get our Clojure apps to deploy in the same manner.

Any help you can provide will be greatly appreciated! Thank you!

Null Pointer Exception when aot compiling

I'm trying to compile an uberjar for my web application and I'm getting this error:

lein compile
Compiling stefon-compile.core
WARNING: name already refers to: #'clojure.core/name in namespace: stefon.asset, being replaced by: #'stefon.asset/name
Exception in thread "main" java.lang.NullPointerException, compiling:(core.clj:1:1)

Here's a repo that reproduces it:

https://github.com/Christopher-Bui/stefon-compile

Steps to reproduce:

  1. Create a new project.
  2. Add [circleci/stefon "0.5.0-SNAPSHOT"] to dependencies.
  3. Add :aot :all to project.clj
  4. Add (:require [stefon.core :as stefon]) in a namespace.
  5. lein compile

Supposedly the problem is due to the the conflicting names as an answer on SO says: http://stackoverflow.com/a/11534475/90537.

But I've looked in stefon.asset and practically everywhere and I can't find anything that defines name.

CPU spins on CoffeeScript error

If I make a CoffeeScript syntax error, my running Compojure application maxes out CPU and spins. Exception is thrown, but the only fix seems to be to end the running Java application. Is this a problem in V8/node, or a loop somewhere in stefon?

Booststrap LESS source compile throws V8 Error

Including standard Bootstrap LESS source files with bootstrap.less as a starting point, the following error is thrown by link-to-asset:

V8 error: ERROR:null:null:-1: 
undefined
TYPE: Syntax
INDEX: undefined
EXTRACT: ,,@import "variables.less";

Here is how I am including it in my view layout function:

(include-css (link-to-asset "bootstrap/less/bootstrap.less" {}))

This seems to be caused by @import. Is this supported by the LESS pipeline?

Support prefixed asset paths for sites not at domain root

I'm using stefon for a github pages project. As you probably know. Github pages are hosted at USERNAME.github.io/PROJECTNAME/. link-to-assets always starts with /assets/ so to make this work the assets need to be hosted at the root site and cannot be in the sub-directory where they belong.

Is there an easy way to do this that i am missing? Otherwise, I'll try to submit a PR for this.

Stable version outlook (0.5.0)

Any idea when a stable version of stefon will be released?

Not sure if this is the best way to ask the question but I figured it'd work.

Precompile issue

Hello there, was integrating stefon in my project and got this strange error on running precompile:

java.lang.ClassCastException: clojure.lang.PersistentArrayMap cannot be cast to java.lang.CharSequence
at clojure.string$split.invoke(string.clj:222)
at leiningen.stefon_precompile$split_ns.invoke(stefon_precompile.clj:9)
at leiningen.stefon_precompile$stefon_precompile.invoke(stefon_precompile.clj:16)
at clojure.lang.Var.invoke(Var.java:415)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.core.main$resolve_task$fn__3029.doInvoke(main.clj:189)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.lang.AFunction$1.doInvoke(AFunction.java:29)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invoke(core.clj:619)
at leiningen.core.main$apply_task.invoke(main.clj:230)
at leiningen.core.main$resolve_and_apply.invoke(main.clj:234)
at leiningen.core.main$_main$fn__3092.invoke(main.clj:303)
at leiningen.core.main$_main.doInvoke(main.clj:290)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.lang.Var.invoke(Var.java:415)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.core$apply.invoke(core.clj:617)
at clojure.main$main_opt.invoke(main.clj:335)
at clojure.main$main.doInvoke(main.clj:440)
at clojure.lang.RestFn.invoke(RestFn.java:436)
at clojure.lang.Var.invoke(Var.java:423)
at clojure.lang.AFn.applyToHelper(AFn.java:167)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)

My settings are as follows:

:stefon-options {
:mode :production
:asset-roots ["resources"]
:serving-root "resources/public/assets"
:manifest-file "resources/manifest.json"
:precompiles ["resources/assets/app.js.stefon"]
}

Tried solving the problem myself by looking at the code, I am seeing a str/split on an namespace on a return on (:stefon-options project). Since I have no experience with lein and their plugin structure I could not figure it out. Maybe I am just doing something wrong. Help would be appreciated! :-)

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.