Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: Using edn file for Closure-defines or cljs-build configuration #478

Open
lxsameer opened this issue Oct 9, 2017 · 2 comments
Labels

Comments

@lxsameer
Copy link

lxsameer commented Oct 9, 2017

Hi.
In several different projects I had to use some sort of a build configuration for my cljs app to build it conditionally based on some data defined using closure-defines . But growth or this data caused a mess in my project.clj file and made my life hard.

I was thinking about adding a functionality to cljs-build plugin to support external configuration files. Either for all cljs-build configuration or just for closure-defines. So simply a configuration key with a file name or path as the value. The file should be in edn format and cljs-build should use the data inside that file and inject it to the built bundle.

I wanted to discuss this here before jumping in and implement the feature. What do you think folks?
There is a good chance that I miss something and there are a solution for this problem before.

@danielcompton
Copy link
Contributor

danielcompton commented Oct 9, 2017

Lein allows you to define and merge profiles, which seems like it would solve this problem, at least partially?

@lxsameer
Copy link
Author

lxsameer commented Oct 9, 2017

Yeah somehow. But the problem I'm having is about writing a library which need it's configuration in a file. So expecting my user to copy paste some code in his/her project.clj might not be as simple as having a file just one entry like :configuration-file :foo/bar. It would makes the library author easier.
Also I didn't mean clj build profiles. I mean cljs-build build profiles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants