mirror of https://github.com/status-im/reagent.git
Merge pull request #483 from reagent-project/feature/codecov
Feature/codecov
This commit is contained in:
commit
0e1e4179ec
|
@ -15,3 +15,4 @@ reagent.iml
|
|||
node_modules
|
||||
junit
|
||||
.shadow-cljs
|
||||
coverage/
|
||||
|
|
20
README.md
20
README.md
|
@ -1,7 +1,10 @@
|
|||
<img src="logo/logo-text.png" width="264px" alt="Reagent">
|
||||
|
||||
# Reagent
|
||||
|
||||
![Reagent-Project](logo.png)
|
||||
[![CircleCI](https://circleci.com/gh/reagent-project/reagent.svg?style=svg)](https://circleci.com/gh/reagent-project/reagent)
|
||||
[![Clojars Project](https://img.shields.io/clojars/v/clj-kondo.svg)](https://clojars.org/clj-kondo)
|
||||
[![codecov](https://codecov.io/gh/reagent-project/reagent/branch/master/graph/badge.svg)](https://codecov.io/gh/reagent-project/reagent)
|
||||
[![cljdoc badge](https://cljdoc.org/badge/reagent/reagent)](https://cljdoc.org/d/reagent/reagent/CURRENT)
|
||||
[![project chat](https://img.shields.io/badge/slack-join_chat-brightgreen.svg)](https://clojurians.slack.com/archives/C0620C0C8)
|
||||
|
||||
A simple [ClojureScript](http://github.com/clojure/clojurescript) interface to [React](http://facebook.github.io/react/).
|
||||
|
||||
|
@ -17,10 +20,8 @@ Reagent provides a way to write efficient React components using (almost) nothin
|
|||
* **[#reagent](https://clojurians.slack.com/messages/reagent/)** channel in [Clojure Slack](http://clojurians.net/)
|
||||
* **[Reagent Project Mailing List](https://groups.google.com/forum/#!forum/reagent-project)**
|
||||
* **Commercial video material**
|
||||
* [Learn Reagent Free](https://www.jacekschae.com/learn-reagent-free/tycit?coupon=REAGENT)
|
||||
* [Learn Reagent Pro](https://www.jacekschae.com/learn-reagent-pro/tycit?coupon=REAGENT) (Affiliate link, $30 discount)
|
||||
* [Learn Re-frame Free](https://www.jacekschae.com/learn-re-frame-free/tycit?coupon=REAGENT)
|
||||
* [Learn Re-frame Pro](https://www.jacekschae.com/learn-re-frame-pro/tycit?coupon=REAGENT) (Affiliate link, $30 discount)
|
||||
* [Learn Reagent Free](https://www.jacekschae.com/learn-reagent-free/tycit?coupon=REAGENT), [Learn Reagent Pro](https://www.jacekschae.com/learn-reagent-pro/tycit?coupon=REAGENT) (Affiliate link, $30 discount)
|
||||
* [Learn Re-frame Free](https://www.jacekschae.com/learn-re-frame-free/tycit?coupon=REAGENT), [Learn Re-frame Pro](https://www.jacekschae.com/learn-re-frame-pro/tycit?coupon=REAGENT) (Affiliate link, $30 discount)
|
||||
* [purelyfunctional.tv ](https://purelyfunctional.tv/guide/reagent/)
|
||||
* [Lambda Island Videos](https://lambdaisland.com/collections/react-reagent-re-frame)
|
||||
|
||||
|
@ -39,7 +40,6 @@ This will setup a new Reagent project with some reasonable defaults, see here fo
|
|||
To use Reagent in an existing project you add this to your dependencies in `project.clj`:
|
||||
|
||||
[![Clojars Project](http://clojars.org/reagent/latest-version.svg)](http://clojars.org/reagent) <br>
|
||||
[![CircleCI](https://circleci.com/gh/reagent-project/reagent.svg?style=svg)](https://circleci.com/gh/reagent-project/reagent)
|
||||
|
||||
This is all you need to do if you want the standard version of React. If you want to use your own build of React (or React from a CDN), you have to use `:exclusions` variant of the dependency, and also provide `react` and `react-dom` namespaces (by creating `.cljs` files with just `ns` form, or by adding your own `:foreign-libs` entries).
|
||||
|
||||
|
@ -164,9 +164,9 @@ The ClojureScript overhead is kept down, thanks to lots of caching.
|
|||
|
||||
Code size is a little bigger than React.js, but still quite small. The todomvc example clocks in at roughly 79K gzipped, using advanced compilation.
|
||||
|
||||
|
||||
## About
|
||||
|
||||
The idea and some of the code for making components atom-like comes from [pump](https://github.com/piranha/pump). The reactive-atom idea (and some code) comes from [reflex](https://github.com/lynaghk/reflex).
|
||||
The idea and some of the code for making components atom-like comes from [pump](https://github.com/piranha/pump).
|
||||
The reactive-atom idea (and some code) comes from [reflex](https://github.com/lynaghk/reflex).
|
||||
|
||||
The license is MIT.
|
||||
|
|
|
@ -23,6 +23,9 @@ jobs:
|
|||
paths:
|
||||
- node_modules
|
||||
key: reagent-npm-{{ checksum "package.json" }}
|
||||
- store_artifacts:
|
||||
path: coverage
|
||||
- run: bash <(curl -s https://codecov.io/bash)
|
||||
|
||||
environment:
|
||||
NPM_CONFIG_LOGLEVEL: warn
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="264"
|
||||
height="64"
|
||||
version="1.1"
|
||||
id="svg14"
|
||||
sodipodi:docname="logo-text.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
inkscape:export-filename="/home/juho/Source/reagent/logo-text.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96">
|
||||
<metadata
|
||||
id="metadata20">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs18" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="2040"
|
||||
inkscape:window-height="1574"
|
||||
id="namedview16"
|
||||
showgrid="false"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:zoom="2.6074563"
|
||||
inkscape:cx="88.773946"
|
||||
inkscape:cy="-26.258751"
|
||||
inkscape:window-x="565"
|
||||
inkscape:window-y="304"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg14">
|
||||
<sodipodi:guide
|
||||
position="64,18.983051"
|
||||
orientation="1,0"
|
||||
id="guide4546"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="96,57.898305"
|
||||
orientation="1,0"
|
||||
id="guide4548"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
</sodipodi:namedview>
|
||||
<path
|
||||
d="M 5.375,5.375 H 58.624 V 58.624 H 5.375 Z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="stroke:#000000;stroke-width:10.7510004;stroke-linejoin:round;paint-order:markers fill stroke" />
|
||||
<path
|
||||
d="m 16.734,59.233 h 30.532 c 1.857,0 3.134,-0.5 3.714,-1.4 0.58,-1 0.465,-2.1 -0.58,-3.5 l -13.35,-18.1 v -9.1 h 1.741 c 0.465,0 0.813,-0.1 1.161,-0.4 0.348,-0.3 0.464,-0.6 0.464,-1 0,-0.4 -0.116,-0.7 -0.464,-1 -0.348,-0.3 -0.696,-0.4 -1.16,-0.4 H 25.208 c -0.465,0 -0.813,0.1 -1.161,0.4 -0.348,0.3 -0.464,0.6 -0.464,1 0,0.4 0.116,0.7 0.464,1 0.348,0.3 0.696,0.4 1.16,0.4 h 1.742 v 9.1 l -13.35,18.1 c -1.045,1.4 -1.16,2.5 -0.58,3.5 0.696,0.9 1.973,1.4 3.714,1.4 z m 13.118,-21.5 0.58,-0.7 v -9.9 H 33.8 v 9.9 l 0.58,0.7 13.467,18.6 H 16.502 Z"
|
||||
id="path4"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#303c3c" />
|
||||
<path
|
||||
d="m 35.889,42.633 h -7.778 l -9.055,12.6 H 45.06 Z"
|
||||
id="path6"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#00d8ff" />
|
||||
<path
|
||||
d="m 32.5576,19.876749 a 2.8749338,2.808662 0 1 1 -5.749303,0 2.8749338,2.808662 0 1 1 5.749303,0 z"
|
||||
id="path8"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#00d8ff;stroke:#00d8ff;stroke-width:0.55827206" />
|
||||
<path
|
||||
d="m 37.217,12.657 a 2.325,2.325 0 1 1 -4.65,0 2.325,2.325 0 1 1 4.65,0 z"
|
||||
id="path10"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#00d8ff;stroke:#00d8ff;stroke-width:0.45699999" />
|
||||
<path
|
||||
d="m 31.676,6.053 a 1.1705,1.1705 0 1 0 -2.341,0 1.1705,1.1705 0 1 0 2.341,0 z"
|
||||
id="path12"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#00d8ff;stroke:#00d8ff;stroke-width:0.23" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:40px;line-height:125%;font-family:Lato;-inkscape-font-specification:Lato;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="92.580002"
|
||||
y="42.77"
|
||||
id="text4544"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan4542"
|
||||
x="92.580002"
|
||||
y="42.77"
|
||||
style="font-style:normal;font-variant:normal;font-weight:600;font-stretch:normal;font-family:Lato;-inkscape-font-specification:'Lato Semi-Bold'">Reagent</tspan></text>
|
||||
</svg>
|
After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
File diff suppressed because it is too large
Load Diff
|
@ -11,10 +11,12 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"gzip-size-cli": "3.0.0",
|
||||
"karma": "3.1.1",
|
||||
"karma-chrome-launcher": "2.2.0",
|
||||
"karma": "4.4.1",
|
||||
"karma-chrome-launcher": "3.1.0",
|
||||
"karma-cljs-test": "0.1.0",
|
||||
"karma-junit-reporter": "1.2.0",
|
||||
"karma-coverage": "https://github.com/karma-runner/karma-coverage.git#55aeead0934a39efbd9db0b575d416ab44cd8a12",
|
||||
"karma-junit-reporter": "2.0.1",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
"md5-file": "4.0.0",
|
||||
"shadow-cljs": "2.8.83"
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
rm -rf target/cljsbuild/test/
|
||||
lein doo chrome-headless test once
|
||||
COVERAGE=1 lein doo chrome-headless test once
|
||||
test -f target/cljsbuild/test/out/cljsjs/react/development/react.inc.js
|
||||
|
|
|
@ -24,5 +24,23 @@ module.exports = function(config) {
|
|||
useBrowserName: false // add browser name to report and classes names
|
||||
};
|
||||
|
||||
if (process.env.COVERAGE) {
|
||||
configData.reporters = ['dots', 'junit', 'coverage'];
|
||||
|
||||
configData.preprocessors = {
|
||||
'target/cljsbuild/test/out/reagent/**/!(*_test).js': ['sourcemap', 'coverage'],
|
||||
};
|
||||
|
||||
configData.coverageReporter = {
|
||||
reporters: [
|
||||
{type: 'html'},
|
||||
{type: 'lcovonly'},
|
||||
],
|
||||
dir: 'coverage',
|
||||
subdir: '.',
|
||||
includeAllSources: true,
|
||||
};
|
||||
}
|
||||
|
||||
config.set(configData);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue