Skip to content

Commit e08f016

Browse files
chore(*): repository maintenance
Moved lib to src. Fixed up gulp file with version bump. Added a bower.json file. Added aurelia metadata to package.json. Updated the readme with Used By libs.
1 parent ddd3a7f commit e08f016

7 files changed

+71
-10
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ This library is part of the [Aurelia](http://www.aurelia.io/) platform and conta
88

99
* [aurelia-history](https://github.com/aurelia/history)
1010

11+
## Used By
12+
13+
* [aurelia-bootstrapper](https://github.com/aurelia/bootstrapper)
14+
1115
## Platform Support
1216

1317
This library can be used in the **browser** only.

bower.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "aurelia-history-browser",
3+
"version": "0.1.0",
4+
"description": "An implementation of the Aurelia history interface based on standard browser hash change and push state mechanisms.",
5+
"keywords": [
6+
"aurelia",
7+
"history",
8+
"router"
9+
],
10+
"homepage": "http://aurelia.io",
11+
"license": "MIT",
12+
"authors": ["Rob Eisenberg <[email protected]> (http://robeisenberg.com/)"],
13+
"repository": {
14+
"type": "git",
15+
"url": "http://github.com/aurelia/history-browser"
16+
},
17+
"dependencies": {
18+
"aurelia-history": "0.1.0"
19+
}
20+
}

gulpfile.js

+16-7
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ var stylish = require('jshint-stylish');
77
var yuidoc = require("gulp-yuidoc");
88
var changelog = require('conventional-changelog');
99
var assign = Object.assign || require('object.assign');
10-
var pkg = require('./package.json');
1110
var fs = require('fs');
11+
var bump = require('gulp-bump');
1212

1313
var path = {
14-
source:'lib/**/*.js',
14+
source:'src/**/*.js',
1515
output:'dist/',
1616
doc:'./doc'
1717
};
@@ -64,33 +64,42 @@ gulp.task('lint', function() {
6464
});
6565

6666
gulp.task('doc', function(){
67-
gulp.src(path.source)
67+
return gulp.src(path.source)
6868
.pipe(yuidoc.parser(null, 'api.json'))
6969
.pipe(gulp.dest(path.doc));
7070
});
7171

72+
gulp.task('bump-version', function(){
73+
return gulp.src(['./bower.json', './package.json'])
74+
.pipe(bump({type:'patch'})) //major|minor|patch|prerelease
75+
.pipe(gulp.dest('./'));
76+
});
77+
7278
gulp.task('changelog', function(callback) {
73-
changelog({
79+
var pkg = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
80+
81+
return changelog({
7482
repository: pkg.repository.url,
7583
version: pkg.version,
76-
file: 'CHANGELOG.md'
84+
file: path.doc + '/CHANGELOG.md'
7785
}, function(err, log) {
7886
fs.writeFileSync(path.doc + '/CHANGELOG.md', log);
7987
});
8088
});
8189

8290
gulp.task('build', function(callback) {
83-
runSequence(
91+
return runSequence(
8492
'clean',
8593
['build-es6', 'build-commonjs', 'build-amd'],
8694
callback
8795
);
8896
});
8997

9098
gulp.task('prepare-release', function(callback){
91-
runSequence(
99+
return runSequence(
92100
'build',
93101
'lint',
102+
'bump-version',
94103
'doc',
95104
'changelog',
96105
callback

karma.conf.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = function(config) {
1414

1515
jspm: {
1616
// Edit this to your needs
17-
loadFiles: ['lib/**/*.js', 'test/**/*.js']
17+
loadFiles: ['src/**/*.js', 'test/**/*.js']
1818
},
1919

2020

@@ -31,7 +31,7 @@ module.exports = function(config) {
3131
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
3232
preprocessors: {
3333
'test/**/*.js': ['6to5'],
34-
'lib/**/*.js': ['6to5']
34+
'src/**/*.js': ['6to5']
3535
},
3636

3737

package.json

+28
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"conventional-changelog": "0.0.11",
3232
"gulp": "^3.8.10",
3333
"gulp-6to5": "^1.0.2",
34+
"gulp-bump": "^0.1.11",
3435
"gulp-clean": "^0.3.1",
3536
"gulp-jshint": "^1.9.0",
3637
"gulp-yuidoc": "^0.1.2",
@@ -43,5 +44,32 @@
4344
"karma-jspm": "^1.0.1",
4445
"object.assign": "^1.0.3",
4546
"run-sequence": "^1.0.2"
47+
},
48+
"aurelia": {
49+
"usedBy": [
50+
"aurelia-bootstrapper"
51+
],
52+
"documentation": {
53+
"links": [
54+
{
55+
"rel": "license",
56+
"mediaType": "text/plain",
57+
"title": "The MIT License (MIT)",
58+
"href": "LICENSE"
59+
},
60+
{
61+
"rel": "describedby",
62+
"mediaType": "application/yuidoc+json",
63+
"title": "API",
64+
"href": "doc/api.json"
65+
},
66+
{
67+
"rel": "version-history",
68+
"mediaType": "text/markdown",
69+
"title": "Change Log",
70+
"href": "doc/CHANGELOG.md"
71+
}
72+
]
73+
}
4674
}
4775
}

lib/index.js src/index.js

File renamed without changes.

test/history.spec.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {BrowserHistory} from '../lib/index';
1+
import {BrowserHistory} from '../src/index';
22

33
describe('browser history', () => {
44
it('should have some tests', () => {

0 commit comments

Comments
 (0)