Skip to content

Commit 8d9ca47

Browse files
committed
Merge pull request #4 from sergeyt/master
some improvements
2 parents 96fbf31 + d62fab0 commit 8d9ca47

File tree

18 files changed

+407
-11227
lines changed

18 files changed

+407
-11227
lines changed

.bowerrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"directory": "lib",
3+
"json": "bower.json"
4+
}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
*.iml
2+
npm-debug.log
3+
node_modules
4+
.coverage
5+
lib

Gruntfile.coffee

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
module.exports = (grunt) ->
2+
3+
# Project configuration.
4+
grunt.initConfig
5+
pkgFile: 'package.json'
6+
7+
'npm-contributors':
8+
options:
9+
commitMessage: 'chore: update contributors'
10+
11+
bump:
12+
options:
13+
commitMessage: 'chore: release v%VERSION%'
14+
pushTo: 'origin'
15+
16+
'auto-release':
17+
options:
18+
checkTravisBuild: false
19+
20+
jshint:
21+
options:
22+
# Expected an assignment or function call and instead saw an expression.
23+
'-W030': true,
24+
globals:
25+
node: true,
26+
console: true,
27+
module: true,
28+
require: true
29+
all:
30+
options:
31+
ignores: ['*.min.js', 'src/*.min.js']
32+
src: ['*.js', 'src/*.js']
33+
34+
karma:
35+
unit:
36+
configFile: 'karma.conf.js'
37+
singleRun: true
38+
39+
grunt.loadNpmTasks 'grunt-contrib-jshint'
40+
grunt.loadNpmTasks 'grunt-npm'
41+
grunt.loadNpmTasks 'grunt-bump'
42+
grunt.loadNpmTasks 'grunt-auto-release'
43+
grunt.loadNpmTasks 'grunt-karma'
44+
45+
grunt.registerTask 'release', 'Bump the version and publish to NPM.',
46+
(type) -> grunt.task.run [
47+
'npm-contributors',
48+
"bump:#{type||'patch'}",
49+
'npm-publish'
50+
]
51+
52+
grunt.registerTask 'lint', ['jshint']
53+
grunt.registerTask 'test', ['lint', 'karma']
54+
grunt.registerTask 'default', ['test']
55+

README.markdown

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#jQuery xml2json
1+
#jQuery xml2json [![Build Status][buildstatus]][buildstatusurl] [![Deps Status][depstatus]][depstatusurl]
2+
3+
[![NPM][npm]](https://nodei.co/npm/jquery-xml2json/)
24

35
A simple jQuery plugin that converts XML data, typically from $.ajax requests, to a valid JSON object.
46

@@ -12,3 +14,8 @@ Here's a simple usage example:
1214
}
1315
});
1416

17+
[buildstatus]: https://drone.io/github.com/sergeyt/jQuery-xml2json/status.png
18+
[buildstatusurl]: https://drone.io/github.com/sergeyt/jQuery-xml2json/latest
19+
[depstatus]: https://david-dm.org/sergeyt/jQuery-xml2json.png
20+
[depstatusurl]: https://david-dm.org/sergeyt/jQuery-xml2json
21+
[npm]: https://nodei.co/npm/jquery-xml2json.png?downloads=true&stars=true

bower.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "jquery-xml2json",
3+
"version": "0.0.4",
4+
"main": "src/xml2json.js",
5+
"maintainers": [{
6+
"name": "Sergey Todyshev",
7+
"email": "[email protected]"
8+
}],
9+
"dependencies": {
10+
"jquery": "*"
11+
},
12+
"ignore": [
13+
"**/.*",
14+
"node_modules",
15+
"components"
16+
]
17+
}

js/xml2json.js

Lines changed: 0 additions & 56 deletions
This file was deleted.

karma-debug.cmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
start karma start karma.conf.js --browsers Chrome

