Skip to content
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

[WIP] Port to ES2016, Refactor & Enhancements #55

Open
wants to merge 65 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
699a681
update syntax and build commands to es2015
zspecza Dec 8, 2015
f166670
broken syntax fixes
zspecza Dec 8, 2015
7a82fd8
get sort tests passing
zspecza Dec 9, 2015
5ae47c1
remove unneccessary files, update README, LICENSE and contributors, c…
zspecza Dec 9, 2015
b58d57f
update contributing.md
zspecza Dec 9, 2015
42c51ee
Merge pull request #1 from declandewet/es2015
zspecza Dec 9, 2015
2b204cf
0.0.9
zspecza Dec 9, 2015
749aad8
update test to minimum required es6 syntax for easier lib refactoring
zspecza Dec 10, 2015
62d2625
Merge pull request #2 from declandewet/update_tests
zspecza Dec 10, 2015
242ba56
point to existing roots-contentful
zspecza Dec 10, 2015
edf3020
Merge pull request #3 from declandewet/update_package
zspecza Dec 10, 2015
eba2565
Merge branch 'master' of https://github.com/carrot/roots-contentful
zspecza Dec 10, 2015
fb3a7cc
Merge pull request #52 from declandewet/master
zspecza Dec 10, 2015
3f3550b
modular file structure
zspecza Dec 11, 2015
88891d4
add linting, pre-commit linting, pre-test linting, pre-build testing
zspecza Dec 11, 2015
92d1875
remove risky unbuild step
zspecza Dec 11, 2015
52a44b3
document programming style
zspecza Dec 11, 2015
d54cf15
add notes on debugging requests - closes #47
zspecza Dec 11, 2015
ce0006b
move description to top of readme
zspecza Dec 11, 2015
be06374
improve publish workflow
zspecza Dec 12, 2015
eec8ba7
replace dependance on when.js with native es2016 constructs
zspecza Dec 14, 2015
9fcd043
add when.js to package.json for use in tests
zspecza Dec 14, 2015
3f66c53
convert to use underscore.string
zspecza Dec 14, 2015
33400b6
bump test timeout to larger epoch
zspecza Dec 14, 2015
2be1be6
remove runtime dependency on lodash, slight syntax improvements
zspecza Dec 16, 2015
f0cfbdb
add caching and test case for multiple compiles using roots.watch - c…
zspecza Dec 18, 2015
a92576b
begin porting tests to AVA
zspecza Dec 23, 2015
16ce55e
remove superflous package.json details, get tests running
zspecza Jan 5, 2016
621fef0
switch to nyc code coverage
zspecza Jan 5, 2016
ae7bfcf
remove superfluous babel-register
zspecza Jan 5, 2016
c65efee
better commonjs interoperability
zspecza Jan 5, 2016
c9a5bb7
externalize helpers
zspecza Jan 5, 2016
483148e
port basic-compile and config tests
zspecza Jan 5, 2016
63c7127
port data-manipulation, json and content type tests
zspecza Jan 6, 2016
8ad22f9
port single-entry-views & custom-name tests
zspecza Jan 6, 2016
71b3268
lifecycle cleanup
zspecza Jan 6, 2016
cf06e22
update make tasks
zspecza Jan 6, 2016
79b5fdd
document lifecycle changes, add request debugging to debug-test task
zspecza Jan 6, 2016
70ec7a5
begin test performance improvements
zspecza Jan 6, 2016
343a6f6
improve test performance
zspecza Jan 6, 2016
e83f3af
assert error messages
zspecza Jan 7, 2016
83097c8
fix flaky coverage commands
zspecza Jan 7, 2016
528f64d
re-use error message variables in tests
zspecza Jan 7, 2016
0f13a3d
update ava, end class props with semicolon, ensure tests don't modify…
zspecza Jan 7, 2016
33d2e69
add missing test for asset helper else path
zspecza Jan 8, 2016
8b8ed73
remove redundant branch from asset helper
zspecza Jan 8, 2016
a86e219
update dependencies
zspecza Jan 12, 2016
af02cf3
use new roots-util async opts in tests
zspecza Jan 12, 2016
37bfd6c
enhance CI by caching deps
zspecza Jan 20, 2016
877d935
add locales support
zspecza Jan 13, 2016
77991a7
performance improvements
zspecza Jan 21, 2016
4d06074
make tests temporarily serial, upgrade deps
zspecza Jan 21, 2016
6ad710a
update inline documentation
zspecza Jan 21, 2016
668887a
remove redundant test command from travis build pipeline
zspecza Jan 21, 2016
e93577e
ensure context, switch instrumentation to src
zspecza Jan 21, 2016
57ef89d
fix broken coverage
zspecza Jan 21, 2016
fef68e1
fix context references in compile_entries
zspecza Jan 21, 2016
6d12ea9
Merge pull request #64 from carrot/es2016-locales
zspecza Jan 21, 2016
61a7fb5
back-version dependency
zspecza Jan 21, 2016
0c2172f
improve oneline util so it passes coverage threshold
zspecza Jan 21, 2016
a8e1a0f
add test for single entry _path helper
zspecza Jan 25, 2016
474b0a8
alias _url local as _path in single entries
zspecza Jan 25, 2016
76a75e4
Merge pull request #67 from carrot/path-helper
zspecza Jan 26, 2016
10fc87a
add test for caching
zspecza Jan 27, 2016
995662d
allow overriding of include option
zspecza Jan 27, 2016
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
5 changes: 5 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"presets": ["es2015-node5", "stage-0"],
"plugins": ["add-module-exports", "transform-runtime"],
"sourceMaps": "inline"
}
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
.DS_Store
node_modules
coverage
src
lib
logs
*.log
npm-debug.log*
pids
*.pid
*.seed
lib-cov
.grunt
.lock-wscript
build/Release
.nyc_output
test/fixtures/*/public
2 changes: 2 additions & 0 deletions .istanbul.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
instrumentation:
root: src
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
test
src
.travis.yml
.istanbul.yml
.editorconfig
.babelrc
wallaby.js
Makefile
.nyc_output
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
language: node_js
node_js:
- "0.10"
- "5"
after_script:
- npm run coveralls
sudo: false
cache:
directories:
- node_modules
23 changes: 16 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
build:
cp -R lib src
./node_modules/.bin/coffee -c lib
find lib -iname "*.coffee" -exec rm '{}' ';'
npm run build

unbuild:
rm -rf lib
mv src lib
coverage::
npm run coverage

coveralls:
NODE_ENV=test istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
npm run coveralls

release:
npm run release

lint:
npm run lint

debug-test:
npm run debug-test

test::
npm test
80 changes: 75 additions & 5 deletions contributing.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# Contributing to Roots-contentful
# Contributing to `roots-contentful`

Hello there! First of all, thanks for being interested in this project and helping out. We all think you are awesome, and by contributing to open source projects, you are making the world a better place. That being said, there are a few ways to make the process of contributing code to this project smoother, detailed below:

Expand All @@ -14,15 +14,85 @@ If you are opening an issue about a bug, make sure that you include clear steps
- Run `npm install`
- Put in work

### Testing
### `pre-commit` Linting

This project is constantly evolving, and to ensure that things are secure and working for everyone, we need to have tests. If you are adding a new feature, please make sure to add a test for it. The test suite for this project uses [mocha](http://visionmedia.github.io/mocha/) and [should](https://github.com/visionmedia/should.js/)/
Provided dependencies are installed, `git commit` will
not work unless this project passes a linting check.

To run the test suite, make sure you have installed mocha (`npm install mocha -g`), then you can use the `npm test` or simply `mocha` command to run the tests.
### Build Commands

> **Note:** if your environment does not support `make` utilities,
> replace `make` with `npm run` when you type a build command.

#### Testing

This project is constantly evolving, and to ensure that things are secure and working for everyone, we need to have tests. If you are adding a new feature, please make sure to add a test for it. The test suite for this project uses [AVA](https://github.com/sindresorhus/ava).

To lint the source:

```shell
$ make lint
```

To lint the source and run the tests:

```shell
$ make test
```

By default, tests will run concurrently/in parallel. When debugging, this can sometimes lead to unwanted behavior. For this reason, there is a `debug-test` command that will fail as soon as the first test fails, run tests serially, enable more verbose output and also log any HTTP requests:

```shell
$ make debug-test
```

To create a coverage report:

```shell
$ make coverage
```

To feed a coverage report to coveralls:

```shell
$ make coveralls
```

#### Building

> **Note:** Building the project will not work if any of the tests fail.

Building involves compiling the ES2016 syntax down to
regular ES5 using [Babel](http://babeljs.io). This command will run the tests - on success it will then compile the contents of `src/` into `lib/`.

```shell
$ make build
```

#### Publishing to NPM

This command will lint the project files, run the tests, build the project, publish the build to NPM and then perform a `git push --follow-tags`.

```shell
$ make release
```

A typical publish workflow might look something like this:

```shell
$ git checkout Fix/bug-fix
# add some code...
$ git add .
$ git commit -m "fixed a bug"
$ git checkout master
$ git merge Fix/bug-fix
$ npm version patch
$ make release
```

### Code Style

To keep a consistant coding style in the project, we're using [Polar Mobile's guide](https://github.com/polarmobile/coffeescript-style-guide), with one difference begin that much of this project uses `under_scores` rather than `camelCase` for variable naming. For any inline documentation in the code, we're using [JSDoc](http://usejsdoc.org/).
To keep a consistent coding style in the project, we're using [JavaScript Standard Style](https://github.com/feross/standard), with one difference being that much of this project uses `under_scores` rather than `camelCase` for variable naming. For any inline documentation in the code, we're using [JSDoc](http://usejsdoc.org/).

### Commit Cleanliness

Expand Down
Loading