Bläddra i källkod

updated docs, updated gulp packages

Emanuele Marchi 10 år sedan
förälder
incheckning
d36e014a09
3 ändrade filer med 43 tillägg och 43 borttagningar
  1. 31 31
      gulpfile.coffee
  2. 3 3
      index.html
  3. 9 9
      package.json

+ 31 - 31
gulpfile.coffee

@@ -1,5 +1,5 @@
 gulp = require 'gulp'
-plugins = require('gulp-load-plugins')()
+$ = require('gulp-load-plugins')()
 pkg = require './package.json'
 name = pkg.name
 
@@ -36,55 +36,55 @@ BANNER = """
 gulp.task 'coffee', ->
   gulp
   .src "#{SOURCE_PATH}/coffee/#{name}.coffee"
-  .pipe plugins.changed "#{DIST_PATH}/js"
-  .pipe plugins.coffeelint './coffeelint.json'
-  .pipe plugins.coffeelint.reporter()
-    .on 'error', plugins.util.log
-  .pipe plugins.coffee()
-    .on 'error', plugins.util.log
-  .pipe plugins.header BANNER, pkg: pkg
+  .pipe $.changed "#{DIST_PATH}/js"
+  .pipe $.coffeelint './coffeelint.json'
+  .pipe $.coffeelint.reporter()
+    .on 'error', $.util.log
+  .pipe $.coffee()
+    .on 'error', $.util.log
+  .pipe $.header BANNER, pkg: pkg
   .pipe gulp.dest "#{DIST_PATH}/js"
-  .pipe plugins.uglify()
-  .pipe plugins.header BANNER, pkg: pkg
-  .pipe plugins.rename suffix: '.min'
+  .pipe $.uglify()
+  .pipe $.header BANNER, pkg: pkg
+  .pipe $.rename suffix: '.min'
   .pipe gulp.dest "#{DIST_PATH}/js"
 
 gulp.task 'less-bootstrap2', ->
   gulp
   .src "#{SOURCE_PATH}/less/bootstrap2/build.less"
-  .pipe plugins.changed "#{DIST_PATH}/css/bootstrap2"
-  .pipe plugins.less()
-    .on 'error', plugins.util.log
-  .pipe plugins.header BANNER, pkg: pkg
-  .pipe plugins.rename basename: name
+  .pipe $.changed "#{DIST_PATH}/css/bootstrap2"
+  .pipe $.less()
+    .on 'error', $.util.log
+  .pipe $.header BANNER, pkg: pkg
+  .pipe $.rename basename: name
   .pipe gulp.dest "#{DIST_PATH}/css/bootstrap2"
-  .pipe plugins.less compress: true, cleancss: true
-  .pipe plugins.header BANNER, pkg: pkg
-  .pipe plugins.rename suffix: '.min'
+  .pipe $.less compress: true, cleancss: true
+  .pipe $.header BANNER, pkg: pkg
+  .pipe $.rename suffix: '.min'
   .pipe gulp.dest "#{DIST_PATH}/css/bootstrap2"
 
 gulp.task 'less-bootstrap3', ->
   gulp
   .src "#{SOURCE_PATH}/less/bootstrap3/build.less"
-  .pipe plugins.changed "#{DIST_PATH}/css/bootstrap3"
-  .pipe plugins.less()
-  .pipe plugins.header BANNER, pkg: pkg
-  .pipe plugins.rename basename: name
+  .pipe $.changed "#{DIST_PATH}/css/bootstrap3"
+  .pipe $.less()
+  .pipe $.header BANNER, pkg: pkg
+  .pipe $.rename basename: name
   .pipe gulp.dest "#{DIST_PATH}/css/bootstrap3"
-  .pipe plugins.less compress: true, cleancss: true
-  .pipe plugins.header BANNER, pkg: pkg
-  .pipe plugins.rename suffix: '.min'
+  .pipe $.less compress: true, cleancss: true
+  .pipe $.header BANNER, pkg: pkg
+  .pipe $.rename suffix: '.min'
   .pipe gulp.dest "#{DIST_PATH}/css/bootstrap3"
 
 gulp.task 'docs', ->
   gulp
   .src "#{SOURCE_PATH}/docs/*.jade"
-  .pipe plugins.changed './'
-  .pipe plugins.jade pretty: true
+  .pipe $.changed './'
+  .pipe $.jade pretty: true
   .pipe gulp.dest './'
 
 gulp.task 'connect', ['docs'], ->
-  plugins.connect.server
+  $.connect.server
     root: [__dirname]
     host: SERVER_HOST
     port: SERVER_PORT
@@ -93,7 +93,7 @@ gulp.task 'connect', ['docs'], ->
 gulp.task 'open', ['connect'], ->
   gulp
   .src './index.html'
-  .pipe plugins.open '', url: "http://#{SERVER_HOST}:#{SERVER_PORT}"
+  .pipe $.open '', url: "http://#{SERVER_HOST}:#{SERVER_PORT}"
 
 gulp.task 'watch', ['connect'], ->
   gulp.watch "#{SOURCE_PATH}/coffee/#{name}.coffee", ['coffee']
@@ -107,7 +107,7 @@ gulp.task 'watch', ['connect'], ->
   ]
   .on 'change', (event) ->
     gulp.src event.path
-    .pipe plugins.connect.reload()
+    .pipe $.connect.reload()
 
 gulp.task 'server', ['connect', 'open', 'watch']
 gulp.task 'less', ['less-bootstrap2', 'less-bootstrap3']

+ 3 - 3
index.html

@@ -68,11 +68,11 @@
       <div class="alert alert-info">
         <p>
           <strong>Documentation in progress!</strong><br>
-          It might not seem it, but it's actually a lot of work to provide documentation. The goal is to make it as clean, readable and
+          It might not seem, but it's actually a lot of work. The goal is to make it as cleanest, most readable and
           understandable as possible.<br>
           If you feel there is something missing, submit a
           <a href="https://github.com/nostalgiaz/bootstrap-switch/pulls">pull request</a> with your changes. Every
-          bit of help is needed. Many thanks.
+          help is needed. Many thanks.
         </p>
       </div>
       <div id="new">
@@ -123,4 +123,4 @@
     <script src="dist/js/bootstrap-switch.js"></script>
     <script src="docs/js/main.js"></script>
   </body>
-</html>
+</html>

+ 9 - 9
package.json

@@ -37,20 +37,20 @@
   "license": "Apache Version 2",
   "readmeFilename": "README.md",
   "devDependencies": {
-    "gulp-coffee": "~1.4.3",
-    "gulp-util": "~2.2.17",
-    "gulp-header": "~1.0.2",
+    "gulp-coffee": "~2.1.1",
+    "gulp-util": "~3.0.0",
+    "gulp-header": "~1.0.5",
     "gulp-uglify": "~0.3.1",
     "gulp-coffeelint": "~0.3.3",
-    "gulp": "~3.8.1",
-    "gulp-less": "~1.2.3",
+    "gulp": "~3.8.6",
+    "gulp-less": "~1.3.2",
     "gulp-rename": "~1.2.0",
     "gulp-open": "~0.2.8",
-    "gulp-load-plugins": "~0.5.1",
-    "gulp-jade": "~0.5.0",
+    "gulp-load-plugins": "~0.5.3",
+    "gulp-jade": "~0.6.1",
     "run-sequence": "~0.3.6",
-    "gulp-connect": "~2.0.5",
+    "gulp-connect": "~2.0.6",
     "coffee-script": "~1.7.1",
-    "gulp-changed": "~0.3.0"
+    "gulp-changed": "~0.4.1"
   }
 }