Kaynağa Gözat

Merge pull request #136 from crowi/wip-v1.5.1-0

v1.5.1
Sotaro KARASAWA 9 yıl önce
ebeveyn
işleme
add24072bc

+ 6 - 0
CHANGES.md

@@ -1,6 +1,12 @@
 CHANGES
 ========
 
+## 1.5.1
+
+* Fix: Broken corwi.min.js (thank you @Bakudankun #135)
+* Fix: Use id permalink instead of the page path on notify to Slack.
+* And some fixes and updates. (Thank you: @kzbandai @chuganzy)
+
 ## 1.5.0
 
 * Feature: Search.

+ 2 - 2
README.md

@@ -4,7 +4,7 @@ Crowi - The Simple & Powerful Communication Tool Based on Wiki
 ================================================================
 
 
-[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/crowi/crowi/tree/v1.5.0)
+[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/crowi/crowi/tree/v1.5.1)
 
 [![Circle CI](https://circleci.com/gh/crowi/crowi.svg?style=svg)](https://circleci.com/gh/crowi/crowi)
 [![Join the chat at https://gitter.im/crowi/general](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/crowi/general)
@@ -35,7 +35,7 @@ Don't use `master` branch because it is unstable but use released tag version ex
 Dependencies
 -------------
 
-* Node.js (4.2.x)
+* Node.js (4.x)
 * MongoDB
 * Elasticsearch (optional)
 * Redis (optional)

+ 1 - 20
gulpfile.js

@@ -6,7 +6,6 @@ var cssmin = require('gulp-cssmin');
 var mocha  = require('gulp-spawn-mocha');
 var concat = require('gulp-concat');
 var rename = require('gulp-rename');
-var uglify = require('gulp-uglify');
 var jshint = require('gulp-jshint');
 var source = require('vinyl-source-stream');
 var webpack = require('webpack-stream');
@@ -92,24 +91,6 @@ gulp.task('webpack', ['js:concat'], function() {
     .pipe(gulp.dest(dirs.jsDist));
 });
 
-gulp.task('js:min', ['webpack'], function() {
-  var fileList = [
-    js.dist,
-    js.bundled,
-    js.admin,
-    js.form,
-    js.presentation,
-    js.app,
-  ];
-
-  fileList.forEach(function(jsfile) {
-    gulp.src(jsfile)
-      .pipe(uglify())
-      .pipe(rename({suffix: '.min'}))
-      .pipe(gulp.dest(dirs.jsDist));
-  });
-});
-
 gulp.task('jshint', function() {
   return gulp.src(js.lint)
     .pipe(jshint())
@@ -176,5 +157,5 @@ gulp.task('watch', function() {
 });
 
 gulp.task('css', ['css:sass', 'css:concat',]);
-gulp.task('default', ['css:min', 'js:min',]);
+gulp.task('default', ['css:min', 'webpack', ]);
 gulp.task('dev', ['css:concat', 'webpack', 'jshint', 'test']);

+ 1 - 1
lib/views/_form.html

@@ -61,4 +61,4 @@
   <div class="file-module hidden">
   </div>
 </div>
-<script src="/js/form{% if env  == 'production' %}.min{% endif %}.js"></script>
+<script src="/js/form.js"></script>

+ 1 - 1
lib/views/layout/admin.html

@@ -1,6 +1,6 @@
 {% extends '2column.html' %}
 
 {% block footer %}
-  <script src="/js/admin{% if env  == 'production' %}.min{% endif %}.js"></script>
+  <script src="/js/admin.js"></script>
 {% endblock footer %}
 

+ 3 - 3
lib/views/layout/layout.html

@@ -12,7 +12,7 @@
   <meta name="viewport" content="width=device-width,initial-scale=1">
 
   <link rel="stylesheet" href="/css/crowi{% if env  == 'production' %}.min{% endif %}.css">
-  <script src="/js/bundled{% if env  == 'production' %}.min{% endif %}.js"></script>
+  <script src="/js/bundled.js"></script>
   <link href='//fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
 </head>
 {% endblock %}
@@ -130,6 +130,6 @@
 </body>
 {% endblock %}
 
-<script src="/js/crowi{% if env  == 'production' %}.min{% endif %}.js"></script>
-<script src="/js/app{% if env  == 'production' %}.min{% endif %}.js"></script>
+<script src="/js/crowi.js"></script>
+<script src="/js/app.js"></script>
 </html>

+ 3 - 2
lib/views/page_presentation.html

@@ -10,6 +10,8 @@
     <link rel="stylesheet" type="text/css" href="/css/crowi-reveal{% if env  == 'production' %}.min{% endif %}.css">
     <link rel="stylesheet" type="text/css" href="/js/reveal/lib/css/zenburn.css">
 
+    <script src="/js/bundled.js"></script>
+
     <title>{{ path|path2name }} | {{ path }}</title>
   </head>
   <body>
@@ -27,7 +29,6 @@
       </div>
     </div>
 
-    <script src="/js/crowi{% if env  == 'production' %}.min{% endif %}.js"></script>
-    <script src="/js/presentation{% if env  == 'production' %}.min{% endif %}.js"></script>
+    <script src="/js/presentation.js"></script>
   </body>
 </html>

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "crowi",
-  "version": "1.5.0",
+  "version": "1.5.1",
   "description": "The simple & powerful Wiki",
   "tags": [
     "wiki",

+ 1 - 1
resource/js/crowi.js

@@ -881,7 +881,7 @@ window.addEventListener('load', function(e) {
     }
   }
 
-  if (crowi.users || crowi.users.length == 0) {
+  if (crowi && crowi.users || crowi.users.length == 0) {
     var totalUsers = crowi.users.length;
     var $listLiker = $('.page-list-liker');
     $listLiker.each(function(i, liker) {