Giter Site home page Giter Site logo

rudolf's Introduction

README

This project is built for use with the Carnap framework for teaching formal logic.

Usage

To use this script in an html page, you must have already included the Carnap script which globally defines Carnap and Carnap.checkIchikawaJenkinsSLTableau.

Then, somewhere below the script tag which imports Carnap, you add the imports for this project's javascript bundle and stylesheet. This example uses the files which are available on unpkg.

<script
  crossorigin
  src="https://unpkg.com/truth-tree/dist/lib.js"
  type="application/javascript"
></script>
<link rel="stylesheet" href="https://unpkg.com/truth-tree/dist/lib.css" />

Suppose we want to set up an exercise for a widget initialized with the initial formula set needed to prove "modus tollens". I'll put a div here which has the id "element-one", and then in a script tag, I'll call Rudolf.createTree with the appropriate arguments. The complete code needed to insert a truth-tree widget is, in full:

<div id="element-one">Widget one goes here.</div>
<script>
  ;<code type>Rudolf.createTree('element-one', "P->Q,~Q,~~P")</code>
</script>

We can do this multiple times on the same page as long as we use a different id each time.

<div id="element-two">Widget two goes here.</div>
<script>
  Rudolf.createTree('element-two', 'F\\/G,~G\\/H,~F,H->G')
</script>

Development Environment Setup

You can now run a development server with yarn start, which will automatically start a browser and open the app. It is also accessible by going to http://localhost:3000/Rudolf.

Run the Demo Page in Development Mode

yarn start

(from react-scripts) Runs the demo page in development mode. Open http://localhost:3000/Rudolf to view it in the browser.

The page will reload if you make edits. You will also see any lint errors in the console.

Deploy demo to Github Pages

yarn deploy

This uses the built-in build script from Create React App, which has been moved from build to build-demo. It is now only used for packaging up the demo page for gh-pages deployment.

Deploy library script to NPM and UNPKG

If you have publish access on NPM, you can publish the module. (This is separate from contributor access to this github repo.)

yarn publish

The prepublish script, yarn build-lib, runs before publish automatically.

Run Tests

yarn test

Launches the test runner in the interactive watch mode. See the section about running tests for more information.

Acknowledgements

Rudolf has been developed under the auspices of the Department of Philosophy at the University of British Columbia.

This project was bootstrapped with Create React App. Some of the available commands come from that scaffold.

rudolf's People

Contributors

mctano avatar mbecker20 avatar kylemas avatar holymiracle avatar dependabot[bot] avatar lf- avatar orbit-stabilizer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.