安装composer包时创建文件夹

时间:2018-02-25 04:31:13

标签: composer-php

作曲家包是否可以在项目的根目录中创建一个或多个文件夹?

例如:

constructor(private statsService: StatsService...) {}

ngOnInit() {
    this.statsService.currentStats.subscribe(
        statsSource => (this.statsSource = statsSource)
    );

}  

我运行// level service returns the character level constructor(private levelService: levelService) { // Services do not utilize the oninit lifecycle, so I wrote a function to act like one. // I saw this as a suggestion in researching but this does not seem optimal. this.init(); } levelObservable: any; level: number; characterSp: number; characterVitality: number; statsSource: any; currentStats: any; init(){ this.levelObservable = this.levelService.getLevel(); this.levelObservable.subscribe(level => { this.level = level; this.characterSp = this.level * 2; this.characterVitality = this.level * 6; this.statsSource = new BehaviorSubject<any>({ spellPoints: this.characterSp, actionDice: 3, vitality: this.characterVitality, wounds: 10 }); this.currentStats = this.statsSource.asObservable(); }); 来安装我的包(框架)。 这个框架可以在我的根目录中创建文件夹/ansible /application /public /composer.json /composer.lock 吗?

1 个答案:

答案 0 :(得分:2)

您可能需要查看https://getcomposer.org/doc/articles/scripts.md并查看post-install-cmd事件名称并提供自己的脚本来创建所需的目录。

相关问题