File tree Expand file tree Collapse file tree 2 files changed +31
-4
lines changed Expand file tree Collapse file tree 2 files changed +31
-4
lines changed Original file line number Diff line number Diff line change 2525 "scripts" : {
2626 "post-install-cmd" : [
2727 " Kenjis\\ CodeIgniter\\ Installer::postInstall" ,
28- " composer update"
28+ " composer update" ,
29+ " Kenjis\\ CodeIgniter\\ Installer::showMessage"
2930 ]
3031 },
3132 "extra" : {
Original file line number Diff line number Diff line change 1515class Installer
1616{
1717 const DOCROOT = 'public ' ;
18-
18+
1919 /**
2020 * Composer post install script
2121 *
@@ -55,8 +55,34 @@ public static function postInstall(Event $event = null)
5555 file_put_contents ($ file , $ contents );
5656
5757 copy ('composer.json.dist ' , 'composer.json ' );
58-
59- // delete self
58+ }
59+
60+ /**
61+ * Composer post install script
62+ *
63+ * @param Event $event
64+ */
65+ public static function showMessage (Event $ event = null )
66+ {
67+ $ io = $ event ->getIO ();
68+ $ io ->write ('================================================== ' );
69+ $ io ->write (
70+ '<info>`public/.htaccess` was installed. If you don \'t need it, please remove it.</info> '
71+ );
72+ $ io ->write (
73+ '<info>If you want to install translations for system messages or some third party libraries,</info> '
74+ );
75+ $ io ->write ('$ cd <codeigniter_project_folder> ' );
76+ $ io ->write ('$ php bin/install.php ' );
77+ $ io ->write ('<info>Above command will show help message.</info> ' );
78+ $ io ->write ('See https://github.com/kenjis/codeigniter-composer-installer ' );
79+ $ io ->write ('================================================== ' );
80+
81+ self ::deleteSelf ();
82+ }
83+
84+ private static function deleteSelf ()
85+ {
6086 unlink (__FILE__ );
6187 rmdir ('src ' );
6288 unlink ('composer.json.dist ' );
You can’t perform that action at this time.
0 commit comments