Skip to content
This repository has been archived by the owner on Jun 28, 2018. It is now read-only.

Commit

Permalink
Karma (#1)
Browse files Browse the repository at this point in the history
* tests added
  • Loading branch information
tlaziuk committed Oct 23, 2016
1 parent 5fa5966 commit 9c9e380
Show file tree
Hide file tree
Showing 18 changed files with 394 additions and 146 deletions.
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,5 @@ node_modules
tags
#project
**.js
!**.webpack.js
!**.web.js
!**.config.js
**.d.ts
**.map
26 changes: 26 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#node
logs
*.log
npm-debug.log*
pids
*.pid
*.seed
lib-cov
coverage
.grunt
.lock-wscript
build/Release
node_modules
#vim
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
[._][sS]ession.vim
.netrwhist
*~
*.lock
#system
tags
#project
**.ts
!**.d.ts
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# carouselic [![Build Status](https://travis-ci.org/tlaziuk/carouselic.svg?branch=master)](https://travis-ci.org/tlaziuk/carouselic) [![Coverage Status](https://coveralls.io/repos/github/tlaziuk/carouselic/badge.svg?branch=master)](https://coveralls.io/github/tlaziuk/carouselic?branch=master)

Carousel written in TypeScript which aims to provide a flexible carousel experience.
54 changes: 54 additions & 0 deletions karma.conf.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import * as karma from 'karma'
module.exports = (config: karma.Config) => {
config.set({
frameworks: [
`jasmine`,
`karma-typescript`,
],
files: [
{
pattern: `node_modules/es6-promise/dist/es6-promise.auto.js`,
included: true,
},
{
pattern: `src/**/*.ts`,
included: true,
},
{
pattern: `test/**/*.ts`,
included: true,
},
],
preprocessors: {
'**/*.ts': [
`karma-typescript`,
`babel`,
],
},
reporters: [
`progress`,
`karma-typescript`,
],
logLevel: config.LOG_INFO,
browsers: [
`PhantomJS`,
],
singleRun: true,
karmaTypescriptConfig: {
reports:
{
'clover': `coverage`,
'cobertura': `coverage`,
'html': `coverage`,
'json-summary': `coverage`,
'json': `coverage`,
'lcovonly': `coverage`,
'teamcity': `coverage`,
},
remapOptions:
{
exclude: /\.(spec|test|d)\.ts/i,
},
},
} as karma.ConfigOptions)
}
46 changes: 32 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
{
"name": "carouselic",
"version": "0.1.0",
"version": "0.2.0",
"description": "TypeScript carousel",
"main": "src/index",
"typings": "src/index",
"files": [
"src/"
"src/",
"dist/"
],
"directories": {
"lib": "src",
"test": "test"
},
"scripts": {
"build": "npm run tsc",
"build": "npm run tsc && npm run bundle",
"clean": "git clean -Xf",
"coveralls": "remap-istanbul -i ./coverage/coverage.json -t lcovonly | coveralls",
"lint": "find . -name *.ts -print | grep -v .d.ts | grep -v node_modules | xargs tslint -t verbose",
"prepublish": "npm run clean && npm run build && npm run bundle",
"test": "istanbul cover _mocha --report lcovonly -- --reporter spec -- ./test/index.js",
"coveralls": "for lcov in coverage/*/lcovonly; do cat \"$lcov\" | coveralls; done",
"lint": "find . -name '*.ts' -print | grep -v .d.ts | grep -v node_modules | xargs tslint -t verbose",
"prepublish": "npm run clean && npm run build",
"test": "karma start",
"test:d": "karma start --no-auto-watch --no-single-run",
"test:w": "karma start --auto-watch --no-single-run",
"tsc": "tsc",
"tsc:w": "tsc -w",
"bundle": "webpack",
"bundle:w": "webpack --watch"
"bundle": "webpack --config webpack.config.js",
"bundle:w": "webpack --config webpack.config.js --watch"
},
"repository": {
"type": "git",
Expand All @@ -36,16 +40,30 @@
"url": "https://github.com/tlaziuk/carouselic/issues"
},
"homepage": "https://github.com/tlaziuk/carouselic",
"babel": {
"presets": [
"latest"
]
},
"dependencies": {},
"devDependencies": {
"chai": "^3.4.0",
"@types/jasmine": "^2.5.2",
"@types/karma": "^0.13.33",
"@types/webpack": "^1.12.34",
"babel-core": "^6.17.0",
"babel-loader": "^6.2.5",
"babel-preset-latest": "^6.16.0",
"coveralls": "^2.11.9",
"istanbul": "^0.4.3",
"mocha": "^2.2.5",
"remap-istanbul": "^0.6.4",
"es6-promise": "^4.0.5",
"jasmine": "^2.5.2",
"karma": "^1.3.0",
"karma-babel-preprocessor": "^6.0.1",
"karma-jasmine": "^1.0.2",
"karma-phantomjs-launcher": "^1.0.2",
"karma-typescript": "^2.0.6",
"ts-loader": "^0.8.2",
"tslint": "next",
"typescript": "next",
"webpack": "^1.13.2"
"webpack": "^1.12.34"
}
}

0 comments on commit 9c9e380

Please sign in to comment.