Skip to content

Commit

Permalink
Patch Update: 1.8.3
Browse files Browse the repository at this point in the history
* Upgraded dev dependencies
* Converted tests and coverages to jest
  • Loading branch information
Manhydra committed Apr 15, 2022
1 parent 168c915 commit e74f2e0
Show file tree
Hide file tree
Showing 28 changed files with 13,698 additions and 13,445 deletions.
2 changes: 1 addition & 1 deletion .jsbeautifyrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"indent_size": 4,
"indent_size": 2,
"indent_char": " ",
"indent_level": 0,
"indent_with_tabs": false,
Expand Down
11 changes: 7 additions & 4 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"browser": false, // Standard browser globals e.g. `window`, `document`.
"node": true, // Enable globals available when code is running inside of the NodeJS runtime environment.
"indent": 4, // Specify indentation spacing.
"predef": ["describe", "it"]
"browser": false, // Standard browser globals e.g. `window`, `document`.
"node": true, // Enable globals available when code is running inside of the NodeJS runtime environment.
"indent": 2, // Specify indentation spacing.
"predef": [
"describe",
"it"
]
}
14 changes: 7 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
language: node_js
node_js:
- "6"
- "14.19.1"

before_script:
- npm install -g [email protected]
- npm install --quiet
- npm install -g mocha
- npm install -g istanbul
- npm install -g [email protected]
- npm install --quiet

#services:
# - mongodb

script:
- grunt
- istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec --recursive && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage
- grunt
212 changes: 77 additions & 135 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,142 +1,84 @@
/*global module*/

module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-mocha-test');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-coveralls');
grunt.loadNpmTasks('grunt-jsbeautifier');
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-mocha-phantomjs');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-jsbeautifier');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-run');

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
files: ['*.js', './lib/*.js', './browser/lib/*.js', '*.json'],
options: {
browser: true,
smarttabs: true,
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: false,
boss: true,
eqnull: true,
node: true,
expr: true,
globals: {
'it': true,
'xit': true,
'describe': true,
'before': true,
'after': true,
'done': true,
'Document': true
}
}
},
watch: {
all: {
files: ['./lib/*.js', '*.js'],
tasks: ['default']
}
},
jsbeautifier: {
beautify: {
src: ['Gruntfile.js', 'lib/*.js', 'test/*.js', '*.js', '*.json', './browser/lib/*.js'],
options: {
config: '.jsbeautifyrc'
}
},
check: {
src: ['Gruntfile.js', 'lib/*.js', 'test/*.js', '*.js', './browser/lib/*.js'],
options: {
mode: 'VERIFY_ONLY',
config: '.jsbeautifyrc'
}
}
},
mochaTest: {
test: {
options: {
reporter: 'spec',
timeout: '10000',
recursive: true
},
src: ['test/*.js']
}
},
coveralls: {
options: {
// LCOV coverage file relevant to every target
src: 'coverage/lcov.info',

// When true, grunt-coveralls will only print a warning rather than
// an error, to prevent CI builds from failing unnecessarily (e.g. if
// coveralls.io is down). Optional, defaults to false.
force: false
},
//your_target: {
// Target-specific LCOV coverage file
//src: 'coverage-results/extra-results-*.info'
//},
},
browserify: {
standalone: {
src: ['<%=pkg.main%>'],
dest: 'dist/<%=pkg.name%>.standalone.js',
options: {
standalone: '<%=pkg.name%>'
}
},
require: {
src: ['<%=pkg.main%>'],
dest: 'dist/<%=pkg.name%>.js',
options: {
alias: [__dirname + "/index.js:<%=pkg.name%>"]
}
},
tests: {
src: ['test/**/*.js'],
dest: 'dist/mocha_tests.js',
options: {
transform: ['brfs']
}
}
},
connect: {
server: {
options: {
port: 8000,
hostname: '127.0.0.1'
}
}
},
'mocha_phantomjs': {
all: {
options: {
urls: [
'http://127.0.0.1:8000/dist/mocha_runner.html'
]
}
}
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
files: ['*.js', './lib/*.js', './browser/lib/*.js', '*.json'],
options: {
browser: true,
smarttabs: true,
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: false,
boss: true,
eqnull: true,
node: true,
expr: true,
globals: {
'it': true,
'xit': true,
'describe': true,
'before': true,
'after': true,
'done': true,
'Document': true
}
});

grunt.registerTask('beautify', ['jsbeautifier:beautify']);
// grunt.registerTask('browser-test', ['browserify:require', 'browserify:tests', 'connect:server', 'mocha_phantomjs']);
grunt.registerTask('mocha', ['mochaTest']);
grunt.registerTask('commit', ['jshint', 'mocha']);

grunt.registerTask('default', ['beautify', 'jshint', 'mocha' /*, 'browser-test'*/ ]);
}
},
watch: {
all: {
files: ['./lib/*.js', '*.js'],
tasks: ['default']
}
},
jsbeautifier: {
beautify: {
src: ['Gruntfile.js', 'lib/*.js', 'test/*.js', '*.js', '*.json', './browser/lib/*.js'],
options: {
config: '.jsbeautifyrc'
}
},
check: {
src: ['Gruntfile.js', 'lib/*.js', 'test/*.js', '*.js', './browser/lib/*.js'],
options: {
mode: 'VERIFY_ONLY',
config: '.jsbeautifyrc'
}
}
},
run: {
jest: {
exec: 'npx jest',
args: ['test']
}
},
connect: {
server: {
options: {
port: 8000,
hostname: '127.0.0.1'
}
}
}
});

grunt.registerTask('timestamp', function () {
grunt.log.subhead(Date());
});
grunt.registerTask('default', ['beautify', 'jshint', 'run']);
grunt.registerTask('beautify', ['jsbeautifier:beautify']);
grunt.registerTask('commit', ['default']);
grunt.registerTask('timestamp', function () {
grunt.log.subhead(Date());
});
};
10 changes: 5 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "blue-button-xml",
"version": "1.8.2",
"main": "dist/blue-button-xml",
"license": "Apache-2.0",
"ignore": ["**/*", "!dist/*", "!bower.json", "!LICENSE"]
"name": "blue-button-xml",
"version": "1.8.2",
"main": "dist/blue-button-xml",
"license": "Apache-2.0",
"ignore": ["**/*", "!dist/*", "!bower.json", "!LICENSE"]
}
Loading

0 comments on commit e74f2e0

Please sign in to comment.