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

2.0 #1732

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
4 changes: 4 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
"extends":
- "defaults/configurations/walmart/es6-browser"
"plugins": ["flowtype"]
7 changes: 7 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[ignore]
.*/npmconf/test/fixtures/
[include]
./src
[libs]

[options]
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.sass-cache
.sass-cache
node_modules
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: node_js

node_js:
- 0.10
- 0.12

# Use container-based Travis infrastructure.
sudo: false

branches:
only:
- master

before_install:
# GUI for real browsers.
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

script:
- npm run check-ci
92 changes: 92 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/* eslint global-strict:0 */
"use strict";

var webpack = require('webpack');

module.exports = function (config) {
config.set({
frameworks: ["phantomjs-shim", "mocha"],
basePath: ".",
browsers: ["PhantomJS"],
'PhantomJS_Desktop': {
base: 'PhantomJS',
options: {
viewportSize: {
width: 1200,
height: 600
}
}
},
reporters: ["mocha", "coverage"],
files: [
"node_modules/sinon/pkg/sinon.js",
"test/specs/**/*.spec.js",
"slick/slick.css",
"slick/slick-theme.css"
],
preprocessors: {
"test/specs/**/*.spec.js": ["webpack"]
},
webpack: {
cache: true,
module: {
loaders: [{
test: /\.(js)$/,
exclude: [/node_modules/],
loader: "babel-loader?stage=1"
}],
postLoaders: [{
test: /\.(js|jsx)$/,
exclude: /(node_modules|bower_components|helpers|plugins|[.]spec[.]js)/,
loader: "istanbul-instrumenter"
}]
},
resolve: {
root: [__dirname],
modulesDirectories: ["node_modules","src"],
extensions: ["", ".js", ".jsx"]
},
plugins: [
new webpack.ProvidePlugin({
$: "jquery",
"window.$": "jquery",
jQuery: "jquery",
"window.jQuery": "jquery"
})
]
},
webpackServer: {
quiet: false,
noInfo: true,
stats: {
assets: false,
colors: true,
version: false,
hash: false,
timings: false,
chunks: false,
chunkModules: false
}
},
exclude: [],
port: 9999,
logLevel: config.LOG_INFO,
colors: true,
autoWatch: false,
browserNoActivityTimeout: 60000,
plugins: [
require("karma-coverage"),
require("karma-mocha"),
require("karma-mocha-reporter"),
require("karma-phantomjs-launcher"),
require("karma-phantomjs-shim"),
require("karma-sinon-chai"),
require("karma-webpack")
],
coverageReporter: {
type: "text"
},
captureTimeout: 100000,
singleRun: true
});
};
78 changes: 59 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,60 @@
{
"name": "slick-carousel",
"version": "1.5.8",
"description": "the last carousel you'll ever need",
"main": "slick/slick.js",
"repository": {
"type": "git",
"url": "https://github.com/kenwheeler/slick.git"
},
"keywords": [
"carousel",
"slick",
"responsive"
],
"author": "Ken Wheeler",
"license": "MIT",
"bugs": {
"url": "https://github.com/kenwheeler/slick/issues"
}
}
"name": "slick-carousel",
"version": "1.5.8",
"description": "the last carousel you'll ever need",
"main": "./src/index.js",
"repository": {
"type": "git",
"url": "https://github.com/kenwheeler/slick.git"
},
"scripts": {
"build": "webpack",
"check-ci": "npm run lint && npm run flow && npm run test",
"flow": "flow check",
"lint": "eslint --ext .js src",
"test": "node node_modules/karma/bin/karma start karma.conf.js"
},
"keywords": [
"carousel",
"slick",
"responsive"
],
"author": "Ken Wheeler",
"license": "MIT",
"bugs": {
"url": "https://github.com/kenwheeler/slick/issues"
},
"devDependencies": {
"babel-core": "^5.8.24",
"babel-eslint": "^4.1.3",
"babel-loader": "^5.3.2",
"chai": "^3.2.0",
"eslint": "^1.5.0",
"eslint-config-defaults": "^6.0.0",
"eslint-plugin-filenames": "^0.1.2",
"eslint-plugin-flowtype": "^1.0.0",
"istanbul": "^0.3.20",
"istanbul-instrumenter-loader": "^0.1.2",
"jquery": "^2.1.4",
"karma": "^0.13.9",
"karma-chrome-launcher": "~0.1.4",
"karma-coverage": "^0.5.2",
"karma-firefox-launcher": "~0.1.3",
"karma-mocha": "^0.2.0",
"karma-mocha-reporter": "^1.1.1",
"karma-phantomjs-launcher": "^0.2.1",
"karma-phantomjs-shim": "^1.1.1",
"karma-script-launcher": "~0.1.0",
"karma-sinon-chai": "^0.3.0",
"karma-webpack": "^1.7.0",
"mocha": "^2.3.2",
"phantomjs": "^1.9.18",
"sinon": "^1.16.1",
"sinon-chai": "^2.8.0",
"webpack": "^1.12.1"
},
"dependencies": {
"object-assign": "^4.0.1",
"webpack": "^1.12.1"
}
}
Loading