* Implement noms-view and make splore compatible
* Comments
* npm test
* Fewer changes to readme/build/etc
* comment in noms_view.go
* More updates
* Typo
When the version in js/package.json is updated, publish a new version.
This does not yet do the actual publish. If this works it will be
updated in a later commit.
Issue #1200
This reverts commit af72024d35.
The computed version number is not good because `git log` does not
contain the full history so the number of rows is wrong.
This computes a new version based on the number of changes to the
js directory.
This does not yet actually publish the new version. I need to see how
Travis behaves before I can do that.
Towards #1200
type.js no longer exports makePrimitiveType. It is recommended to use
the type constants directly. There are a few cases where we had a
NomsKind and needed a Type. For those cases there is now a
getPrimitiveType but it is not exported by noms.
Fixes#1168
Now the generated code is tested and most things work.
To generate a .noms.js file use the codegen go binary
Things that are not complete/needs improvements include:
- Recursive structs
- Structs with annonymous unions
- Enum -- constants for the values
Issue #1081
This generates a flow type for enums:
```noms
enum Handedness {
right
left
switch
}
```
Generates
```js
type E =
0 | // right
1 | // left
2; // switch
```
Issue #1081
This patch removes the special RemoteDataStore implementation of
CopyReachableChunksP, as this is seldom-used and adds complexity
that stands in the way of Issue 654
The decoder now generates a class for a struct. Given:
```noms
struct MyStruct {
x: Int8
s: optional String
}
```
the generated class looks something like this:
```js
class MyStruct extends Struct {
get x(): int8 { ... }
setX(value: int8): MyStruct { ... }
get s(): ?string { ... }
setS(value: ?string): MyStruct { ... }
}
```
The base class `Struct` has nothing on it (except chunks). It
usefull in cases where a generic struct is wanted.
To reflect on Structs we introduce StructMirror.
This also means that Commit is now a real ~~boy~~type.
This does not yet handle Defs.
Towards #1157