Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If Quicklisp is installed you can use the built-in feature Quickproject.</p> <pre><code>(ql:quickload "quickproject") (quickproject:make-project "~/src/lisp/swatchblade/" :depends-on '(vecto hunchentoot)) </code></pre> <p>This creates 4 files:</p> <ul> <li>package.lisp </li> <li>swatchblade.lisp</li> <li>swatchblade.asd</li> <li>README.txt</li> </ul> <p>package.lisp defines package namespaces:</p> <pre><code>(defpackage #:swatchblade (:use #:cl) (:shadowing-import-from #:vecto #:with-canvas #:rounded-rectangle #:set-rgb-fill #:save-png-stream)) </code></pre> <p>swatchblade.asd defines the system/project, source code files, dependencies, etc.</p> <pre><code>(asdf:defsystem #:swatchblade :serial t :depends-on (#:vecto #:hunchentoot #:cl-colors) :components ((:file "package") (:file "swatchblade"))) </code></pre> <p>swatchblade.lisp is where the source code goes.</p> <p>You can load the the project via Quicklisp's quickload:</p> <pre><code>* (ql:quickload "swatchblade") loading output * (swatchblade:start-web-server :port 8080) Server started on port 8080. </code></pre> <p>If you then create another project that depends on the swatchblade system:</p> <pre><code>quickproject:make-project "~/src/lisp/whimsytron/" :depends-on '(swatchblade)) </code></pre> <p>Regarding tests, you can add another namespace in package.lisp for your tests:</p> <pre><code> (defpackage #:swatchblade-tests (:use #:cl #:swatchblade)) </code></pre> <p>Create a test file, write the code, and add the file to the system definition:</p> <pre><code>(asdf:defsystem #:swatchblade :serial t :depends-on (#:vecto #:hunchentoot #:cl-colors) :components ((:file "package") (:file "swatchblade") (:file "swatchglade-tests"))) </code></pre> <p>Load the <strong>swatchblade-tests</strong> namespace to run the tests.</p> <p><a href="https://github.com/paradigmshift/my-tools">Sample project with tests here</a></p> <p>If you want to avoid Quicklisp installing all dependencies into the system, you'll have to install the dependencies and load the system manually as far as I know.</p> <p>The author of Quicklisp, Zach Beane, has a more detailed post on <a href="http://xach.livejournal.com/278047.html">using quickproject</a>. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload