mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 00:52: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
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* 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 {existsSync, readFileSync, writeFileSync} from 'fs';
|
||||||
import {resolve} from 'path';
|
import {resolve} from 'path';
|
||||||
import {cwd} from 'process';
|
import {cwd} from 'process';
|
||||||
@@ -35,12 +35,17 @@ import {
|
|||||||
// current working directory
|
// current working directory
|
||||||
const currentWorkingDirectory = cwd();
|
const currentWorkingDirectory = cwd();
|
||||||
|
|
||||||
|
// instantiate new commander
|
||||||
|
const commander = new Command('openstapps-configuration');
|
||||||
|
|
||||||
// configure commander
|
// configure commander
|
||||||
commander
|
commander
|
||||||
.version(JSON.parse(
|
.version(JSON.parse(
|
||||||
readFileSync(resolve(__dirname, '..', 'package.json'))
|
readFileSync(resolve(__dirname, '..', 'package.json'))
|
||||||
.toString(),
|
.toString(),
|
||||||
).version)
|
).version);
|
||||||
|
|
||||||
|
commander
|
||||||
.option('-p, --path <path>', `Path of project to add files to (${currentWorkingDirectory})`, currentWorkingDirectory)
|
.option('-p, --path <path>', `Path of project to add files to (${currentWorkingDirectory})`, currentWorkingDirectory)
|
||||||
.option('-r, --replace', 'Whether to replace existing files or not', false)
|
.option('-r, --replace', 'Whether to replace existing files or not', false)
|
||||||
.parse(process.argv);
|
.parse(process.argv);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
"alwaysStrict": true,
|
"alwaysStrict": true,
|
||||||
"charset": "utf8",
|
"charset": "utf8",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"inlineSourceMap": true,
|
"inlineSourceMap": true,
|
||||||
|
|||||||
Reference in New Issue
Block a user