Remove mentions of changesets from CONTRIBUTING.md

snap8
Peter Seibel 2022-03-14 18:07:13 -07:00
rodzic 938c01dd10
commit adc18ddd5e
1 zmienionych plików z 13 dodań i 50 usunięć

Wyświetl plik

@ -1,26 +1,16 @@
# How to contribute # How to contribute
Attached is the current development code base for BYOB4 a.k.a. Snap. It consists of Attached is the current development code base for Snap! (formerly known as BYOB4).
several JavaScript, HTML and text files, and while some of it may be functional It consists of several JavaScript, HTML and text files, and while some of it may
most parts will be in flux and subject to frequent, even fundamental modifications. be functional most parts will be in flux and subject to frequent, even fundamental
This document lays out a few simple guidelines ensuring that collaborative code modifications. This document lays out a few simple guidelines ensuring that
contribution works out. collaborative code contribution works out.
## Coding ## Coding
Please check your code frequently with JSLint, either at JSlint.com or
### Working with changesets via a locally installed jslint.
You'll often want to change or add code in existing JS files. Please don't. Instead
use a changeset. The way I always do it myself is to copy the empty `changeset.js`
file and rename it to something like `JensChangesToMorphic.js`.
Into this file I write all the functions I want to add to Morphic. If I want to
change a function in Morphic.js I copy it to the changeset and edit it there. Then
I always validate the changeset with JSLint.com.
Please check your code frequently with JSLint!
For our Snap code set JSLint's settings to: For our Snap code set JSLint's settings to:
@ -91,37 +81,11 @@ code chunks, therefore:
(don't worry, I'm not talking about formal UnitTest Suites or other BDSM software (don't worry, I'm not talking about formal UnitTest Suites or other BDSM software
fetishes, just about playing with what you're creating while you're doing it) fetishes, just about playing with what you're creating while you're doing it)
To test your changesets just add another line in the html stub file with your To test your changes locally, just open `index.html` in your browser.
changeset. Make sure to put your changeset **after** Morphic.js and Blocks.js and
whichever libraries are already included, so it'll actually get used.
In your changeset override the world's `customMorphs` function so it returns a
list of instances of your Morphs. For `Blocks.js` that code is:
```javascript
var BlockMorph;
var ScriptsMorph;
WorldMorph.prototype.customMorphs = function () {
var sm = new ScriptsMorph();
sm.setExtent(new Point(800, 600));
return [
new BlockMorph(),
sm
];
};
```
Just modify this code so it returns your list of sample Morphs instead of
`BlockMorph` and `ScriptsMorph` instances.
Once you've added this code to your changeset you can open your sample html file
in your browser, and you'll find your sample Morphs in the World's DEMO menu.
### Inspectors ### Inspectors
To actually test play with your Morphs you can right-click on them and open an To actually play with your Morphs you can right-click on them and open an
inspector on them. You can open more than one inspector on each object. The inspector on them. You can open more than one inspector on each object. The
inspector pretty much works the same as in Smalltalk. It even has an evaluation inspector pretty much works the same as in Smalltalk. It even has an evaluation
pane at the bottom, in which you can type in any JS code, mark it with your mouse pane at the bottom, in which you can type in any JS code, mark it with your mouse
@ -134,11 +98,10 @@ object.
### Source Code Mgmt ### Source Code Mgmt
The good thing about changesets is that you can continue working on them regardless Snap! is hosted on Github at https://github.com/jmoenig/Snap. You can make a fork
of new dev releases that happen in the meantime. When you feel you've got something via the Github "Fork" button and then create a PR by pushing a branch to your fork
that's finished just send me your changeset, and I'll work all the changesets into and then creating a PR against the master brancd of `jmoenig/Snap`. You can see
the Snap codebase and release another dev version. That way there will always (and current PRs here: https://github.com/jmoenig/Snap/pulls
frequently) be a harmonized common code base.
--- ---