flexyford / impagination

A lazy data layer for your paged records
102 stars 7 forks source link

Extract ember-impagination core to an NPM package #1

Closed cowboyd closed 8 years ago

cowboyd commented 9 years ago

This follows the template for es6 NPM packages laid out by https://github.com/benjamn/jsnext-skeleton for distribution of npm packages that contain both ES6 and commonjs modules.

The touch is super-lightweight, and it's much more clear what's going on. Source files are in src/, where they can be included into an es6 build like ember-cli's. To run the tests:

$ npm test

~~The tests are still failing, primarily because they depend on ember-cli mirage, so we need to figure out a way to mock the server that doesn't depend on it. Maybe using Faker directly?~~

I've migrated most of the testcases to use a simulated server that allows you to control when page requests are resolved and rejected, but about 1/3 of them remain to be converted.