diff --git a/README.md b/README.md index 85fa8e9..2546ef7 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,11 @@ This library is part of the [Aurelia](http://www.aurelia.io/) platform and conta This library has **NO** external dependencies. +## Used By + +* [aurelia-framework](https://github.com/aurelia/framework) +* [aurelia-templating](https://github.com/aurelia/templating) + ## Platform Support This library can be used in the **browser** as well as on the **server**. diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..f8db610 --- /dev/null +++ b/bower.json @@ -0,0 +1,16 @@ +{ + "name": "aurelia-logging", + "version": "0.1.0", + "description": "A minimal but effective logging mechanism with support for log levels and pluggable log appenders.", + "keywords": [ + "aurelia", + "logging" + ], + "homepage": "http://aurelia.io", + "license": "MIT", + "authors": ["Rob Eisenberg (http://robeisenberg.com/)"], + "repository": { + "type": "git", + "url": "http://github.com/aurelia/logging" + } +} \ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index bfd4226..4d840bf 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -7,11 +7,11 @@ var stylish = require('jshint-stylish'); var yuidoc = require("gulp-yuidoc"); var changelog = require('conventional-changelog'); var assign = Object.assign || require('object.assign'); -var pkg = require('./package.json'); var fs = require('fs'); +var bump = require('gulp-bump'); var path = { - source:'lib/**/*.js', + source:'src/**/*.js', output:'dist/', doc:'./doc' }; @@ -64,23 +64,31 @@ gulp.task('lint', function() { }); gulp.task('doc', function(){ - gulp.src(path.source) + return gulp.src(path.source) .pipe(yuidoc.parser(null, 'api.json')) .pipe(gulp.dest(path.doc)); }); +gulp.task('bump-version', function(){ + return gulp.src(['./bower.json', './package.json']) + .pipe(bump({type:'patch'})) //major|minor|patch|prerelease + .pipe(gulp.dest('./')); +}); + gulp.task('changelog', function(callback) { - changelog({ + var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8')); + + return changelog({ repository: pkg.repository.url, version: pkg.version, - file: 'CHANGELOG.md' + file: path.doc + '/CHANGELOG.md' }, function(err, log) { fs.writeFileSync(path.doc + '/CHANGELOG.md', log); }); }); gulp.task('build', function(callback) { - runSequence( + return runSequence( 'clean', ['build-es6', 'build-commonjs', 'build-amd'], callback @@ -88,9 +96,10 @@ gulp.task('build', function(callback) { }); gulp.task('prepare-release', function(callback){ - runSequence( + return runSequence( 'build', 'lint', + 'bump-version', 'doc', 'changelog', callback diff --git a/karma.conf.js b/karma.conf.js index dd69fdf..8377a98 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -14,7 +14,7 @@ module.exports = function(config) { jspm: { // Edit this to your needs - loadFiles: ['lib/**/*.js', 'test/**/*.js'] + loadFiles: ['src/**/*.js', 'test/**/*.js'] }, @@ -31,7 +31,7 @@ module.exports = function(config) { // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { 'test/**/*.js': ['6to5'], - 'lib/**/*.js': ['6to5'] + 'src/**/*.js': ['6to5'] }, diff --git a/package.json b/package.json index 7fc1735..b0d8f6c 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "conventional-changelog": "0.0.11", "gulp": "^3.8.10", "gulp-6to5": "^1.0.2", + "gulp-bump": "^0.1.11", "gulp-clean": "^0.3.1", "gulp-jshint": "^1.9.0", "gulp-yuidoc": "^0.1.2", @@ -39,5 +40,33 @@ "karma-jspm": "^1.0.1", "object.assign": "^1.0.3", "run-sequence": "^1.0.2" + }, + "aurelia": { + "usedBy": [ + "aurelia-framework", + "aurelia-templating" + ], + "documentation": { + "links": [ + { + "rel": "license", + "mediaType": "text/plain", + "title": "The MIT License (MIT)", + "href": "LICENSE" + }, + { + "rel": "describedby", + "mediaType": "application/yuidoc+json", + "title": "API", + "href": "doc/api.json" + }, + { + "rel": "version-history", + "mediaType": "text/markdown", + "title": "Change Log", + "href": "doc/CHANGELOG.md" + } + ] + } } -} \ No newline at end of file +} diff --git a/lib/index.js b/src/index.js similarity index 100% rename from lib/index.js rename to src/index.js diff --git a/test/logging.spec.js b/test/logging.spec.js index 00e0321..5b3854f 100644 --- a/test/logging.spec.js +++ b/test/logging.spec.js @@ -1,4 +1,4 @@ -import * as LogManager from '../lib/index'; +import * as LogManager from '../src/index'; describe('log manager', () => { it('should have some tests', () => {