Yuki Takei 7 år sedan
förälder
incheckning
2b42e4ebfb
100 ändrade filer med 13 tillägg och 13 borttagningar
  1. 1 1
      app.js
  2. 1 1
      bin/generate-plugin-definitions-source.js
  3. 3 3
      config/webpack.common.js
  4. 4 4
      package.json
  5. 0 0
      resource/locales/en-US/notifications/comment.txt
  6. 0 0
      resource/locales/en-US/notifications/pageCreate.txt
  7. 0 0
      resource/locales/en-US/notifications/pageDelete.txt
  8. 0 0
      resource/locales/en-US/notifications/pageEdit.txt
  9. 0 0
      resource/locales/en-US/notifications/pageLike.txt
  10. 0 0
      resource/locales/en-US/notifications/pageMove.txt
  11. 0 0
      resource/locales/en-US/sandbox-bootstrap3.md
  12. 0 0
      resource/locales/en-US/sandbox.md
  13. 0 0
      resource/locales/en-US/translation.json
  14. 0 0
      resource/locales/en-US/welcome.md
  15. 0 0
      resource/locales/index.js
  16. 0 0
      resource/locales/ja/notifications/comment.txt
  17. 0 0
      resource/locales/ja/notifications/pageCreate.txt
  18. 0 0
      resource/locales/ja/notifications/pageDelete.txt
  19. 0 0
      resource/locales/ja/notifications/pageEdit.txt
  20. 0 0
      resource/locales/ja/notifications/pageLike.txt
  21. 0 0
      resource/locales/ja/notifications/pageMove.txt
  22. 0 0
      resource/locales/ja/sandbox.md
  23. 0 0
      resource/locales/ja/translation.json
  24. 0 0
      resource/locales/ja/welcome.md
  25. 0 0
      src/lib/crowi/dev.js
  26. 0 0
      src/lib/crowi/express-init.js
  27. 4 4
      src/lib/crowi/index.js
  28. 0 0
      src/lib/events/page.js
  29. 0 0
      src/lib/events/user.js
  30. 0 0
      src/lib/form/admin/app.js
  31. 0 0
      src/lib/form/admin/aws.js
  32. 0 0
      src/lib/form/admin/custombehavior.js
  33. 0 0
      src/lib/form/admin/customcss.js
  34. 0 0
      src/lib/form/admin/customfeatures.js
  35. 0 0
      src/lib/form/admin/customheader.js
  36. 0 0
      src/lib/form/admin/customhighlightJsStyle.js
  37. 0 0
      src/lib/form/admin/customlayout.js
  38. 0 0
      src/lib/form/admin/customscript.js
  39. 0 0
      src/lib/form/admin/customtheme.js
  40. 0 0
      src/lib/form/admin/customtitle.js
  41. 0 0
      src/lib/form/admin/mail.js
  42. 0 0
      src/lib/form/admin/markdown.js
  43. 0 0
      src/lib/form/admin/markdownXss.js
  44. 0 0
      src/lib/form/admin/notificationGlobal.js
  45. 0 0
      src/lib/form/admin/plugin.js
  46. 0 0
      src/lib/form/admin/securityGeneral.js
  47. 0 0
      src/lib/form/admin/securityGoogle.js
  48. 0 0
      src/lib/form/admin/securityMechanism.js
  49. 0 0
      src/lib/form/admin/securityPassportGitHub.js
  50. 0 0
      src/lib/form/admin/securityPassportGoogle.js
  51. 0 0
      src/lib/form/admin/securityPassportLdap.js
  52. 0 0
      src/lib/form/admin/securityPassportTwitter.js
  53. 0 0
      src/lib/form/admin/slackIwhSetting.js
  54. 0 0
      src/lib/form/admin/slackSetting.js
  55. 0 0
      src/lib/form/admin/userGroupCreate.js
  56. 0 0
      src/lib/form/admin/userInvite.js
  57. 0 0
      src/lib/form/comment.js
  58. 0 0
      src/lib/form/index.js
  59. 0 0
      src/lib/form/invited.js
  60. 0 0
      src/lib/form/login.js
  61. 0 0
      src/lib/form/me/apiToken.js
  62. 0 0
      src/lib/form/me/imagetype.js
  63. 0 0
      src/lib/form/me/password.js
  64. 0 0
      src/lib/form/me/user.js
  65. 0 0
      src/lib/form/register.js
  66. 0 0
      src/lib/form/revision.js
  67. 0 0
      src/lib/models/GlobalNotificationSetting.js
  68. 0 0
      src/lib/models/GlobalNotificationSetting/GlobalNotificationMailSetting.js
  69. 0 0
      src/lib/models/GlobalNotificationSetting/GlobalNotificationSlackSetting.js
  70. 0 0
      src/lib/models/GlobalNotificationSetting/index.js
  71. 0 0
      src/lib/models/attachment.js
  72. 0 0
      src/lib/models/bookmark.js
  73. 0 0
      src/lib/models/comment.js
  74. 0 0
      src/lib/models/config.js
  75. 0 0
      src/lib/models/external-account.js
  76. 0 0
      src/lib/models/index.js
  77. 0 0
      src/lib/models/page-group-relation.js
  78. 0 0
      src/lib/models/page.js
  79. 0 0
      src/lib/models/revision.js
  80. 0 0
      src/lib/models/updatePost.js
  81. 0 0
      src/lib/models/user-group-relation.js
  82. 0 0
      src/lib/models/user-group.js
  83. 0 0
      src/lib/models/user.js
  84. 0 0
      src/lib/plugins/plugin-utils-v2.js
  85. 0 0
      src/lib/plugins/plugin-utils.js
  86. 0 0
      src/lib/plugins/plugin.service.js
  87. 0 0
      src/lib/routes/admin.js
  88. 0 0
      src/lib/routes/attachment.js
  89. 0 0
      src/lib/routes/bookmark.js
  90. 0 0
      src/lib/routes/comment.js
  91. 0 0
      src/lib/routes/hackmd.js
  92. 0 0
      src/lib/routes/index.js
  93. 0 0
      src/lib/routes/installer.js
  94. 0 0
      src/lib/routes/login-passport.js
  95. 0 0
      src/lib/routes/login.js
  96. 0 0
      src/lib/routes/logout.js
  97. 0 0
      src/lib/routes/me.js
  98. 0 0
      src/lib/routes/page.js
  99. 0 0
      src/lib/routes/revision.js
  100. 0 0
      src/lib/routes/search.js

+ 1 - 1
app.js

@@ -9,7 +9,7 @@ require('module-alias/register');
 
 const logger = require('@alias/logger')('growi');
 const helpers = require('./config/helpers');
-const growi = new (require('./lib/crowi'))(__dirname, process.env);
+const growi = new (require('./src/lib/crowi'))(__dirname, process.env);
 
 
 /************************************

+ 1 - 1
bin/generate-plugin-definitions-source.js

@@ -11,7 +11,7 @@ const helpers = require('../config/helpers');
 const TEMPLATE = helpers.root('bin/templates/plugin-definitions.js.swig');
 const OUT = helpers.root('tmp/plugins/plugin-definitions.js');
 
-const PluginUtils = require('../lib/plugins/plugin-utils');
+const PluginUtils = require('../src/lib/plugins/plugin-utils');
 const pluginUtils = new PluginUtils();
 
 

+ 3 - 3
config/webpack.common.js

@@ -58,10 +58,10 @@ module.exports = (options) => {
       modules: [helpers.root('node_modules')],
       alias: {
         '@root': helpers.root('/'),
-        '@commons': helpers.root('lib'),
+        '@commons': helpers.root('src/lib'),
         '@tmp': helpers.root('tmp'),
-        '@alias/logger': helpers.root('lib/service/logger'),
-        '@alias/locales': helpers.root('lib/locales'),
+        '@alias/logger': helpers.root('src/lib/service/logger'),
+        '@alias/locales': helpers.root('resource/locales'),
         // replace bunyan
         'bunyan': 'browser-bunyan',
       }

+ 4 - 4
package.json

@@ -199,9 +199,9 @@
   },
   "_moduleAliases": {
     "@root": ".",
-    "@server": "lib",
-    "@alias/logger": "lib/service/logger",
-    "debug": "lib/service/logger/alias-for-debug"
+    "@server": "src/lib",
+    "@alias/logger": "src/lib/service/logger",
+    "debug": "src/lib/service/logger/alias-for-debug"
   },
   "engines": {
     "node": ">=8.11.1 <9",
@@ -210,7 +210,7 @@
   },
   "config": {
     "blanket": {
-      "pattern": "./lib/**/*.js"
+      "pattern": "./src/lib/**/*.js"
     }
   }
 }

