Commit 318136a 0 parents commit 318136a Copy full SHA for 318136a
File tree 3 files changed +86
-0
lines changed
3 files changed +86
-0
lines changed Original file line number Diff line number Diff line change
1
+ * .log
2
+ node_modules
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ var es = require ( 'event-stream' ) ;
4
+ var vfs = require ( 'vinyl-fs' ) ;
5
+ var through2 = require ( 'through2' ) ;
6
+ var gutil = require ( 'gulp-util' ) ;
7
+ var JadeInheritance = require ( 'jade-inheritance' ) ;
8
+ var PLUGIN_NAME = 'gulp-jade-inheritance' ;
9
+
10
+ var stream ;
11
+
12
+ function gulpJadeInheritance ( options ) {
13
+ options = options || { } ;
14
+
15
+ if ( ! options . basedir ) {
16
+ options . basedir = '' ;
17
+ }
18
+
19
+ var files = [ ] ;
20
+
21
+ function writeStream ( currentFile ) {
22
+ if ( currentFile ) {
23
+ var jadeInheritance = new JadeInheritance ( currentFile . path , options . basedir , options ) ;
24
+
25
+ for ( var i = 0 ; i < jadeInheritance . files . length ; i ++ ) {
26
+ files . push ( options . basedir + "/" + jadeInheritance . files [ i ] ) ;
27
+ }
28
+ }
29
+ }
30
+
31
+ function endStream ( ) {
32
+ vfs . src ( files )
33
+ . pipe ( es . through (
34
+ function ( f ) {
35
+ stream . emit ( 'data' , f ) ;
36
+ } ,
37
+ function ( ) {
38
+ stream . emit ( 'end' ) ;
39
+ }
40
+ ) ) ;
41
+ }
42
+
43
+ stream = es . through ( writeStream , endStream ) ;
44
+
45
+ return stream ;
46
+ } ;
47
+
48
+ module . exports = gulpJadeInheritance ;
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " gulp-jade-inheritance" ,
3
+ "version" : " 0.0.0" ,
4
+ "description" : " Rebuild only changed jade files and all it dependencies" ,
5
+ "main" : " index.js" ,
6
+ "scripts" : {
7
+ "test" : " mocha"
8
+ },
9
+ "repository" : {
10
+ "type" : " git" ,
11
+ "url" :
" [email protected] :juanfran/gulp-jade-inheritance.git"
12
+ },
13
+ "keywords" : [
14
+ " gulpplugin" ,
15
+ " jade" ,
16
+ " jade-inheritance"
17
+ ],
18
+ "author" : " Juanfran Alcántara" ,
19
+ "license" : " MIT" ,
20
+ "bugs" : {
21
+ "url" : " https://github.com/juanfran/gulp-jade-inheritance/issues"
22
+ },
23
+ "homepage" : " https://github.com/juanfran/gulp-jade-inheritance" ,
24
+ "devDependencies" : {
25
+ "chai" : " ~1.9.1" ,
26
+ "mocha" : " ~1.18.2" ,
27
+ "proxyquire" : " ^1.0.1" ,
28
+ "sinon" : " ^1.10.2"
29
+ },
30
+ "dependencies" : {
31
+ "event-stream" : " ^3.1.7" ,
32
+ "gulp-util" : " ^3.0.0" ,
33
+ "jade-inheritance" : " ^0.1.0" ,
34
+ "vinyl-fs" : " ^0.3.6"
35
+ }
36
+ }
You can’t perform that action at this time.
0 commit comments