karma.conf.js

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
module.exports = function(config) {
2+
config.set({
3+
// base path, that will be used to resolve files and exclude
4+
basePath: '',
5+
6+
// frameworks to use
7+
frameworks: ['mocha'],
8+
9+
client: {
10+
mocha: {
11+
ui: 'bdd'
12+
}
13+
},
14+
15+
preprocessors: {
16+
'src/*.js': 'coverage',
17+
'test/*.coffee': 'coffee'
18+
},
19+
20+
// list of files / patterns to load in the browser
21+
files: [
22+
'lib/jquery/jquery.js',
23+
'node_modules/expect.js/expect.js',
24+
'src/*.js',
25+
'test/*.coffee'
26+
],
27+
28+
// list of files to exclude
29+
exclude: [],
30+
31+
// test results reporter to use
32+
// possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
33+
reporters: ['dots', 'coverage'],
34+
35+
coverageReporter: {
36+
type: 'html',
37+
dir: '.coverage'
38+
},
39+
40+
// web server port
41+
port: 9876,
42+
43+
// enable / disable colors in the output (reporters and logs)
44+
colors: true,
45+
46+
// level of logging
47+
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
48+
logLevel: config.LOG_INFO,
49+
50+
// enable / disable watching file and executing tests whenever any file changes
51+
autoWatch: false,
52+
53+
// Start these browsers, currently available:
54+
// - Chrome
55+
// - ChromeCanary
56+
// - Firefox
57+
// - Opera
58+
// - Safari (only Mac)
59+
// - PhantomJS
60+
// - IE (only Windows)
61+
browsers: ['PhantomJS'],
62+
63+
// If browser does not capture in given timeout [ms], kill it
64+
captureTimeout: 60000,
65+
66+
// Continuous Integration mode
67+
// if true, it capture browsers, run tests and exit
68+
singleRun: false
69+
});
70+
};

package.json

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"name": "jquery-xml2json",
3+
"version": "0.0.4",
4+
"description": "jQuery plugin to convert XML to JSON.",
5+
"license": "MIT",
6+
"main": "src/xml2json.js",
7+
"repository": {
8+
"type": "git",
9+
"url": "[email protected]:sergeyt/jQuery-xml2json.git"
10+
},
11+
"keywords": [
12+
"jQuery-plugin",
13+
"xml",
14+
"json"
15+
],
16+
"author": "Josef van Niekerk <[email protected]>",
17+
"contributors": [
18+
"Josef van Niekerk <[email protected]>",
19+
"Coty Condry <[email protected]>",
20+
"josefvanniekerk <[email protected]>"
21+
],
22+
"dependencies": {},
23+
"devDependencies": {
24+
"grunt": "~0.4.1",
25+
"grunt-contrib-jshint": "~0.7.1",
26+
"grunt-npm": "~0.0.2",
27+
"grunt-bump": "~0.0.7",
28+
"grunt-auto-release": "~0.0.2",
29+
"grunt-cli": "~0.1.11",
30+
"karma-chrome-launcher": "~0.1.1",
31+
"karma-script-launcher": "~0.1.0",
32+
"karma-firefox-launcher": "~0.1.2",
33+
"karma-html2js-preprocessor": "~0.1.0",
34+
"karma-jasmine": "~0.1.4",
35+
"karma-coffee-preprocessor": "~0.1.1",
36+
"requirejs": "~2.1.9",
37+
"karma-requirejs": "~0.2.0",
38+
"karma-phantomjs-launcher": "~0.1.1",
39+
"karma": "~0.10.8",
40+
"karma-coverage": "~0.1.4",
41+
"mocha": "~1.15.1",
42+
"karma-mocha": "~0.1.1",
43+
"expect.js": "~0.2.0",
44+
"grunt-karma": "~0.6.2",
45+
"xml2js": "~0.4.0"
46+
},
47+
"scripts": {
48+
"lint": "grunt lint",
49+
"test": "grunt test"
50+
}
51+
}

0 commit comments

Comments
 (0)