From 737adc4b601d52f2381da45734a121a9c4dd2da5 Mon Sep 17 00:00:00 2001 From: Rob Eisenberg Date: Tue, 9 Dec 2014 01:17:38 -0500 Subject: [PATCH] chore(*): fixing up build, jspm and karma config --- doc/CHANGELOG.md | 2 +- doc/api.json | 2 +- karma.conf.js | 3 ++- package.json | 7 ++++--- test/annotations.spec.js | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index de2392a..22da10e 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,2 +1,2 @@ -### 0.0.2 (2014-12-08) +### 0.0.5 (2014-12-09) diff --git a/doc/api.json b/doc/api.json index 2d451da..8c658ce 100644 --- a/doc/api.json +++ b/doc/api.json @@ -1 +1 @@ -{"project":{},"files":{"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/annotations.js":{"name":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/annotations.js","modules":{},"classes":{},"fors":{"export":1},"namespaces":{}},"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/origin.js":{"name":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/origin.js","modules":{"metadata":1},"classes":{"Origin":1},"fors":{},"namespaces":{}},"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/resource-type.js":{"name":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/resource-type.js","modules":{},"classes":{"ResourceType":1},"fors":{},"namespaces":{}}},"modules":{"metadata":{"name":"metadata","submodules":{},"classes":{"export":1,"Origin":1,"ResourceType":1},"fors":{},"namespaces":{},"tag":"module","file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/resource-type.js","line":1,"description":"Utilities for reading and writing the metadata of JavaScript functions."}},"classes":{"export":{"name":"export","shortname":"export","classitems":[],"plugins":[],"extensions":[],"plugin_for":[],"extension_for":[],"module":"metadata"},"Origin":{"name":"Origin","shortname":"Origin","classitems":[],"plugins":[],"extensions":[],"plugin_for":[],"extension_for":[],"module":"metadata","namespace":"","file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/origin.js","line":15,"description":"A metadata annotation that describes the origin module of the function to which it's attached.","is_constructor":1,"params":[{"name":"moduleId","description":"The origin module id.","type":"String"},{"name":"moduleMember","description":"The name of the export in the origin module.","type":"String"}]},"ResourceType":{"name":"ResourceType","shortname":"ResourceType","classitems":[],"plugins":[],"extensions":[],"plugin_for":[],"extension_for":[],"module":"metadata","namespace":"","file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/resource-type.js","line":1,"description":"An abstract base class used to designate resources which can be loaded and registered in a framework.","is_constructor":1}},"classitems":[{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/annotations.js","line":1,"description":"Normalizes a function's annotation representation.","itemtype":"method","name":"normalize","params":[{"name":"fn","description":"The function whose annotations may require normalization.","type":"Function"}],"class":"export"},{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/annotations.js","line":14,"description":"Searches a function's metadata for an annotation of a particular type.","itemtype":"method","name":"getAnnotation","params":[{"name":"fn","description":"The function whose annotations are being inspected.","type":"Function"},{"name":"annotationType","description":"The annotation type to look for.","type":"Function"}],"return":{"description":"Returns an instance of the specified annotation type if found; otherwise null.","type":"Object"},"class":"export"},{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/annotations.js","line":42,"description":"Searches a function's metadata for all annotations of a particular type.","itemtype":"method","name":"getAllAnnotations","params":[{"name":"fn","description":"The function whose annotations are being inspected.","type":"Function"},{"name":"annotationType","description":"The annotation type to look for.","type":"Function"}],"return":{"description":"Returns an array of the specified annotation type.","type":"Array"},"class":"export"},{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/annotations.js","line":70,"description":"Adds metadata to a function.","itemtype":"method","name":"addAnnotation","params":[{"name":"fn","description":"The function being tagged with metadata.","type":"Function"},{"name":"annotation","description":"The annotation instance to add.","type":"Object"}],"class":"export"},{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/origin.js","line":29,"description":"Get the Origin annotation for the specified function.","itemtype":"method","name":"get","static":1,"params":[{"name":"fn","description":"The function to inspect for Origin metadata.","type":"Function"}],"return":{"description":"Returns the Origin metadata.","type":"Origin"},"class":"Origin","module":"metadata"},{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/origin.js","line":55,"description":"Set the Origin annotation for the specified function.","itemtype":"method","name":"set","static":1,"params":[{"name":"fn","description":"The function to set the Origin metadata on.","type":"Function"},{"name":"fn","description":"The Origin metadata to store on the function.","type":"Origin"}],"return":{"description":"Returns the Origin metadata.","type":"Origin"},"class":"Origin","module":"metadata"},{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/resource-type.js","line":8,"description":"Implemented by resource metadata to allow it to self-configure and load dependencies.","itemtype":"method","name":"load","params":[{"name":"container","description":"The dependency injection container to use for service resolution.","type":"Container"},{"name":"target","description":"The target that is decorated by this ResourceType metadata.","type":"Object"}],"return":{"description":"Returns a promise for itself, resolving when all dependent resources are loaded.","type":"Promise"},"class":"ResourceType","module":"metadata"},{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/Aurelia/metadata/lib/resource-type.js","line":20,"description":"Implemented by resources to allow them to register themselved in a resource registry.","itemtype":"method","name":"register","params":[{"name":"registry","description":"The resource registry that this resource needs to be registered in.","type":"ResourceRegistry"},{"name":"name","description":"A possible name override for the resource.","type":"String","optional":true}],"class":"ResourceType","module":"metadata"}],"warnings":[]} \ No newline at end of file +{"project":{},"files":{"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/annotations.js":{"name":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/annotations.js","modules":{},"classes":{},"fors":{"export":1},"namespaces":{}},"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/origin.js":{"name":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/origin.js","modules":{"metadata":1},"classes":{"Origin":1},"fors":{},"namespaces":{}},"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/resource-type.js":{"name":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/resource-type.js","modules":{},"classes":{"ResourceType":1},"fors":{},"namespaces":{}}},"modules":{"metadata":{"name":"metadata","submodules":{},"classes":{"export":1,"Origin":1,"ResourceType":1},"fors":{},"namespaces":{},"tag":"module","file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/resource-type.js","line":1,"description":"Utilities for reading and writing the metadata of JavaScript functions."}},"classes":{"export":{"name":"export","shortname":"export","classitems":[],"plugins":[],"extensions":[],"plugin_for":[],"extension_for":[],"module":"metadata"},"Origin":{"name":"Origin","shortname":"Origin","classitems":[],"plugins":[],"extensions":[],"plugin_for":[],"extension_for":[],"module":"metadata","namespace":"","file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/origin.js","line":15,"description":"A metadata annotation that describes the origin module of the function to which it's attached.","is_constructor":1,"params":[{"name":"moduleId","description":"The origin module id.","type":"String"},{"name":"moduleMember","description":"The name of the export in the origin module.","type":"String"}]},"ResourceType":{"name":"ResourceType","shortname":"ResourceType","classitems":[],"plugins":[],"extensions":[],"plugin_for":[],"extension_for":[],"module":"metadata","namespace":"","file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/resource-type.js","line":1,"description":"An abstract base class used to designate resources which can be loaded and registered in a framework.","is_constructor":1}},"classitems":[{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/annotations.js","line":1,"description":"Normalizes a function's annotation representation.","itemtype":"method","name":"normalize","params":[{"name":"fn","description":"The function whose annotations may require normalization.","type":"Function"}],"class":"export"},{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/annotations.js","line":14,"description":"Searches a function's metadata for an annotation of a particular type.","itemtype":"method","name":"getAnnotation","params":[{"name":"fn","description":"The function whose annotations are being inspected.","type":"Function"},{"name":"annotationType","description":"The annotation type to look for.","type":"Function"}],"return":{"description":"Returns an instance of the specified annotation type if found; otherwise null.","type":"Object"},"class":"export"},{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/annotations.js","line":42,"description":"Searches a function's metadata for all annotations of a particular type.","itemtype":"method","name":"getAllAnnotations","params":[{"name":"fn","description":"The function whose annotations are being inspected.","type":"Function"},{"name":"annotationType","description":"The annotation type to look for.","type":"Function"}],"return":{"description":"Returns an array of the specified annotation type.","type":"Array"},"class":"export"},{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/annotations.js","line":70,"description":"Adds metadata to a function.","itemtype":"method","name":"addAnnotation","params":[{"name":"fn","description":"The function being tagged with metadata.","type":"Function"},{"name":"annotation","description":"The annotation instance to add.","type":"Object"}],"class":"export"},{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/origin.js","line":29,"description":"Get the Origin annotation for the specified function.","itemtype":"method","name":"get","static":1,"params":[{"name":"fn","description":"The function to inspect for Origin metadata.","type":"Function"}],"return":{"description":"Returns the Origin metadata.","type":"Origin"},"class":"Origin","module":"metadata"},{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/origin.js","line":55,"description":"Set the Origin annotation for the specified function.","itemtype":"method","name":"set","static":1,"params":[{"name":"fn","description":"The function to set the Origin metadata on.","type":"Function"},{"name":"fn","description":"The Origin metadata to store on the function.","type":"Origin"}],"return":{"description":"Returns the Origin metadata.","type":"Origin"},"class":"Origin","module":"metadata"},{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/resource-type.js","line":8,"description":"Implemented by resource metadata to allow it to self-configure and load dependencies.","itemtype":"method","name":"load","params":[{"name":"container","description":"The dependency injection container to use for service resolution.","type":"Container"},{"name":"target","description":"The target that is decorated by this ResourceType metadata.","type":"Object"}],"return":{"description":"Returns a promise for itself, resolving when all dependent resources are loaded.","type":"Promise"},"class":"ResourceType","module":"metadata"},{"file":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/metadata/lib/resource-type.js","line":20,"description":"Implemented by resources to allow them to register themselved in a resource registry.","itemtype":"method","name":"register","params":[{"name":"registry","description":"The resource registry that this resource needs to be registered in.","type":"ResourceRegistry"},{"name":"name","description":"A possible name override for the resource.","type":"String","optional":true}],"class":"ResourceType","module":"metadata"}],"warnings":[]} \ No newline at end of file diff --git a/karma.conf.js b/karma.conf.js index 1702783..2635eb4 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: ['dist/amd/**/*.js', 'test/**/*.js'] }, @@ -30,6 +30,7 @@ module.exports = function(config) { // preprocess matching files before serving them to the browser // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor preprocessors: { + 'test/**/*.js': ['6to5'] }, diff --git a/package.json b/package.json index 01d806e..011a36c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-metadata", - "version": "0.0.4", + "version": "0.0.5", "description": "Utilities for reading and writing the metadata of JavaScript functions.", "keywords": [ "aurelia", @@ -22,7 +22,7 @@ "directories": { "lib": "dist" }, - "main": "commonjs/index" + "main": "amd/index" }, "devDependencies": { "conventional-changelog": "0.0.11", @@ -34,10 +34,11 @@ "jasmine-core": "^2.1.3", "jshint-stylish": "^1.0.0", "karma": "^0.12.28", + "karma-6to5-preprocessor": "^0.1.3", "karma-chrome-launcher": "^0.1.7", "karma-jasmine": "^0.3.2", "karma-jspm": "^1.0.1", "object.assign": "^1.0.3", "run-sequence": "^1.0.2" } -} \ No newline at end of file +} diff --git a/test/annotations.spec.js b/test/annotations.spec.js index e4610fb..50db836 100644 --- a/test/annotations.spec.js +++ b/test/annotations.spec.js @@ -3,7 +3,7 @@ import { getAllAnnotations, addAnnotation, normalize -} from '../lib/index'; +} from '../dist/amd/index'; describe('annotations', () => { it('can be located by type', () => {