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

Replace task runner #6

Merged
merged 11 commits into from
Oct 17, 2021
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
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: [
'**/big.js/big.js',
'**/jquery/dist/jquery.js',
'**/angular/angular.js',
'**/angular-mocks/angular-mocks.js',
'test/helpers/**/*.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