This repository has been archived by the owner on Jun 24, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(index.js): generate it with bare option
- Loading branch information
Showing
3 changed files
with
40 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,11 @@ pids | |
logs | ||
results | ||
|
||
npm-debug.log | ||
node_modules | ||
*.sublime* | ||
*.sublime* | ||
|
||
example | ||
src | ||
test | ||
|
||
.travis.yml | ||
gulpfile.ls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,32 @@ | ||
(function(){ | ||
var mapStream, LiveScript, gutil; | ||
mapStream = require('map-stream'); | ||
LiveScript = require('LiveScript'); | ||
gutil = require('gulp-util'); | ||
module.exports = function(options){ | ||
options || (options = {}); | ||
function modifyLS(file, cb){ | ||
var done, error, e; | ||
done = function(){ | ||
cb(void 8, file); | ||
}; | ||
error = function(it){ | ||
cb( | ||
new gutil.PluginError('gulp-livescript', it)); | ||
}; | ||
if (file.isNull()) { | ||
return done(); | ||
} | ||
if (file.isStream()) { | ||
return error('Streaming not supported'); | ||
} | ||
try { | ||
file.contents = new Buffer(LiveScript.compile(file.contents.toString('utf8'), options)); | ||
file.path = gutil.replaceExtension(file.path, '.js'); | ||
} catch (e$) { | ||
e = e$; | ||
return error(e); | ||
} | ||
done(); | ||
var mapStream, LiveScript, gutil; | ||
mapStream = require('map-stream'); | ||
LiveScript = require('LiveScript'); | ||
gutil = require('gulp-util'); | ||
module.exports = function(options){ | ||
options || (options = {}); | ||
function modifyLS(file, cb){ | ||
var done, error, e; | ||
done = function(){ | ||
cb(void 8, file); | ||
}; | ||
error = function(it){ | ||
cb( | ||
new gutil.PluginError('gulp-livescript', it)); | ||
}; | ||
if (file.isNull()) { | ||
return done(); | ||
} | ||
return mapStream(modifyLS); | ||
}; | ||
}).call(this); | ||
if (file.isStream()) { | ||
return error('Streaming not supported'); | ||
} | ||
try { | ||
file.contents = new Buffer(LiveScript.compile(file.contents.toString('utf8'), options)); | ||
file.path = gutil.replaceExtension(file.path, '.js'); | ||
} catch (e$) { | ||
e = e$; | ||
return error(e); | ||
} | ||
done(); | ||
} | ||
return mapStream(modifyLS); | ||
}; |