mirror of
https://github.com/liriliri/eruda.git
synced 2026-03-24 09:48:37 +08:00
Dev: Use prettier to format code
This commit is contained in:
@@ -2,46 +2,49 @@ var copy = require('copy'),
|
||||
path = require('path'),
|
||||
util = require('./util');
|
||||
|
||||
util.mkdir(path.resolve(__dirname, '../test/lib'), function (err)
|
||||
{
|
||||
util.mkdir(path.resolve(__dirname, '../test/lib'), function(err) {
|
||||
if (err) return console.log(err);
|
||||
|
||||
cpTestFiles();
|
||||
});
|
||||
|
||||
function cpTestFiles()
|
||||
{
|
||||
util.parallel([
|
||||
genCpCb('/jasmine-core/lib/jasmine-core/{jasmine.css,jasmine.js,jasmine-html.js,boot.js}', '/lib', {
|
||||
srcBase: '/jasmine-core/lib/jasmine-core/'
|
||||
}),
|
||||
genCpCb('/jasmine-jquery/lib/jasmine-jquery.js', '/lib', {
|
||||
srcBase: '/jasmine-jquery/lib/'
|
||||
}),
|
||||
genCpCb('/jquery/dist/jquery.js', '/lib', {
|
||||
srcBase: '/jquery/dist/'
|
||||
})
|
||||
], function (err)
|
||||
{
|
||||
if (err) return console.log(err);
|
||||
function cpTestFiles() {
|
||||
util.parallel(
|
||||
[
|
||||
genCpCb(
|
||||
'/jasmine-core/lib/jasmine-core/{jasmine.css,jasmine.js,jasmine-html.js,boot.js}',
|
||||
'/lib',
|
||||
{
|
||||
srcBase: '/jasmine-core/lib/jasmine-core/'
|
||||
}
|
||||
),
|
||||
genCpCb('/jasmine-jquery/lib/jasmine-jquery.js', '/lib', {
|
||||
srcBase: '/jasmine-jquery/lib/'
|
||||
}),
|
||||
genCpCb('/jquery/dist/jquery.js', '/lib', {
|
||||
srcBase: '/jquery/dist/'
|
||||
})
|
||||
],
|
||||
function(err) {
|
||||
if (err) return console.log(err);
|
||||
|
||||
console.log('Copy test lib successfully!');
|
||||
});
|
||||
console.log('Copy test lib successfully!');
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function genCpCb(src, dest, options)
|
||||
{
|
||||
function genCpCb(src, dest, options) {
|
||||
options = options || {};
|
||||
if (options.srcBase) options.srcBase = path.resolve(__dirname, '../node_modules/') + options.srcBase;
|
||||
if (options.srcBase)
|
||||
options.srcBase =
|
||||
path.resolve(__dirname, '../node_modules/') + options.srcBase;
|
||||
|
||||
src = path.resolve(__dirname, '../node_modules/') + src;
|
||||
dest = path.resolve(__dirname, '../test/') + dest;
|
||||
|
||||
return function (cb)
|
||||
{
|
||||
return function(cb) {
|
||||
console.log('Copy %s to %s', src, dest);
|
||||
copy(src, dest, options, function (err)
|
||||
{
|
||||
copy(src, dest, options, function(err) {
|
||||
if (err) return cb(err);
|
||||
|
||||
cb();
|
||||
|
||||
Reference in New Issue
Block a user