https://github.com/thinkjs/think-inspect
inspect dirname/filename in ThinkJS 3.0
https://github.com/thinkjs/think-inspect
inspector thinkjs
Last synced: about 1 year ago
JSON representation
inspect dirname/filename in ThinkJS 3.0
- Host: GitHub
- URL: https://github.com/thinkjs/think-inspect
- Owner: thinkjs
- License: mit
- Created: 2017-02-08T09:23:44.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-13T13:24:09.000Z (almost 9 years ago)
- Last Synced: 2025-03-15T22:35:49.449Z (about 1 year ago)
- Topics: inspector, thinkjs
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# think-inspect
[](https://travis-ci.org/thinkjs/think-inspect)
[](https://coveralls.io/github/thinkjs/think-inspect?branch=master)
[](https://www.npmjs.com/package/think-inspect)
`think-inspect` checks if a project meets the requirement of ThinkJS 3.0
## Usage
Using npm:
```sh
npm install think-inspect
```
In Node.js:
```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
| API | Param | Description |
| ------------------- | ---------------------------------------- | ---------------------------------------- |
| `checkNodeVersion` | | check if node version meets the requirement in package.json |
| `checkFileName` | | check if filenames in application are in lowercase |
| `checkDependencies` | | check dependencies are installed before server starts |