mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-19 08:02:55 +00:00
refactor: adjust code to updated dependencies
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import * as commander from 'commander';
|
||||
import {Command} from 'commander';
|
||||
import {existsSync, readFileSync, writeFileSync} from 'fs';
|
||||
import {resolve} from 'path';
|
||||
import {cwd} from 'process';
|
||||
@@ -35,12 +35,17 @@ import {
|
||||
// current working directory
|
||||
const currentWorkingDirectory = cwd();
|
||||
|
||||
// instantiate new commander
|
||||
const commander = new Command('openstapps-configuration');
|
||||
|
||||
// configure commander
|
||||
commander
|
||||
.version(JSON.parse(
|
||||
readFileSync(resolve(__dirname, '..', 'package.json'))
|
||||
.toString(),
|
||||
).version)
|
||||
).version);
|
||||
|
||||
commander
|
||||
.option('-p, --path <path>', `Path of project to add files to (${currentWorkingDirectory})`, currentWorkingDirectory)
|
||||
.option('-r, --replace', 'Whether to replace existing files or not', false)
|
||||
.parse(process.argv);
|
||||
|
||||
Reference in New Issue
Block a user