+ 0 - 0
lib/locales/en-US/notifications/comment.txt → resource/locales/en-US/notifications/comment.txt


+ 0 - 0
lib/locales/en-US/notifications/pageCreate.txt → resource/locales/en-US/notifications/pageCreate.txt


+ 0 - 0
lib/locales/en-US/notifications/pageDelete.txt → resource/locales/en-US/notifications/pageDelete.txt


+ 0 - 0
lib/locales/en-US/notifications/pageEdit.txt → resource/locales/en-US/notifications/pageEdit.txt


+ 0 - 0
lib/locales/en-US/notifications/pageLike.txt → resource/locales/en-US/notifications/pageLike.txt


+ 0 - 0
lib/locales/en-US/notifications/pageMove.txt → resource/locales/en-US/notifications/pageMove.txt


+ 0 - 0
lib/locales/en-US/sandbox-bootstrap3.md → resource/locales/en-US/sandbox-bootstrap3.md


+ 0 - 0
lib/locales/en-US/sandbox.md → resource/locales/en-US/sandbox.md


+ 0 - 0
lib/locales/en-US/translation.json → resource/locales/en-US/translation.json


+ 0 - 0
lib/locales/en-US/welcome.md → resource/locales/en-US/welcome.md


+ 0 - 0
lib/locales/index.js → resource/locales/index.js


+ 0 - 0
lib/locales/ja/notifications/comment.txt → resource/locales/ja/notifications/comment.txt


+ 0 - 0
lib/locales/ja/notifications/pageCreate.txt → resource/locales/ja/notifications/pageCreate.txt


+ 0 - 0
lib/locales/ja/notifications/pageDelete.txt → resource/locales/ja/notifications/pageDelete.txt


+ 0 - 0
lib/locales/ja/notifications/pageEdit.txt → resource/locales/ja/notifications/pageEdit.txt


+ 0 - 0
lib/locales/ja/notifications/pageLike.txt → resource/locales/ja/notifications/pageLike.txt


+ 0 - 0
lib/locales/ja/notifications/pageMove.txt → resource/locales/ja/notifications/pageMove.txt


+ 0 - 0
lib/locales/ja/sandbox.md → resource/locales/ja/sandbox.md


+ 0 - 0
lib/locales/ja/translation.json → resource/locales/ja/translation.json


+ 0 - 0
lib/locales/ja/welcome.md → resource/locales/ja/welcome.md


+ 0 - 0
lib/crowi/dev.js → src/lib/crowi/dev.js


+ 0 - 0
lib/crowi/express-init.js → src/lib/crowi/express-init.js


+ 4 - 4
lib/crowi/index.js → src/lib/crowi/index.js

