diff --git a/README.md b/README.md index 41e7b826..f5d1f8cb 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Loopback Data is an ORM that provides a common set of interfaces for interacting ## Installation - slnode install loopback-data + slnode install loopback-datasource-juggler Also install the appropriated connector, for example for mongodb: diff --git a/docs/connector.md b/docs/connector.md index b83387d0..a977e5be 100644 --- a/docs/connector.md +++ b/docs/connector.md @@ -1,4 +1,4 @@ -# loopback-data-connector +# loopback-datasource-juggler-connector Loopback connectors provide access to backend systems including databases, REST APIs and other services. Connectors are not used directly by application code. We create @@ -6,7 +6,7 @@ a DataSource to interact with the connector. For example, - var DataSource = require('loopback-data').DataSource; + var DataSource = require('loopback-datasource-juggler').DataSource; var oracleConnector = require('loopback-connector-oracle'); var ds = new DataSource(oracleConnector, { diff --git a/docs/data-source.md b/docs/data-source.md index aceb6773..13eff8b0 100644 --- a/docs/data-source.md +++ b/docs/data-source.md @@ -1,4 +1,4 @@ -# loopback-data-datasource +# loopback-datasource-juggler-datasource Everything about datasource, data types and model definition. @@ -24,9 +24,9 @@ Instances of DataSource are event emitters, events supported by default: ### Creating dataSource -`DataSource` constructor available on `loopback-data` module: +`DataSource` constructor available on `loopback-datasource-juggler` module: - var DataSource = require('loopback-data').DataSource; + var DataSource = require('loopback-datasource-juggler').DataSource; DataSource constructor accepts two arguments. First argument is connector. It could be connector name or connector package: @@ -123,5 +123,5 @@ db structure outdated, true when dataSource and db is in sync: ## SEE ALSO -loopback-data-model -loopback-data-connector +loopback-datasource-juggler-model +loopback-datasource-juggler-connector diff --git a/docs/loopback-data.md b/docs/loopback-datasource-juggler.md similarity index 52% rename from docs/loopback-data.md rename to docs/loopback-datasource-juggler.md index e3d55d56..2822c056 100644 --- a/docs/loopback-data.md +++ b/docs/loopback-datasource-juggler.md @@ -1,11 +1,11 @@ -# loopback-data +# loopback-datasource-juggler Loopback-data provides ORM and data connectivity for Node.js. It was initially forked from [JugglingDB](https://github.com/1602/jugglingdb). ## Overview -![loopback-data](loopback-data.png "Loopback Data Diagram") +![loopback-datasource-juggler](loopback-datasource-juggler.png "Loopback Data Diagram") ## SEE ALSO -loopback-data-connector +loopback-datasource-juggler-connector diff --git a/docs/loopback-data.png b/docs/loopback-datasource-juggler.png similarity index 100% rename from docs/loopback-data.png rename to docs/loopback-datasource-juggler.png diff --git a/examples/app-noschema.js b/examples/app-noschema.js index 43fa63b3..528bf636 100644 --- a/examples/app-noschema.js +++ b/examples/app-noschema.js @@ -1,5 +1,5 @@ -var DataSource = require('../../loopback-data').DataSource; -var ModelBuilder = require('../../loopback-data').ModelBuilder; +var DataSource = require('../../loopback-datasource-juggler').DataSource; +var ModelBuilder = require('../../loopback-datasource-juggler').ModelBuilder; var introspectType = require('../lib/introspection'); var ds = new DataSource('memory'); diff --git a/examples/app.js b/examples/app.js index 40e4ffdf..a69d2cb9 100644 --- a/examples/app.js +++ b/examples/app.js @@ -1,4 +1,4 @@ -var ModelBuilder = require('../../loopback-data').ModelBuilder; +var ModelBuilder = require('../../loopback-datasource-juggler').ModelBuilder; var modelBuilder = new ModelBuilder(); // define models var Post = modelBuilder.define('Post', { diff --git a/examples/datasource-app.js b/examples/datasource-app.js index 9d71ed7f..b61b9a53 100644 --- a/examples/datasource-app.js +++ b/examples/datasource-app.js @@ -1,5 +1,5 @@ -var DataSource = require('../../loopback-data').DataSource; -var ModelBuilder = require('../../loopback-data').ModelBuilder; +var DataSource = require('../../loopback-datasource-juggler').DataSource; +var ModelBuilder = require('../../loopback-datasource-juggler').ModelBuilder; var ds = new DataSource('memory'); // define models diff --git a/examples/nesting-schema.js b/examples/nesting-schema.js index d8f9678e..bbb85cd6 100644 --- a/examples/nesting-schema.js +++ b/examples/nesting-schema.js @@ -1,4 +1,4 @@ -var ModelBuilder = require('../../loopback-data').ModelBuilder; +var ModelBuilder = require('../../loopback-datasource-juggler').ModelBuilder; var modelBuilder = new ModelBuilder(); // simplier way to describe model diff --git a/lib/connectors/cradle.js b/lib/connectors/cradle.js index e49add83..e34cbc4f 100644 --- a/lib/connectors/cradle.js +++ b/lib/connectors/cradle.js @@ -161,7 +161,7 @@ exports.initialize = function(dataSource, callback) { options.auth.password = dataSource.settings.password; } } - var database = dataSource.settings.database || 'loopback-data'; + var database = dataSource.settings.database || 'loopback-datasource-juggler'; dataSource.settings.host = host; dataSource.settings.port = port; diff --git a/lib/utils.js b/lib/utils.js index 4933a796..07c45b0a 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -6,7 +6,7 @@ function safeRequire(module) { try { return require(module); } catch (e) { - console.log('Run "npm install loopback-data ' + module + '" command to use loopback-data using ' + module + ' database engine'); + console.log('Run "npm install loopback-datasource-juggler ' + module + '" command to use loopback-datasource-juggler using ' + module + ' database engine'); process.exit(1); } } diff --git a/package.json b/package.json index 15f0e67b..9b35d24f 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { - "name": "loopback-data", + "name": "loopback-datasource-juggler", "description": "ORM for every database: redis, mysql, neo4j, mongodb, couchdb, postgres, sqlite", "version": "0.0.1", "repository": { "type": "git", - "url": "https://github.com/strongloop/loopback-data" + "url": "https://github.com/strongloop/loopback-datasource-juggler" }, "main": "index.js", "scripts": { diff --git a/test/loopback-data.test.js b/test/loopback-data.test.js index c86846db..578a2fd7 100644 --- a/test/loopback-data.test.js +++ b/test/loopback-data.test.js @@ -3,7 +3,7 @@ var should = require('./init.js'); var loopbackData = require('../'); -describe('loopback-data', function() { +describe('loopback-datasource-juggler', function() { it('should expose version', function () { loopbackData.version.should.equal(require('../package.json').version); });