0.0.2 • Published 7 years ago

think-inspect v0.0.2

Weekly downloads
131
License
-
Repository
github
Last release
7 years ago

think-inspect

Build Status Coverage Status npm

think-inspect checks if a project meets the requirement of ThinkJS 3.0

Usage

Using npm:

npm install think-inspect

In Node.js:

import Inspector from 'think-inspect';
...

const inspector = new Inspector({
  THINK_PATH: '/somepath/thinkjs',
  APP_PATH: '/somepath/app_path',
  ROOT_PATH: '/somepath/root_path',
  env: 'development',
  locale: 'locale'
  logger: thinkLoggerInstance
});
inspector.checkNodeVersion();
inspector.checkFileName();
inspector.checkDependencies();

APIs

APIParamDescription
checkNodeVersioncheck if node version meets the requirement in package.json
checkFileNamecheck if filenames in application are in lowercase
checkDependenciescheck dependencies are installed before server starts