@@ -23,12 +23,12 @@ function Crowi(rootdir, env) {
   this.rootDir     = rootdir;
   this.pluginDir   = path.join(this.rootDir, 'node_modules') + sep;
   this.publicDir   = path.join(this.rootDir, 'public') + sep;
-  this.libDir      = path.join(this.rootDir, 'lib') + sep;
+  this.libDir      = path.join(this.rootDir, 'src/lib') + sep;
   this.eventsDir   = path.join(this.libDir, 'events') + sep;
-  this.localeDir   = path.join(this.libDir, 'locales') + sep;
-  this.resourceDir = path.join(this.rootDir, 'resource') + sep;
   this.viewsDir    = path.join(this.libDir, 'views') + sep;
   this.mailDir     = path.join(this.viewsDir, 'mail') + sep;
+  this.resourceDir = path.join(this.rootDir, 'resource') + sep;
+  this.localeDir   = path.join(this.resourceDir, 'locales') + sep;
   this.tmpDir      = path.join(this.rootDir, 'tmp') + sep;
   this.cacheDir    = path.join(this.tmpDir, 'cache');
 
@@ -276,7 +276,7 @@ Crowi.prototype.setupPassport = function() {
     this.passportService.setupLdapStrategy();
     this.passportService.setupGoogleStrategy();
     this.passportService.setupGitHubStrategy();
-    this.passportService.setupTwitterStrategy(); 
+    this.passportService.setupTwitterStrategy();
   }
   catch (err) {
     logger.error(err);

+ 0 - 0
lib/events/page.js → src/lib/events/page.js


+ 0 - 0
lib/events/user.js → src/lib/events/user.js


+ 0 - 0
lib/form/admin/app.js → src/lib/form/admin/app.js


+ 0 - 0
lib/form/admin/aws.js → src/lib/form/admin/aws.js


+ 0 - 0
lib/form/admin/custombehavior.js → src/lib/form/admin/custombehavior.js


+ 0 - 0
lib/form/admin/customcss.js → src/lib/form/admin/customcss.js


+ 0 - 0
lib/form/admin/customfeatures.js → src/lib/form/admin/customfeatures.js


+ 0 - 0
lib/form/admin/customheader.js → src/lib/form/admin/customheader.js


+ 0 - 0
lib/form/admin/customhighlightJsStyle.js → src/lib/form/admin/customhighlightJsStyle.js


+ 0 - 0
lib/form/admin/customlayout.js → src/lib/form/admin/customlayout.js


+ 0 - 0
lib/form/admin/customscript.js → src/lib/form/admin/customscript.js


+ 0 - 0
lib/form/admin/customtheme.js → src/lib/form/admin/customtheme.js


+ 0 - 0
lib/form/admin/customtitle.js → src/lib/form/admin/customtitle.js


+ 0 - 0
lib/form/admin/mail.js → src/lib/form/admin/mail.js


+ 0 - 0
lib/form/admin/markdown.js → src/lib/form/admin/markdown.js


+ 0 - 0
lib/form/admin/markdownXss.js → src/lib/form/admin/markdownXss.js


+ 0 - 0
lib/form/admin/notificationGlobal.js → src/lib/form/admin/notificationGlobal.js


+ 0 - 0
lib/form/admin/plugin.js → src/lib/form/admin/plugin.js


+ 0 - 0
lib/form/admin/securityGeneral.js → src/lib/form/admin/securityGeneral.js


+ 0 - 0
lib/form/admin/securityGoogle.js → src/lib/form/admin/securityGoogle.js


+ 0 - 0
lib/form/admin/securityMechanism.js → src/lib/form/admin/securityMechanism.js


+ 0 - 0
lib/form/admin/securityPassportGitHub.js → src/lib/form/admin/securityPassportGitHub.js


+ 0 - 0
lib/form/admin/securityPassportGoogle.js → src/lib/form/admin/securityPassportGoogle.js


+ 0 - 0
lib/form/admin/securityPassportLdap.js → src/lib/form/admin/securityPassportLdap.js


+ 0 - 0
lib/form/admin/securityPassportTwitter.js → src/lib/form/admin/securityPassportTwitter.js


+ 0 - 0
lib/form/admin/slackIwhSetting.js → src/lib/form/admin/slackIwhSetting.js


+ 0 - 0
lib/form/admin/slackSetting.js → src/lib/form/admin/slackSetting.js


+ 0 - 0
lib/form/admin/userGroupCreate.js → src/lib/form/admin/userGroupCreate.js


+ 0 - 0
lib/form/admin/userInvite.js → src/lib/form/admin/userInvite.js


+ 0 - 0
lib/form/comment.js → src/lib/form/comment.js


+ 0 - 0
lib/form/index.js → src/lib/form/index.js


+ 0 - 0
lib/form/invited.js → src/lib/form/invited.js


+ 0 - 0
lib/form/login.js → src/lib/form/login.js


+ 0 - 0
lib/form/me/apiToken.js → src/lib/form/me/apiToken.js


+ 0 - 0
lib/form/me/imagetype.js → src/lib/form/me/imagetype.js


+ 0 - 0
lib/form/me/password.js → src/lib/form/me/password.js


+ 0 - 0
lib/form/me/user.js → src/lib/form/me/user.js


+ 0 - 0
lib/form/register.js → src/lib/form/register.js


+ 0 - 0
lib/form/revision.js → src/lib/form/revision.js


+ 0 - 0
lib/models/GlobalNotificationSetting.js → src/lib/models/GlobalNotificationSetting.js


+ 0 - 0
lib/models/GlobalNotificationSetting/GlobalNotificationMailSetting.js → src/lib/models/GlobalNotificationSetting/GlobalNotificationMailSetting.js


+ 0 - 0
lib/models/GlobalNotificationSetting/GlobalNotificationSlackSetting.js → src/lib/models/GlobalNotificationSetting/GlobalNotificationSlackSetting.js


+ 0 - 0
lib/models/GlobalNotificationSetting/index.js → src/lib/models/GlobalNotificationSetting/index.js


+ 0 - 0
lib/models/attachment.js → src/lib/models/attachment.js


+ 0 - 0
lib/models/bookmark.js → src/lib/models/bookmark.js


+ 0 - 0
lib/models/comment.js → src/lib/models/comment.js


+ 0 - 0
lib/models/config.js → src/lib/models/config.js


+ 0 - 0
lib/models/external-account.js → src/lib/models/external-account.js


+ 0 - 0
lib/models/index.js → src/lib/models/index.js


+ 0 - 0
lib/models/page-group-relation.js → src/lib/models/page-group-relation.js


+ 0 - 0
lib/models/page.js → src/lib/models/page.js


+ 0 - 0
lib/models/revision.js → src/lib/models/revision.js


+ 0 - 0
lib/models/updatePost.js → src/lib/models/updatePost.js


+ 0 - 0
lib/models/user-group-relation.js → src/lib/models/user-group-relation.js


+ 0 - 0
lib/models/user-group.js → src/lib/models/user-group.js


+ 0 - 0
lib/models/user.js → src/lib/models/user.js


+ 0 - 0
lib/plugins/plugin-utils-v2.js → src/lib/plugins/plugin-utils-v2.js


+ 0 - 0
lib/plugins/plugin-utils.js → src/lib/plugins/plugin-utils.js


+ 0 - 0
lib/plugins/plugin.service.js → src/lib/plugins/plugin.service.js


+ 0 - 0
lib/routes/admin.js → src/lib/routes/admin.js


+ 0 - 0
lib/routes/attachment.js → src/lib/routes/attachment.js


+ 0 - 0
lib/routes/bookmark.js → src/lib/routes/bookmark.js


+ 0 - 0
lib/routes/comment.js → src/lib/routes/comment.js


+ 0 - 0
lib/routes/hackmd.js → src/lib/routes/hackmd.js


+ 0 - 0
lib/routes/index.js → src/lib/routes/index.js


+ 0 - 0
lib/routes/installer.js → src/lib/routes/installer.js


+ 0 - 0
lib/routes/login-passport.js → src/lib/routes/login-passport.js


+ 0 - 0
lib/routes/login.js → src/lib/routes/login.js


+ 0 - 0
lib/routes/logout.js → src/lib/routes/logout.js


+ 0 - 0
lib/routes/me.js → src/lib/routes/me.js


+ 0 - 0
lib/routes/page.js → src/lib/routes/page.js


+ 0 - 0
lib/routes/revision.js → src/lib/routes/revision.js


+ 0 - 0
lib/routes/search.js → src/lib/routes/search.js


Vissa filer visades inte eftersom för många filer har ändrats