Skip to content

Commit

Permalink
Version 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tkw1536 committed Sep 8, 2015
1 parent 0be0de6 commit fc49a52
Show file tree
Hide file tree
Showing 37 changed files with 53,688 additions and 5,386 deletions.
2 changes: 1 addition & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
"strict": true,
"trailing": true,
"smarttabs": true,
"predef": ["exports", "isBrowser", "JUB"]
"predef": []
}
92 changes: 27 additions & 65 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,68 +14,31 @@ module.exports = function (grunt) {
// Time how long tasks take. Can help when optimizing build times
require('time-grunt')(grunt);

var files = grunt.file.readJSON('src/files.json');

// Define the configuration for all the tasks
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
openjub: {
dist: 'dist',
docs: 'docs',
src: 'src',
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
uglify: {
options: {
preserveComments: false,
banner: '<%= openjub.banner %>'
},
build: {
src: '<%= openjub.dist %>/<%= pkg.filename %>.js',
dest: '<%= openjub.dist %>/<%= pkg.filename %>.min.js'
}
},
concat: {
options: {
stripBanners: true,
banner: '<%= openjub.banner %>"use strict";\n',
process: function(src, filepath) {
return '// Source: ' + filepath + '\n' +
src.replace(/(^|\n)[ \t]*('use strict'|"use strict");?\s*/g, '$1');
},
},
dist: {
src: files.order,
dest: '<%= openjub.dist %>/<%= pkg.filename %>.js',
},
},
jshint: {
options: {
files: ['src/**.js', 'src/client/**.js'],
jshintrc: '.jshintrc',
reporter: require('jshint-stylish'),
ignores: [
'<%= openjub.src %>/vendor/{,*/}*.js',

//we want to ignore the pre and post-amble
'src/00_preamble.js',
'src/99_postamble.js'
]
},
},
"jsdoc-ng" : {
"openjub": {
src: ['<%= openjub.src %>', 'README.md' ],
dest: '<%= openjub.docs %>',
uglify: {
build: {
src: ['dist/openjub.js'],
dest: 'dist/openjub.min.js'
}
},
'jsdoc-ng' : {
dist: {
src: ['src/**.js', 'src/client/**.js', 'README.md' ],
dest: 'docs',
template: 'node_modules/jaguarjs-jsdoc',
options: {
source: {
includePattern: ".+\\.js(doc)?$",
excludePattern: "(^|\\/|\\\\)_",
exclude: [
'src/00_preamble.js',
'src/99_postamble.js'
]
includePattern: '.+\\.js(doc)?$',
excludePattern: '(^|\\/|\\\\)_'
},
opts: {
recurse: true,
Expand All @@ -84,28 +47,27 @@ module.exports = function (grunt) {
}
}
},
all: [
'<%= openjub.src %>/{,*/}*.js'
],
clean: {
browserify: {
dist: {
files: [{
dot: true,
src: [
'<%= openjub.dist %>'
]
}]
src: 'src/index.js',
dest: 'dist/openjub.js',
options: {
browserifyOptions: {
debug: true,
standalone: 'JUB'
},
}
}
}
});

grunt.loadNpmTasks('grunt-jsdoc-ng');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-browserify');

grunt.registerTask('build', [
'jshint',
'jsdoc-ng',
'concat',
'uglify'
grunt.registerTask('dist', [
'jshint', 'jsdoc-ng', 'browserify', 'uglify'
]);

grunt.registerTask('default', ['build']);
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# openjub-js-sdk

Front-End JavaScript implementation of the OpenJUB API.
Includes a really stupid dummy application with autocomplete.

# Building
```
npm install
grunt dist
```
# Docs
They are auto-generated when building. See the [docs/](docs/) directory.

# Demo
There is a really simplistic demo (with autocompletion via complet.ly.js) in index.html

## Folder structure
* docs/ - Documentation, auto-generated
Expand Down
27 changes: 0 additions & 27 deletions bower.json

This file was deleted.

Loading

0 comments on commit fc49a52

Please sign in to comment.