Skip to content

Commit e81670c

Browse files
committed
chore(scaffolding): initial setup
1 parent 5eae1bc commit e81670c

17 files changed

+363
-3
lines changed

.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[{*.js,*.less,*.json,*.html}]
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
insert_final_newline = true

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
doc

.jshintrc

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"globals": {
3+
"browser": false,
4+
"element": false,
5+
"by": false,
6+
"describe": false,
7+
"xdescribe": false,
8+
"ddescribe": false,
9+
"it": false,
10+
"xit": false,
11+
"expect": false,
12+
"beforeEach": false,
13+
"afterEach": false,
14+
"runs": false,
15+
"waitsFor": false
16+
},
17+
"node": true,
18+
"browser": true,
19+
"indent": 2,
20+
"strict": true
21+
}

Gruntfile.js

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/* jshint node: true */
2+
'use strict';
3+
4+
module.exports = function(grunt) {
5+
require('load-grunt-tasks')(grunt);
6+
require('time-grunt')(grunt);
7+
8+
var pkg = require('./package.json');
9+
var config = {};
10+
11+
config.grunt = grunt;
12+
config.pkg = pkg;
13+
14+
grunt.initConfig({
15+
pkg: pkg,
16+
17+
browserify: require('./grunt/config/browserify')(config),
18+
19+
clean: ['doc', 'dist', '.tmp'],
20+
21+
copy: require('./grunt/config/copy')(config),
22+
23+
jasmine_node: require('./grunt/config/jasmine_node')(config),
24+
25+
jsdoc: require('./grunt/config/jsdoc')(config),
26+
27+
jshint: require('./grunt/config/jshint')(config),
28+
29+
karma: require('./grunt/config/karma')(config),
30+
31+
watch: require('./grunt/config/watch')(config),
32+
});
33+
34+
grunt.registerTask('build', function(target) {
35+
target = target || 'prod';
36+
37+
var tasks = [
38+
'jshint',
39+
'clean',
40+
'jsdoc',
41+
'copy',
42+
'browserify'
43+
];
44+
45+
grunt.task.run(tasks);
46+
});
47+
48+
grunt.registerTask('auto-build', function(target) {
49+
target = target || 'prod';
50+
51+
var tasks = [
52+
'build',
53+
'watch'
54+
];
55+
56+
grunt.task.run(tasks);
57+
});
58+
59+
grunt.registerTask('default', ['build']);
60+
};

README.md

+47-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,48 @@
1-
camunda-bpm-sdk-js
2-
==================
1+
# camunda-bpm-sdk-js
32

