Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion .config/karma.conf.js

This file was deleted.

64 changes: 0 additions & 64 deletions .config/karma.dev.js

This file was deleted.

18 changes: 10 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
"standard",
"promise"
],
"rules" : {
"semi" : [ "error", "always" ],
"rules": {
"semi": [ "error", "always" ],
"standard/object-curly-even-spacing": [2, "either"]
},
"globals" : {
"describe" : true,
"it" : true,
"window" : true,
"document" : true,
"expect" : true
"globals": {
"describe": true,
"it": true,
"window": true,
"document": true,
"expect": true,
"beforeEach": true,
"afterEach": true
}
}
14 changes: 13 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
language: node_js
cache:
directories:
- node_modules
notifications:
email: false
node_js:
- "6"
- '6'
env:
global:
- secure: "fpfC91ZOYl1LqyddVgsX17gPCr4yKkr1XpaheGdPK5FkZTzxrJqMxmmr/tjFPuhqjj6TUWX8K+Ts03M/PWDJTtxu6UXFAGPB+1ValiZDl49oW+i8bDpqMMyMMtfPs2fOK6Pn976PVH4UJzFjiu6oxMz0rVkuzWswCqV4NkR+4wV8PmoBC3lgsmyGINL+9cPeZG80FVp/KFYKo7Uvfj/jtDay1bAa+NtUat9wxUdj4CzmVuMtrfQHy4bWALTf/HKesTPVBO2hdgtwBL/sTNHfC5JOp4c126AgPZxoIb6v4FuAHFmmUG6/M67y0X80vwhD61EqnCcCjcWRAI2achq2BqhnVj07tDEI6TBpXb9hdVSw4RJG1UKZ5eJbHG0F/+PPDDqmBSqfhQpy4jY2u4w4s/2nVDLK4k0FErBVmyqAMxEfB/bewYq8mArNfGs5tU7bEdy7QXX8Fior7TpRh64pWFyj9+gAezPfqcLEQtmJlt7Ri3Ve/lV4Xyb9b/aoqKONCCJ4+EIwsp21KME7nScp9aKy0KCIYTSAirjk9NRdrG/qBWvcbSnNr1IKAp3MZnCuiPmpKj3HYTRz6In9j7ZSxwi6ISGEUmSLjAnNU2IxS+twu9gX3Ey9FLRHYbDYHc67FP138Ca4WETWLRsJ9Y4mGFXrfy0uf9ysCo+0rort0vI="
install:
- npm i
script:
- npm run test
before_script:
- npm prune
after_success:
- npm run semantic-release
branches:
except:
- /^v\d+\.\d+\.\d+$/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### move-into-view

[![Build Status](https://img.shields.io/travis/linuxenko/move-into-view.svg?style=flat-square)](https://travis-ci.org/linuxenko/move-into-view) [![Coveralls](https://img.shields.io/coveralls/linuxenko/move-into-view/master.svg?style=flat-square)](https://coveralls.io/github/linuxenko/move-into-view) [![npm version](https://img.shields.io/npm/v/move-into-view.svg?style=flat-square)](https://www.npmjs.com/package/move-into-view) [![license](https://img.shields.io/github/license/linuxenko/move-into-view.svg?style=flat-square)]() [![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/)
[![Build Status](https://img.shields.io/travis/linuxenko/move-into-view.svg?style=flat-square)](https://travis-ci.org/linuxenko/move-into-view) [![Coveralls](https://img.shields.io/coveralls/linuxenko/move-into-view/master.svg?style=flat-square)](https://coveralls.io/github/linuxenko/move-into-view) [![npm version](https://img.shields.io/npm/v/move-into-view.svg?style=flat-square)](https://www.npmjs.com/package/move-into-view) [![license](https://img.shields.io/github/license/linuxenko/move-into-view.svg?style=flat-square)]() [![Standard - JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](http://standardjs.com/) [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)

14 changes: 14 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Package: move-into-view
*
* Decription: Move element inside of its parent with
* configurable ratio.
*
* License MIT 2017 Svetlana Linuxenko
*/

function MoveIntoView () {

}

module.exports = MoveIntoView;
10 changes: 5 additions & 5 deletions .config/karma.ci-conf.js → karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ module.exports = function (config) {

// list of files / patterns to load in the browser
files: [
'../lib/**/*.js',
'../tests/**/*.js'
'./index.js',
'./tests/*.js'
],

browserify: {
Expand All @@ -30,14 +30,14 @@ module.exports = function (config) {
// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'../lib/**/*.js': ['browserify'],
'../tests/**/*.js': ['browserify']
'./index.js': ['browserify'],
'./tests/*.js': ['browserify']
},

// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['coverage', 'coveralls'],
reporters: ['coverage', 'coveralls', 'progress'],

// web server port
port: 9876,
Expand Down
12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"name": "move-into-view",
"version": "0.0.1",
"version": "0.0.0-development",
"description": "move-into-view is such as scroll-into-view but better.",
"main": "index.js",
"scripts": {
"test": "npm run lint && npm run karma && codecov",
"karma": "karma start ./.config/karma.ci-conf.js",
"lint": "eslint ."
"karma": "karma start karma.conf.js",
"lint": "eslint .",
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"repository": {
"type": "git",
"url": "git+https://github.com/linuxenko/move-into-view.git"
"url": "https://github.com/linuxenko/move-into-view.git"
},
"keywords": [
"scroll"
Expand Down Expand Up @@ -42,6 +43,7 @@
"karma-nyan-reporter": "^0.2.5",
"karma-phantomjs-launcher": "^1.0.2",
"mocha": "^3.2.0",
"watchify": "^3.8.0"
"watchify": "^3.8.0",
"semantic-release": "^6.3.2"
}
}
23 changes: 23 additions & 0 deletions tests/css/reset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
'*': {
'margin': '0px',
'padding': '0px',
'border': '0',
'outline': '0',
'vertical-align': 'baseline',
'font': 'inherit'
},

'body': {
'font': 'sans-serif',
'font-size': '16px'
},

'html': {
'box-sizing': 'border-box'
},

'*, *:before, *:after': {
'box-sizing': 'inherit'
}
};
23 changes: 23 additions & 0 deletions tests/element-setup.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
var MoveIntoView = require('../');
var expect = require('chai').expect;
var resetCSS = require('./css/reset');

var CSSTate = require('csstate');
var cst = new CSSTate();

cst.rule(resetCSS);

describe('Test element setup', function () {
beforeEach(function () {
cst.rule(resetCSS);
});

afterEach(function () {
cst.exit();
});

it('should be to be', function () {
expect(MoveIntoView).to.be.exists;
});
});

5 changes: 0 additions & 5 deletions tests/launcher.test.js

This file was deleted.