development.js 420 B

123456789101112131415161718192021
  1. var thinkjs = require('thinkjs');
  2. var path = require('path');
  3. var rootPath = path.dirname(__dirname);
  4. var instance = new thinkjs({
  5. APP_PATH: rootPath + path.sep + 'app',
  6. RUNTIME_PATH: rootPath + path.sep + 'runtime',
  7. ROOT_PATH: rootPath,
  8. RESOURCE_PATH: __dirname,
  9. env: 'development'
  10. });
  11. // Build code from src to app directory.
  12. instance.compile({
  13. log: true,
  14. presets: [],
  15. plugins: []
  16. });
  17. instance.run();