ci-craftsman / cli Goto Github PK
View Code? Open in Web Editor NEWCraftsman provides a number of helpful commands for your use while developing your Codeigniter application.
License: Creative Commons Attribution Share Alike 4.0 International
Craftsman provides a number of helpful commands for your use while developing your Codeigniter application.
License: Creative Commons Attribution Share Alike 4.0 International
i'm trying to set it up in my windows .
i followed your installation steps .composer installation is ok but php bin/craftsman is not working.
bin/craftsman filecontains
#!/usr/bin/env sh
dir=$(d=${0%[/\\]*}; cd "$d"; cd "../vendor/craftsman/cli" && pwd)
# See if we are running in Cygwin by checking for cygpath program
if command -v 'cygpath' >/dev/null 2>&1; then
# Cygwin paths start with /cygdrive/ which will break windows PHP,
# so we need to translate the dir path to windows format. However
# we could be using cygwin PHP which does not require this, so we
# test if the path to PHP starts with /cygdrive/ rather than /usr/bin
if [[ $(which php) == /cygdrive/* ]]; then
dir=$(cygpath -m "$dir");
fi
fi
dir=$(echo $dir | sed 's/ /\ /g')
"${dir}/craftsman" "$@"
Im newbee, help me..
Add some ENV variables that stores the serve command options, so the commands knows how to behave without passing that console options
the --docroot
option doesn't change the cwd
Add the ability to use Craftsman as a debugger. Drop a line into a script whathever you’d like to have a breakpoint like:
<?php
eval(\Craftsman\Debug());
?>
When the script reaches this point, the execution will be suspended and it will be dropped into a PsySH shell. The program state is loaded and available to inspect and experiment with.
For unknown reasons, serve command runs twice.
➜ ci-boilerplate git:(01-stupid-webcomic-app/master) ✗ vendor/bin/craftsman serve --docroot=./
Codeigniter development server started at Tue, 16 Oct 2018 16:35:45 +0700
Listening on http://localhost:8000
Document root is /home/noitu/projects/ci-boilerplate
Press Ctrl-C to quit.
PHP 7.2.10-0ubuntu0.18.04.1 Development Server started at Tue Oct 16 16:35:45 2018
Listening on http://localhost:8000
Document root is /home/noitu/projects/ci-boilerplate
Press Ctrl-C to quit.
[Tue Oct 16 16:35:59 2018] ::1:33622 [200]: /
[Tue Oct 16 16:36:00 2018] ::1:33624 [200]: /favicon.ico
^C
Then, I tried to rerun the command again. An error occurs.
➜ ci-boilerplate git:(01-stupid-webcomic-app/master) ✗ vendor/bin/craftsman serve --docroot=./
Codeigniter development server started at Tue, 16 Oct 2018 16:36:18 +0700
Listening on http://localhost:8000
Document root is /home/noitu/projects/ci-boilerplate
Press Ctrl-C to quit.
[Tue Oct 16 16:36:18 2018] Failed to listen on localhost:8000 (reason: Address already in use)
➜ ci-boilerplate git:(01-stupid-webcomic-app/master) ✗
I had to kill php process via htop
.
This is my .craftsman
file:
BASEPATH="./vendor/codeigniter/framework/system/"
APPPATH="./application/"
CI_FCPATH="./"
Yes, index.php
is on project root. And it serves without problems.
tests
folder contains whole Codeigniter framework and is included in Composer's vendor dist folder.
$ du -h vendor/craftsman/cli/ --max-depth=1
152K vendor/craftsman/cli/src
92K vendor/craftsman/cli/utils
2.7M vendor/craftsman/cli/tests
3.0M vendor/craftsman/cli/
$ du -h vendor/craftsman/cli/tests --max-depth=1
8.0K vendor/craftsman/cli/tests/unit
2.7M vendor/craftsman/cli/tests/Codeigniter
2.7M vendor/craftsman/cli/tests
Isn't it would be good if the framework is excluded. As a trade, the framework itself can be installed as require-dev
or programmatically on .travis.yml
, as seen on:
https://github.com/kenjis/codeigniter-cli/blob/6edb9ec82eaf6fbffe55e2780fccac7cc1e6be74/.travis.yml
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.