4-
Javascript client library for camunda BPM
3+
Javascript client library for [camunda BPM](https://github.com/camunda/camunda-bpm-platform)
4+
5+
## Features
6+
7+
8+
## Installation
9+
10+
11+
## Usage
12+
13+
14+
### In browsers
15+
16+
```HTML
17+
<script type="text/javascript" src="dist/camunda-bpm-sdk.js"></script>
18+
<script type="text/javascript">
19+
// TODO
20+
</script>
21+
```
22+
23+
### With node.js
24+
25+
```js
26+
var cam = require('camunda-bpm-sdk-js');
27+
// TODO
28+
```
29+
30+
## Development
31+
32+
```bash
33+
npm install
34+
```
35+
36+
```bash
37+
grunt auto-build
38+
```
39+
40+
41+
## License
42+
43+
[Apache License 2.0](./LICENSE)
44+
45+
## Authors
46+
47+
- [Daniel _meyerdan_ Meyer](https://github.com/meyerdan) - [@meyerdan](http://twitter.com/meyerdan)
48+
- [Valentin _zeropaper_ Vago](https://github.com/zeropaper) - [@zeropaper](http://twitter.com/zeropaper)

grunt/config/browserify.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = function(config) {
2+
config = config || {};
3+
4+
return {
5+
options: {
6+
livereload: false
7+
},
8+
9+
sources: {
10+
files: [
11+
'src/**/*.js'
12+
],
13+
tasks: [
14+
'newer:jshint',
15+
'browserify'
16+
]
17+
}
18+
};
19+
};

grunt/config/copy.js

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = function() {
2+
return {
3+
options: {},
4+
assets: {
5+
files: [
6+
// {
7+
// expand: true,
8+
// cwd: 'client',
9+
// src: [
10+
// '*.{ico,txt}',
11+
// 'index.html'
12+
// ],
13+
// dest: 'dist/'
14+
// }
15+
]
16+
}
17+
};
18+
};

grunt/config/jasmine_node.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
module.exports = function() {
2+
return {
3+
options: {
4+
forceExit: true,
5+
match: '.',
6+
matchall: false,
7+
extensions: 'js',
8+
specNameMatcher: 'Spec',
9+
captureExceptions: true,
10+
verbose: true,
11+
junitreport: {
12+
report: false,
13+
savePath : "./test/reports/",
14+
useDotNotation: true,
15+
consolidate: true
16+
}
17+
},
18+
unit: ['test/jasmine_node/**/*Spec.js']
19+
};
20+
};

grunt/config/jsdoc.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = function() {
2+
return {
3+
options: {
4+
plugins: [
5+
'plugins/markdown'
6+
],
7+
markdown: {
8+
parser: 'gfm'
9+
}
10+
},
11+
scripts: {
12+
options: {
13+
destination: 'doc'
14+
},
15+
src: [
16+
'README.md',
17+
'src/**/*.js'
18+
]
19+
}
20+
};
21+
};

grunt/config/jshint.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
module.exports = function() {
2+
return {
3+
options: {
4+
jshintrc: true
5+
},
6+
scripts: {
7+
files: {
8+
src: [
9+
'src/**/*.js'
10+
]
11+
}
12+
},
13+
test: {
14+
files: {
15+
src: [
16+
'test/**/*.js'
17+
]
18+
}
19+
}
20+
};
21+
};

grunt/config/karma.js

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
module.exports = function() {
2+
return {
3+
options: {
4+
singleRun: true,
5+
autoWatch: false,
6+
7+
frameworks: ['jasmine'],
8+
9+
files: [
10+
'node_modules/karma-jasmine/lib/jasmine.js',
11+
'node_modules/karma-jasmine/lib/adapter.js',
12+
13+
{pattern: 'test/karma/**/*Spec.js', included: true},
14+
{pattern: 'dist/**/*.js', included: false},
15+
16+
'test/karma/main.js'
17+
],
18+
browsers: [
19+
// 'Chrome',
20+
// 'Firefox',
21+
'PhantomJS'
22+
]
23+
},
24+
25+
integration: {
26+
options: {}
27+
},
28+
29+
dev: {
30+
options: {
31+
singleRun: false,
32+
autoWatch: true
33+
}
34+
}
35+
}
36+
};

grunt/config/watch.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = function(config) {
2+
config = config || {};
3+
4+
return {
5+
options: {
6+
livereload: false
7+
},
8+
9+
sources: {
10+
files: [
11+
'src/**/*.js'
12+
],
13+
tasks: [
14+
'newer:jshint',
15+
'browserify'
16+
]
17+
}
18+
};
19+
};

package.json

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
{
2+
"name": "camunda-bpm-sdk-js",
3+
"version": "0.0.1",
4+
"description": "Javascript client library for camunda BPM",
5+
"main": "src/index.js",
6+
"scripts": {
7+
"test": "node_modules/.bin/jasmine_node"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git://github.com/camunda/camunda-bpm-sdk-js.git"
12+
},
13+
"keywords": [
14+
"camunda-bpm",
15+
"sdk"
16+
],
17+
"author": "Daniel Meyer <[email protected]>",
18+
"contributors": [
19+
"Valentin Vago <[email protected]>"
20+
],
21+
"license": "Apache-2.0",
22+
"bugs": {
23+
"url": "https://github.com/camunda/camunda-bpm-sdk-js/issues"
24+
},
25+
"homepage": "https://github.com/camunda/camunda-bpm-sdk-js",
26+
"dependencies": {},
27+
"devDependencies": {
28+
"browserify": "~4.1.10",
29+
"grunt": "~0.4.5",
30+
"grunt-browserify": "~2.1.0",
31+
"grunt-contrib-clean": "~0.5.0",
32+
"grunt-jsdoc": "~0.5.4",
33+
"grunt-karma": "~0.8.3",
34+
"grunt-newer": "~0.7.0",
35+
"jasmine-node": "~1.14.3",
36+
"karma": "~0.12.16",
37+
"karma-jasmine": "~0.1.5",
38+
"load-grunt-tasks": "~0.5.0",
39+
"time-grunt": "~0.3.2"
40+
}
41+
}

src/index.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* @module camunda-bpm-sdk-js
3+
*/
4+
5+
/**
6+
* Entry point of the module
7+
*
8+
* @param {Object} config - used to provide necessary configuration
9+
* @param {String} config.engine - ...
10+
* @param {String} config.app - ...
11+
*
12+
* @return {Object} - ...
13+
*/
14+
var cam = function(config) {
15+
config = config || {};
16+
17+
};
18+
19+
module.exports = cam;

test/jasmine_node/nodeEnvSpec.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
describe('The node.js usage', function() {
2+
3+
});

test/karma/browserEnvSpec.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
describe('The browser usage', function() {
2+
3+
});

test/karma/main.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
(function(root) {
2+
//
3+
}(this));

0 commit comments

Comments
 (0)