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

[Preact] #719

Merged
merged 3 commits into from Nov 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions preact/README.md
@@ -0,0 +1,21 @@
# cljsjs/preact

[](dependency)
```clojure
[cljsjs/preact "6.0.0-beta"] ;; latest release
```
[](/dependency)

This jar comes with `deps.cljs` as used by the [Foreign Libs][flibs] feature
of the Clojurescript compiler. After adding the above dependency to your project
you can require the packaged library like so:


```clojure
(ns your-ns
(:require [cljsjs.preact]))

```


[flibs]: https://github.com/clojure/clojurescript/wiki/Packaging-Foreign-Dependencies
31 changes: 31 additions & 0 deletions preact/build.boot
@@ -0,0 +1,31 @@

(set-env!
:resource-paths #{"resources"}
:dependencies '[[cljsjs/boot-cljsjs "0.5.2" :scope "test"]])

(require '[cljsjs.boot-cljsjs.packaging :refer :all])

(def +lib-version+ "6.0.0")
(def +version+ (str +lib-version+ "-beta"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use -0 instead of -beta as suffix.


(task-options!
pom {:project 'cljsjs/preact
:version +version+
:description "Preact is a fast, 3kb alternative to React, with the same ES2015 API."
:url "https://preactjs.com"
:scm {:url "https://github.com/developit/preact"}
:license {"MIT" "http://opensource.org/licenses/MIT"}})


(deftask package []
(comp
(download :url (str "https://cdnjs.cloudflare.com/ajax/libs/preact/" +lib-version+ "/preact.js")
:checksum "03d2993b692643a21b0fc25cae936533")
(download :url (str "https://cdnjs.cloudflare.com/ajax/libs/preact/" +lib-version+ "/preact.min.js")
:checksum "23d3be42e4b4c25b76f7ac88f976eccb")
(sift :move {#"preact\.js" "cljsjs/preact/development/preact.inc.js"
#"preact\.min\.js" "cljsjs/preact/development/preact.min.inc.js"})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be cljsjs/preact/production/preact.min.inc.js 👍

(sift :include #{#"^cljsjs"})
(deps-cljs :name "cljsjs.preact")
(pom)
(jar)))
21 changes: 21 additions & 0 deletions preact/resources/cljsjs/preact/common/preact.ext.js
@@ -0,0 +1,21 @@
/**********************************************************************
* Extern for preact
* Generated by http://jmmk.github.io/javascript-externs-generator
**********************************************************************/
var preact = {
"h": function () {},
"cloneElement": function () {},
"Component": function () {},
"render": function () {},
"rerender": function () {},
"options": {}
};
preact.Component.prototype = {
"linkState": function () {},
"setState": function () {},
"forceUpdate": function () {},
"render": function () {}
};
/**********************************************************************
* End Generated Extern for preact
/**********************************************************************/