basecamp-guide
Version:
Task automator for the Basecamp Framework.
50 lines (43 loc) • 1.56 kB
JavaScript
// Dependecies
var p = require('path');
var Colors = require('colors');
var Exec = require('child_process').execSync;
var FileSys = require('../FileSystem.js');
/**
* Synchronize original package files
* with the updated version at the playground
*/
var PlaygroundAuthSyncCommand = {
fire : function(options) {
var packagePaths = {
root : '../basecamp-modules/src',
js : '../basecamp-modules/src/assets/js'
};
var playPaths = { // pg = playground
js : './resources/assets/js'
};
console.log('Sync JS-Files...'.blue.bold);
FileSys.copyFile(
p.join(playPaths.js, 'auth-module/views/AuthViewMixin.js'),
p.join(packagePaths.js, 'auth-module/views/AuthViewMixin.js')
);
FileSys.copyFile(
p.join(playPaths.js, 'auth-module/views/LoginView.js'),
p.join(packagePaths.js, 'auth-module/views/LoginView.js')
);
FileSys.copyFile(
p.join(playPaths.js, 'auth-module/views/RequestNewPasswordView.js'),
p.join(packagePaths.js, 'auth-module/views/RequestNewPasswordView.js')
);
FileSys.copyFile(
p.join(playPaths.js, 'auth-module/views/ResetPasswordView.js'),
p.join(packagePaths.js, 'auth-module/views/ResetPasswordView.js')
);
},
/*
* config-property will be injected from the
* CommandLineTool while adding the command
*/
config : {},
}
module.exports = PlaygroundAuthSyncCommand;