Просмотр исходного кода

Merge branch 'master' into wip-v1.5.1

Sotaro KARASAWA 9 лет назад
Родитель
Сommit
fa23a06b6d
5 измененных файлов с 12 добавлено и 19 удалено
  1. 7 1
      CHANGES.md
  2. 1 15
      gulpfile.js
  3. 1 1
      lib/views/layout/layout.html
  4. 2 1
      lib/views/page_presentation.html
  5. 1 1
      resource/js/crowi.js

+ 7 - 1
CHANGES.md

@@ -1,10 +1,16 @@
 CHANGES
 ========
 
-## 1.5.1
+## 1.5.2
 
 *
 
+## 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.

+ 1 - 15
gulpfile.js

@@ -8,7 +8,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');
@@ -95,19 +94,6 @@ gulp.task('webpack', ['js:concat'], function() {
     .pipe(gulp.dest(dirs.jsDist));
 });
 
-gulp.task('js:min', ['webpack'], function() {
-  var fileList = [
-    js.bundled,
-  ];
-
-  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())
@@ -174,5 +160,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/layout/layout.html

@@ -13,7 +13,7 @@
 
   <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="{{ assets('/js/bundled.js') }}"></script>
   <link href='//fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
 </head>
 {% endblock %}

+ 2 - 1
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="{{ assets('/js/bundled.js') }}"></script>
+
     <title>{{ path|path2name }} | {{ path }}</title>
   </head>
   <body>
@@ -27,7 +29,6 @@
       </div>
     </div>
 
-    <script src="{{ assets('/js/crowi.js') }}"></script>
     <script src="{{ assets('/js/presentation.js') }}"></script>
   </body>
 </html>

+ 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) {