Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Commit

Permalink
updates environment
Browse files Browse the repository at this point in the history
  • Loading branch information
davelandry committed Jul 8, 2019
1 parent 66c52a4 commit 744c655
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 13 deletions.
11 changes: 1 addition & 10 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,7 @@
],
"quotes": 2,
"radix": 2,
"require-jsdoc": [
1,
{
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true
}
}
],
"require-jsdoc": 2,
"require-yield": 2,
"semi": 2,
"semi-spacing": 2,
Expand Down
57 changes: 56 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ And that's it! Now your environment should be all set up and ready to go.

## Writing Code

With the introduction of modules in D3plus 2.0, all code is transpiled using [buble](http://buble.surge.sh/), which allows usage of most of the good bits from ES6. If you are unfamiliar with ES6, then normal vanilla javascript works fine as well (but we may suggest PR revisions to include more succinct ES6). All source code lives in the `./src` directory.
With the introduction of modules in D3plus 2.0, all code is transpiled using [babel](https://babeljs.io/), which allows usage of most of the good bits from ES6. If you are unfamiliar with ES6, then normal vanilla javascript works fine as well (but we may suggest PR revisions to include more succinct ES6). All source code lives in the `./src` directory.

## Code Style

Expand Down Expand Up @@ -67,6 +67,28 @@ npm test
```
> This command will also lint all files according to the provided `.eslintc` file.
D3plus uses [zora](https://github.com/lorenzofox3/zora) for running tests, and [tape-run](https://github.com/juliangruber/tape-run) for outputting the results. Here is an example of what a test file could look like:

```js
import {test} from "zora";

test("testing booleans", assert => {

assert.equal(true, true, "testing true");
assert.equal(false, false, "testing false");

});

test("testing numbers", assert => {

assert.equal(1, 1, "testing 1");
assert.equal(2, 2, "testing 2");

});

export default test;
```

## Examples

All D3plus 2.0 examples seen on [d3plus.org](https://d3plus.org) are created from within their respective repositories. The examples are parsed from any markdown files placed in the `./example` directory, with the following behaviors:
Expand Down Expand Up @@ -106,6 +128,39 @@ A screenshot of each example is generated from the rendered HTML. By default, ea
[height]: 100
```

Adding all that together, here is a sample of what a full example could look like:

`````md
[width]: 100
[height]: 100

# A Cool Red Square

In this example, we show you how to add a red square to a webpage!

```html
<div id="container"></div>
```

Wow, look at that container element. Such beauty.

```css
#container > div {
background-color: red;
height: 100px;
width: 100px;
}
```

CSS. Amazing. Now let's finish this off with some JavaScript!

```js
var box = document.createElement("div");
document.getElementById("container").appendChild(box);
```

`````

## Submitting a Pull Request

Push to your fork and [submit a pull request](https://github.com/d3plus/d3plus-form/compare/). At this point, you're waiting on us. We may suggest some changes or improvements or alternatives.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ addons:
packages:
- xvfb

before_install:
- echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
- sudo apt-get install ttf-mscorefonts-installer

install:
- export DISPLAY=':99.0'
- Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 D3plus
Copyright (c) 2019 D3plus

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,6 @@
"build/d3plus-form.js.map",
"build/d3plus-form.min.js",
"es"
]
],
"sideEffects": false
}

0 comments on commit 744c655

Please sign in to comment.