diff --git a/packages/-ember-data/ember-cli-build.js b/packages/-ember-data/ember-cli-build.js index 99732d4e727..fe909e5a29e 100644 --- a/packages/-ember-data/ember-cli-build.js +++ b/packages/-ember-data/ember-cli-build.js @@ -12,6 +12,9 @@ module.exports = function(defaults) { 'ember-cli-babel': { throwUnlessParallelizable: true, }, + 'ember-cli-uglify': { + exclude: ['assets/dummy.js', 'assets/tests.js', 'assets/test-support.js', 'dist/docs/*', 'docs/*'], + }, }); /* diff --git a/packages/-ember-data/node-tests/docs/test-coverage.js b/packages/-ember-data/node-tests/docs/test-coverage.js index 9d6379f5e49..d1fc370aa42 100644 --- a/packages/-ember-data/node-tests/docs/test-coverage.js +++ b/packages/-ember-data/node-tests/docs/test-coverage.js @@ -11,7 +11,7 @@ QUnit.module('Docs coverage', function(hooks) { if (!process.env.REUSE_DOCS) { buildDocs(); } - docs = require(path.join(__dirname, '../../docs/data.json')); + docs = require(path.join(__dirname, '../../dist/docs/data.json')); expected = require('../fixtures/expected'); }); diff --git a/packages/-ember-data/node-tests/fixtures/expected.js b/packages/-ember-data/node-tests/fixtures/expected.js index 0e5f343159f..501bbf1ddbe 100644 --- a/packages/-ember-data/node-tests/fixtures/expected.js +++ b/packages/-ember-data/node-tests/fixtures/expected.js @@ -252,5 +252,15 @@ module.exports = { 'pushPayload [OPTIONAL]', 'serializeIntoHash [OPTIONAL]', 'normalize [OPTIONAL]', + 'columnNameToDesc', + 'columnsForType', + 'getFilters', + 'getRecordColor', + 'getRecordColumnValues', + 'getRecordFilterValues', + 'getRecordKeywords', + 'getRecords', + 'watchModelTypes', + 'observeRecord', ], }; diff --git a/packages/-ember-data/package.json b/packages/-ember-data/package.json index a5587c8a2f9..ce3957ff752 100644 --- a/packages/-ember-data/package.json +++ b/packages/-ember-data/package.json @@ -11,14 +11,14 @@ "build": "ember build", "build:production": "ember build --environment=production", "start": "ember server", - "docs": "ember ember-cli-yuidoc", + "docs": "mkdir -p dist && ember ember-cli-yuidoc", "test": "ember test", "test:all": "ember try:each", "test:production": "ember test -e production", "test:optional-features": "ember test", "test:try-one": "ember try:one", - "test:docs": "qunit node-tests/docs/test-coverage.js", - "prepublishOnly": "ember build --environment=production" + "test:docs": "mkdir -p dist && qunit node-tests/docs/test-coverage.js", + "prepublishOnly": "mkdir -p dist && ember ember-cli-yuidoc" }, "author": "", "license": "MIT", diff --git a/packages/-ember-data/yuidoc.json b/packages/-ember-data/yuidoc.json index e4035ce81fe..dc4db8d7828 100644 --- a/packages/-ember-data/yuidoc.json +++ b/packages/-ember-data/yuidoc.json @@ -3,7 +3,7 @@ "description": "The ember-data API: a data persistence library for Ember.js", "url": "https://github.com/emberjs/data", "options": { - "enabledEnvironments": ["production"], + "enabledEnvironments": [], "extension": ".js,.ts", "paths": [ "addon", @@ -12,9 +12,10 @@ "../model/addon", "../serializer/addon", "../store/addon", - "../store/addon/-private/system" + "../record-data/addon", + "../debug/addon" ], "exclude": "vendor", - "outdir": "docs" + "outdir": "dist/docs" } } diff --git a/packages/debug/addon/index.js b/packages/debug/addon/index.js index 206bd87bc85..e11b5da8d02 100644 --- a/packages/debug/addon/index.js +++ b/packages/debug/addon/index.js @@ -48,8 +48,9 @@ export default DataAdapter.extend({ Specifies how records can be filtered based on the state of the record Records returned will need to have a `filterValues` property with a key for every name in the returned array - @private + @method getFilters + @private @return {Array} List of objects defining filters The object should have a `name` and `desc` property */ @@ -68,8 +69,9 @@ export default DataAdapter.extend({ /** Fetch the model types and observe them for changes. Maintains the list of model types without needing the Model package for detection. - @public + @method watchModelTypes + @public @param {Function} typesAdded Callback to call to add types. Takes an array of objects containing wrapped types (returned from `wrapModelType`). @param {Function} typesUpdated Callback to call when a type has changed. @@ -113,6 +115,7 @@ export default DataAdapter.extend({ * the consumer of this adapter about the mdoels. * * @param {store} store + * @internal * @param {Map} discoveredTypes * @param {String} type * @param {Function} typesAdded @@ -131,8 +134,9 @@ export default DataAdapter.extend({ /** Creates a human readable string used for column headers - @private + @method columnNameToDesc + @private @param {String} name The attribute name @return {String} Human readable string based on the attribute name */ @@ -146,8 +150,9 @@ export default DataAdapter.extend({ /** Get the columns for a given model type - @private + @method columnsForType + @private @param {Model} typeClass @return {Array} An array of columns of the following format: name: {String} The name of the column @@ -174,8 +179,9 @@ export default DataAdapter.extend({ /** Fetches all loaded records for a given type - @private + @method getRecords + @internal @param {Model} modelClass of the record @param {String} modelName of the record @return {Array} An array of Model records @@ -200,8 +206,9 @@ export default DataAdapter.extend({ /** Gets the values for each column This is the attribute values for a given record - @private + @method getRecordColumnValues + @private @param {Model} record to get values from @return {Object} Keys should match column names defined by the model type */ @@ -220,8 +227,9 @@ export default DataAdapter.extend({ /** Returns keywords to match when searching records - @private + @method getRecordKeywords + @private @param {Model} record @return {Array} Relevant keywords for search based on the record's attribute values */ @@ -236,8 +244,9 @@ export default DataAdapter.extend({ /** Returns the values of filters defined by `getFilters` These reflect the state of the record - @private + @method getRecordFilterValues + @private @param {Model} record @return {Object} The record state filter values */ @@ -251,11 +260,12 @@ export default DataAdapter.extend({ /** Returns a color that represents the record's state - @private + Possible colors: black, blue, green + @method getRecordColor + @private @param {Model} record @return {String} The record color - Possible options: black, blue, green */ getRecordColor(record) { let color = 'black'; @@ -270,8 +280,9 @@ export default DataAdapter.extend({ /** Observes all relevant properties and re-sends the wrapped record when a change occurs - @private - @method observerRecord + + @method observeRecord + @internal @param {Model} record @param {Function} recordUpdated Callback used to notify changes @return {Function} The function to call to remove all observers