Lots of updates
This commit is contained in:
parent
e3cfff8310
commit
39e7af6238
454 changed files with 221168 additions and 36622 deletions
app/bower_components/lodash/test
27
app/bower_components/lodash/test/remove.js
vendored
Normal file
27
app/bower_components/lodash/test/remove.js
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
var _ = require('../lodash'),
|
||||
fs = require('fs'),
|
||||
path = require('path');
|
||||
|
||||
var args = (args = process.argv)
|
||||
.slice((args[0] === process.execPath || args[0] === 'node') ? 2 : 0);
|
||||
|
||||
var filePath = path.resolve(args[1]),
|
||||
reLine = /.*/gm;
|
||||
|
||||
var pattern = (function() {
|
||||
var result = args[0],
|
||||
delimiter = result.charAt(0),
|
||||
lastIndex = result.lastIndexOf(delimiter);
|
||||
|
||||
return RegExp(result.slice(1, lastIndex), result.slice(lastIndex + 1));
|
||||
}());
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
|
||||
fs.writeFileSync(filePath, fs.readFileSync(filePath, 'utf8').replace(pattern, function(match) {
|
||||
var snippet = _.slice(arguments, -3, -2)[0];
|
||||
return match.replace(snippet, snippet.replace(reLine, ''));
|
||||
}));
|
Loading…
Add table
Add a link
Reference in a new issue