Skip to content

Commit

Permalink
Replace task runner (#36)
Browse files Browse the repository at this point in the history
replace task runner
  • Loading branch information
sagiegurari committed Oct 17, 2021
1 parent 0f2281a commit 327bdea
Show file tree
Hide file tree
Showing 17 changed files with 138 additions and 519 deletions.
65 changes: 65 additions & 0 deletions .config/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*global module: false, require: false */

module.exports = function (config) {
'use strict';

const mainJSFile = require('../package.json').main;

config.set({
basePath: '../',
frameworks: [
'mocha',
'sinon-chai'
],
port: 9876,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: [
'ChromiumHeadless'
],
singleRun: false,
reporters: [
'progress',
'coverage'
],
preprocessors: {
[mainJSFile]: [
'coverage'
]
},
coverageReporter: {
dir: 'coverage',
reporters: [
{
type: 'lcov',
subdir: '.'
}
],
check: {
global: {
statements: 100,
functions: 100,
lines: 100,
branches: 100
}
}
},
customLaunchers: {
ChromeHeadlessCI: {
base: 'ChromeHeadless',
flags: [
'--no-sandbox'
]
}
},
files: [
'**/jquery/dist/jquery.js',
'**/angular/angular.js',
'**/angular-mocks/angular-mocks.js',
'test/helpers/**/*.js',
'**/simple-web-notification/web-notification.js',
mainJSFile,
'test/spec/**/*.js'
]
});
};
38 changes: 33 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
'use strict';

const commons = require('js-project-commons');

module.exports = commons.lint.eslint.web;
module.exports = {
'env': {
'browser': true,
'commonjs': true,
'es2021': true,
'mocha': true
},
'globals': {
'angular': 'readonly'
},
'extends': 'eslint:recommended',
'parserOptions': {
'ecmaVersion': 13
},
'rules': {
'indent': [
'error',
4
],
'linebreak-style': [
'error',
'unix'
],
'quotes': [
'error',
'single'
],
'semi': [
'error',
'always'
]
}
};
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Your pull request build must pass (the build will run automatically).<br>
You can run the following command locally to ensure the build will pass:

````sh
npm run build
npm run test
````

* This library is using multiple code inspection tools to validate certain level of standards.<br>The configuration is part of the repository and you can set your favorite IDE using that configuration.<br>You can run the following command locally to ensure the code inspection passes:
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install
uses: ianwalter/puppeteer@v2.0.0
with:
args: npm install
- name: Install Chrome
uses: browser-actions/setup-chrome@latest
- name: Install Dependencies
run: npm install
- name: Run CI
uses: ianwalter/puppeteer@v2.0.0
with:
args: npm test
run: npm test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: './target/coverage/report/lcov.info'
path-to-lcov: './coverage/lcov.info'
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
.idea
.c9
target
.temp
node_modules
bower_components
npm-debug.log
package-lock.json
.nyc_output
coverage
209 changes: 0 additions & 209 deletions .jscs.json

This file was deleted.

4 changes: 0 additions & 4 deletions .jshintrc

This file was deleted.

31 changes: 0 additions & 31 deletions .jslintrc

This file was deleted.

Loading

0 comments on commit 327bdea

Please sign in to comment.