memserver
Advanced tools
Comparing version 0.6.8 to 0.6.9
@@ -35,2 +35,5 @@ #! /usr/bin/env node | ||
CLI.command(['build', 'rollup'], buildMemServerDist); | ||
CLI.command(['version', 'v'], () => { | ||
console.log(chalk.cyan('[MemServer CLI]'), require('./package.json').version); | ||
}); | ||
@@ -45,2 +48,3 @@ function printCommands() { | ||
memserver build | rollup ${chalk.yellow('[outputFile]')} # Builds an ES5 javascript bundle with all your memserver code | ||
memserver version | v # Displays memserver version | ||
`); | ||
@@ -101,3 +105,3 @@ } | ||
if (!fs.existsSync(`${memServerDirectory}/models/${modelFileName}.js`)) { | ||
fs.writeFileSync(`${memServerDirectory}/models/${modelFileName}.js`, `import { Model } from 'memserver'; | ||
fs.writeFileSync(`${memServerDirectory}/models/${modelFileName}.js`, `import Model from 'memserver/model'; | ||
export default Model({ | ||
@@ -104,0 +108,0 @@ |
@@ -12,4 +12,4 @@ import chalk from 'chalk'; | ||
import Model from './model'; | ||
import Response from './response'; | ||
// import Model from './model'; | ||
// import Response from './response'; | ||
import startServer from './server'; | ||
@@ -23,4 +23,2 @@ | ||
// export { Model, Response }; | ||
export default function(modelFixtureTree, Server, initializer=() => {}) { | ||
@@ -35,4 +33,4 @@ if (!Server) { | ||
Models: registerModels(modelFixtureTree), | ||
Model: Model, | ||
Response: Response, | ||
// Model: Model, | ||
// Response: Response, | ||
start(options={ logging: true }) { | ||
@@ -39,0 +37,0 @@ this.DB = resetDatabase(this.Models, modelFixtureTree); |
{ | ||
"name": "memserver", | ||
"version": "0.6.8", | ||
"version": "0.6.9", | ||
"description": "in-memory database/ORM and http mock server you can run in-browser and node environments. Built for large frontend teams, fast tests and rapid prototyping", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
510116
46
11616