Skip to content

Call for sponsors #291

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 29, 2016
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 41 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,46 @@
# Contributing to JSPerf

## Submitting a Pull Request
Submit a pull request to `master` with passing tests (`npm test`) and properly [styled](https://github.com/Flet/semistandard) code. [Rebase](https://git-scm.com/docs/git-rebase) as needed.

* Make all changes in a *new* branch of `master`, e.g., `feature/new-logo`
* Follow all coding rules below
* Ensure all tests are passing (`npm test`)
* In GitHub send a pull request to "jsperf:master"
* If we suggest changes, always re-run tests after completing those changes
* Rebase feature branches as needed (do not merge)
## Building the client

## Coding Rules
If you make any changes inside [`client/`](https://github.com/jsperf/jsperf.com/tree/master/client), then you'll need to manually re-build the final asset.

These guidelines help keep the codebase consistent.
* All features or bugs must be tested
* Code coverage shall remain at 100% after any new feature or bug fix
* Code should pass ESLint which follows the [semistandard style](https://github.com/Flet/semistandard)
```
npm run build
```

## Testing

We use [lab](https://github.com/hapijs/lab) as our test utility and [code](https://github.com/hapijs/code) as our assertion library. Lab lints with [eslint](http://eslint.org/) using the [semistandard style](https://github.com/Flet/semistandard). 100% code coverage by unit tests is required. To run the test suite:

```
npm test
```

_If you want to only lint and save a little time, use `npm run lint` which skips the tests._

_If you are missing code coverage, open `coverage.html` in the root of the project for a detailed visual report._

## Adding new dependencies

1. Install using `npm` and either `--save` or `--save-dev`. **Do not edit `package.json` manually.**
2. Run `npm shrinkwrap --dev` to update `npm-shrinkwrap.json`

If you get an error while shrinkwrapping, try pruning your `node_modules` directory by running `npm prune`. If that doesn't work, try removing what you have installed currently, reinstalling based on `package.json` instead of `npm-shrinkwrap.json`, and then shrinkwrap again.

```
rm -r node_modules/ && npm install --no-shrinkwrap && npm shrinkwrap --dev
```

### Greenkeeper

Greenkeeper [is working on updating `npm-shrinkwrap.json`](https://github.com/greenkeeperio/greenkeeper/issues/96). In the meantime, here is how [**@maxbeatty**](https://github.com/maxbeatty) has been shrinkwrapping the updates:

1. Get remote branch `git pull origin`
2. Checkout branch locally `git co greenkeeper-<package>-0.0.0`
3. Install updated dependency defined in `package.json` instead of `npm-shrinkwrap.json` `npm i --no-shrinkwrap`
4. Remove anything you no longer need `npm prune`
5. Shrinkwrap the updated dependency `npm shrinkwrap --dev`
6. Commit `git commit -am 'shrinkwrap updated dependency'`
7. Push so updated dependency is tested and Pull Request can be merged `git push origin greenkeeper-<package>-0.0.0`
51 changes: 2 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@ COOKIE_PASS=password-should-be-32-characters
# LOGGLY_SUBDOMAIN=
```

Lastly, create the necessary tables:

```
node setup/tables.js
```

### Start

- [x] correct version of `node`
Expand All @@ -63,47 +57,6 @@ node setup/tables.js
npm start
```

## Contributing

### Building the client

If you make any changes inside [`client/`](https://github.com/jsperf/jsperf.com/tree/master/client), then you'll need to manually re-build the final asset.

```
npm run build
```

### Testing

We use [lab](https://github.com/hapijs/lab) as our test utility and [code](https://github.com/hapijs/code) as our assertion library. Lab lints with [eslint](http://eslint.org/) using the [semistandard style](https://github.com/Flet/semistandard). 100% code coverage by unit tests is required. To run the test suite:

```
npm test
```

_If you want to only lint and save a little time, use `npm run lint` which skips the tests._

_If you are missing code coverage, open `coverage.html` in the root of the project for a detailed visual report._

### Adding new dependencies

1. Install using `npm` and either `--save` or `--save-dev`. **Do not edit `package.json` manually.**
2. Run `npm shrinkwrap --dev` to update `npm-shrinkwrap.json`

If you get an error while shrinkwrapping, try pruning your `node_modules` directory by running `npm prune`. If that doesn't work, try removing what you have installed currently, reinstalling based on `package.json` instead of `npm-shrinkwrap.json`, and then shrinkwrap again.

```
rm -r node_modules/ && npm install --no-shrinkwrap && npm shrinkwrap --dev
```

#### Greenkeeper

Greenkeeper [is working on updating `npm-shrinkwrap.json`](https://github.com/greenkeeperio/greenkeeper/issues/96). In the meantime, here is how **@maxbeatty** has been shrinkwrapping the updates:
## Sponsorship

1. Get remote branch `git pull origin`
2. Checkout branch locally `git co greenkeeper-<package>-0.0.0`
3. Install updated dependency defined in `package.json` instead of `npm-shrinkwrap.json` `npm i --no-shrinkwrap`
4. Remove anything you no longer need `npm prune`
5. Shrinkwrap the updated dependency `npm shrinkwrap --dev`
6. Commit `git commit -am 'shrinkwrap updated dependency'`
7. Push so updated dependency is tested and Pull Request can be merged `git push origin greenkeeper-<package>-0.0.0`
Development of [jsperf.com](https://jsperf.com) is generously supported by contributions from individuals and corporations. If you are benefiting from jsPerf and would like to help keep the project financially sustainable, please visit [https://jsperf.com/sponsor](https://jsperf.com/sponsor).
11 changes: 11 additions & 0 deletions SPONSORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Sponsors

[Learn how to become a sponsor.](https://jsperf.com/sponsor)

## Leaders

-

## Supporters

-
13 changes: 12 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const insert = require('gulp-insert');
const remoteSrc = require('gulp-remote-src');
const replace = require('gulp-replace');
// const uglify = require('gulp-uglify');
const cleanCSS = require('gulp-clean-css');
const rename = require('gulp-rename');

const BENCHMARKJS_VERSION = require('./package.json').devDependencies.benchmark;

Expand Down Expand Up @@ -84,4 +86,13 @@ gulp.task('js', function () {
.pipe(gulp.dest('./public/_js/'));
});

gulp.task('default', ['js']);
gulp.task('css', function () {
return gulp.src('public/_css/main.src.css')
.pipe(cleanCSS({
rebase: false
}))
.pipe(rename('main.css'))
.pipe(gulp.dest('public/_css/'));
});

gulp.task('default', ['js', 'css']);
2 changes: 2 additions & 0 deletions manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ var manifest = {
{ plugin: './server/web/redirects' },
{ plugin: './server/web/search' },
{ plugin: './server/web/sitemap/xml' },
{ plugin: './server/web/sponsor' },
{ plugin: './server/web/test' },
{ plugin: './server/web/testimonials' },
{ plugin: './server/web/edit' },
{ plugin: './server/web/delete' }
]
Expand Down
46 changes: 46 additions & 0 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@
"eslint-plugin-standard": "2.0.1",
"gulp": "3.9.1",
"gulp-add-src": "0.2.0",
"gulp-clean-css": "^2.3.2",
"gulp-concat": "^2.6.1",
"gulp-insert": "0.5.0",
"gulp-remote-src": "0.4.1",
"gulp-rename": "^1.2.2",
"gulp-replace": "0.5.4",
"gulp-uglify": "2.0.0",
"lab": "^11.2.0",
Expand Down
Loading