Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f3d2471
commit 7ed5cde
Showing
11 changed files
with
610 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
##v0.1.0 (2016.07.XX) | ||
|
||
Initial code drop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Contributing to re-frame-async-flow-fx | ||
|
||
Thank you for taking the time to contribute! | ||
|
||
## Support questions | ||
|
||
The Github issues are for bug reports and feature requests only. Support requests and usage | ||
questions should go to the re-frame [Clojure Slack channel](http://clojurians.net) or | ||
the [ClojureScript mailing list](https://groups.google.com/forum/#!forum/clojurescript). | ||
|
||
|
||
## Pull requests | ||
|
||
**Create pull requests to the develop branch**, work will be merged onto master when it is ready to be released. | ||
|
||
## Running tests | ||
|
||
#### Via Browser/HTML | ||
|
||
To build the tests and run them in one step, just: | ||
```sh | ||
lein test-once # compiles & then opens test.html in the browser | ||
``` | ||
|
||
You can also get auto compiles via: | ||
```sh | ||
lein test-auto | ||
``` | ||
but you'll need to manually open `test/test.html` in a browser. And you'll also need to | ||
manually reload this page after each auto compile. | ||
|
||
#### Via Karma | ||
|
||
To run the tests, you must have recent versions of node, npm, Leiningen, and a C++ compiler toolchain installed. | ||
If you're on Linux or Mac OS X then you will be fine, if you're on Windows then you need to install | ||
Visual Studio Community Edition, and the C++ compiler dependencies. | ||
|
||
```sh | ||
lein deps # runs lein-npm, installs Karma & other node dependencies. Only needed the first time. | ||
lein karma-once # to build re-frame-async-flow-fx tests | ||
karma start # to run the tests with an auto watcher | ||
``` | ||
|
||
## Pull requests for bugs | ||
|
||
If possible provide: | ||
|
||
* Code that fixes the bug | ||
* Failing tests which pass with the new changes | ||
* Improvements to documentation to make it less likely that others will run into issues (if relevant). | ||
* Add the change to the Unreleased section of [CHANGES.md](CHANGES.md) | ||
|
||
## Pull requests for features | ||
|
||
If possible provide: | ||
|
||
* Code that implements the new feature | ||
* Tests to cover the new feature including all of the code paths | ||
* Docstrings for functions | ||
* Documentation examples | ||
* Add the change to the Unreleased section of [CHANGES.md](CHANGES.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
> Status: requires re-frame >= v0.8.0-alpha2 | ||
[![Clojars Project](https://img.shields.io/clojars/v/day8.re-frame/undo.svg)](https://clojars.org/day8.re-frame/undo) | ||
[![GitHub license](https://img.shields.io/github/license/Day8/re-frame-undo.svg)](license.txt) | ||
[![Circle CI](https://circleci.com/gh/Day8/re-frame-undo/tree/master.svg?style=shield&circle-token=:circle-ci-badge-token)](https://circleci.com/gh/Day8/re-frame-undo/tree/master) | ||
[![Circle CI](https://circleci.com/gh/Day8/re-frame-undo/tree/develop.svg?style=shield&circle-token=:circle-ci-badge-token)](https://circleci.com/gh/Day8/re-frame-undo/tree/develop) | ||
<!-- | ||
[![Sample Project](https://img.shields.io/badge/project-example-ff69b4.svg)](https://github.com/Day8/re-frame-undo/sample) | ||
--> | ||
|
||
## Undos in re-frame | ||
|
||
Herein a re-frame library which implements undo | ||
|
||
https://github.com/Day8/re-frame/wiki/Undo-&-Red | ||
|
||
## Quick Start Guide | ||
|
||
### Step 1. Add Dependency | ||
|
||
Add the following project dependency: | ||
[![Clojars Project](https://img.shields.io/clojars/v/day8.re-frame/undo.svg)](https://clojars.org/day8.re-frame/undo) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
dependencies: | ||
pre: | ||
- npm install karma-cli -g | ||
# To install Chrome 47. Remove once a new build environment comes out with this built in. | ||
- curl -L -o google-chrome.deb https://s3.amazonaws.com/circle-downloads/google-chrome-stable_current_amd64_47.0.2526.73-1.deb | ||
- sudo dpkg -i google-chrome.deb | ||
- sudo sed -i 's|HERE/chrome\"|HERE/chrome\" --disable-setuid-sandbox|g' /opt/google/chrome/google-chrome | ||
- rm google-chrome.deb | ||
cache_directories: | ||
- node_modules | ||
test: | ||
override: | ||
- lein karma-once | ||
- karma start --single-run --reporters junit,dots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module.exports = function (config) { | ||
var root = 'run/compiled/karma/test'; // same as :output-dir | ||
var junitOutputDir = process.env.CIRCLE_TEST_REPORTS || "run/compiled/karma/test/junit"; | ||
|
||
config.set({ | ||
frameworks: ['cljs-test'], | ||
browsers: ['Chrome'], | ||
files: [ | ||
root + '/../test.js', // same as :output-to | ||
{pattern: root + '/../test.js.map', included: false} | ||
], | ||
|
||
client: { | ||
args: ['day8.re_frame.async_flow_fx.test_runner.run_karma'] | ||
}, | ||
|
||
// the default configuration | ||
junitReporter: { | ||
outputDir: junitOutputDir + '/karma', // results will be saved as $outputDir/$browserName.xml | ||
outputFile: undefined, // if included, results will be saved as $outputDir/$browserName/$outputFile | ||
suite: '' // suite will become the package name attribute in xml testsuite element | ||
} | ||
}) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
(defproject day8.re-frame/undo "0.1.0" | ||
:description "A re-frame feature that implements undo" | ||
:license {:name "MIT"} | ||
:dependencies [[org.clojure/clojure "1.8.0"] | ||
[org.clojure/clojurescript "1.9.89"] | ||
[re-frame "0.8.0-alpha2"]] | ||
|
||
:profiles {:debug {:debug true} | ||
:dev {:dependencies [[karma-reporter "0.3.0"] | ||
[binaryage/devtools "0.7.2"]] | ||
:plugins [[lein-cljsbuild "1.1.3"] | ||
[lein-npm "0.6.2"] | ||
[lein-shell "0.5.0"]]}} | ||
|
||
:clean-targets [:target-path "run/compiled"] | ||
|
||
:resource-paths ["run/resources"] | ||
:jvm-opts ["-Xmx1g" "-XX:+UseConcMarkSweepGC"] | ||
:source-paths ["src"] | ||
:test-paths ["test"] | ||
|
||
:shell {:commands {"open" {:windows ["cmd" "/c" "start"] | ||
:macosx "open" | ||
:linux "xdg-open"}}} | ||
|
||
;; > lein deploy | ||
:deploy-repositories [["releases" {:sign-releases false :url "https://clojars.org/repo"}] | ||
["snapshots" {:sign-releases false :url "https://clojars.org/repo"}]] | ||
|
||
;; > lein release | ||
:release-tasks [["vcs" "assert-committed"] | ||
["change" "version" "leiningen.release/bump-version" "release"] | ||
["vcs" "commit"] | ||
["vcs" "tag" "v" "--no-sign"] | ||
["deploy"] | ||
["change" "version" "leiningen.release/bump-version"] | ||
["vcs" "commit"] | ||
["vcs" "push"]] | ||
|
||
:npm {:dependencies [[karma "1.0.0"] | ||
[karma-cljs-test "0.1.0"] | ||
[karma-chrome-launcher "0.2.0"] | ||
[karma-junit-reporter "0.3.8"]]} | ||
|
||
:cljsbuild {:builds [{:id "test" | ||
:source-paths ["test" "src"] | ||
:compiler {:output-to "run/compiled/browser/test.js" | ||
:source-map true | ||
:output-dir "run/compiled/browser/test" | ||
:optimizations :none | ||
:source-map-timestamp true | ||
:pretty-print true}} | ||
{:id "karma" | ||
:source-paths ["test" "src"] | ||
:compiler {:output-to "run/compiled/karma/test.js" | ||
:source-map "run/compiled/karma/test.js.map" | ||
:output-dir "run/compiled/karma/test" | ||
:optimizations :whitespace | ||
:main "re_frame_undo.test_runner" | ||
:pretty-print true}}]} | ||
|
||
:aliases {"test-once" ["do" "clean," "cljsbuild" "once" "test," "shell" "open" "test/test.html"] | ||
"test-auto" ["do" "clean," "cljsbuild" "auto" "test,"] | ||
"karma-once" ["do" "clean," "cljsbuild" "once" "karma,"]}) |
Oops, something went wrong.