1
votes

I'm developing a ClojureScript library, which is intended to be used in a browser environment.

So obviously there will be additional source files during development and testing. How can this be separated from the library source?

Is there a way to mark some sources as just for testing purpose which would be omitted when installing / deploying the project?

Additionally the resources folder, which contains some HTML files (etc.), should not be included when publishing as well.

1

1 Answers

0
votes

In your build.boot put only those files that you want in your final build to :source-paths.

Add your test files only when defining a test-setup task like this:

(deftask test-setup []
  (merge-env! :source-path #{"dir_with_tests"})
  indentity)

And use it in your boot test task:

(deftask test []
  (comp
    (test-setup)
    (your-test-task)))