A small contribution for Foundation/Laravel developers

I'm a software developer in Toronto.
I like Foundation/SASS for adaptive mobile first web development. I also happen to be very fond of Laravel for rapid PHP development.
If you are like me, you may find a pain having to issue a bunch of commands every time you need to create a new project. Not to mention having to edit all the configuration files for both, Foundation and Laravel  to get the directory structure "the way you like it". Overtime, I got tired of it and decided to write a script to automate this process.
The directory structure I use is the default Laravel's install, eg:
myApp |
            |- app
            |- public
            |- vendor
and inside the public directory I set the Foundation framework. Therefore it looks like this:
myApp |
            |- app
            |- public-|
            |             |- assets -|
            |                             |- css
            |                             |- fonts
            |                             |- scss |
            |                             |           |- partials
            |                             |
            |                             |- js
            |- images
            |- vendor
This is the script:
#!/bin/bash
# ====================================+
# Creates a new Laravel project using Foundation 5.0
# Copies template files and sets directory structures
# as per ITTwo development standards.
#====================================+
WEBROOT=/srv/http;
OWNER=ralvez;
DEVAREA=/home/$OWNER/HTML;
TEMPLATE_FILES=$DEVAREA/dev.foundation;
clear
echo +===================================================+
echo " LAMP Project Builder (Laravel/Foundation) "
echo +===================================================+
echo
# verify that the dev.template directory exists
if [ -d $TEMPLATE_FILES ]; then
PROJECT_NAME=$1;
if [ -z "$1" ]; then
echo "Missing project name"
exit;
fi
echo "1. Creating Laravel Project: "$PROJECT_NAME
echo
composer.phar create-project laravel/laravel $DEVAREA/$PROJECT_NAME &&
foundation new $DEVAREA/$PROJECT_NAME/_public
# Create my development environment
cd $DEVAREA/$PROJECT_NAME
mv public/.htaccess _public/.htaccess
mv public/index.php _public/index.php
mv public/robots.txt _public/robots.txt
rm -fr public && mv _public public
mkdir public/packages
# Arrange directory structure
cd public
mkdir -p images/icons images/sprites
mkdir -p assets/fonts assets/css
# Move files into my directory structure
mv js/app.js js/master.js
mv js assets/js
mv scss assets/scss
# Create partials directory
mkdir assets/scss/partials
# Create default partial files
for partial in variables base layouts mixins fonts modules;
do
touch assets/scss/partials/_$partial.scss;
done
# Move existing files into partials
mv assets/scss/app.scss assets/scss/master.scss
mv assets/scss/_*.scss assets/scss/partials
cd .. # go back to the app root directory
echo "2. Getting template files"
echo
echo " a. index, template and hidden files ..."
echo
cp $TEMPLATE_FILES/index.html $DEVAREA/$PROJECT_NAME/public
cp $TEMPLATE_FILES/.gitignore $DEVAREA/$PROJECT_NAME/.gitignore
cp $TEMPLATE_FILES/Guardfile $DEVAREA/$PROJECT_NAME/app/Guardfile
echo " b. config.rb"
echo
cp $TEMPLATE_FILES/config.rb $DEVAREA/$PROJECT_NAME/public/config.rb
echo " c. $TEMPLATE_FILES/master.scss "
echo
cp $TEMPLATE_FILES/master.scss $DEVAREA/$PROJECT_NAME/public/assets/scss/master.scss
echo " d. Initialize Git project"
echo
cd $DEVAREA/$PROJECT_NAME
if [ -f ".git" ]; then
rm -fr .git
fi;
# Initialize git for this project
git init
git add .
git commit -m 'Initial Commit'
echo " f. Prevent sending log in data into repo ..."
git update-index --assume-unchanged $DEVAREA/$PROJECT_NAME/app/config/database.php
echo "3. Setting permissions on "$DEVAREA/$PROJECT_NAME/"app/storage"
echo
chmod -R 757 $DEVAREA/$PROJECT_NAME/app/storage
echo "4. Creaging symlink to $DEVAREA/$PROJECT_NAME/public in the web server"
echo
su root -c "ln -s $DEVAREA/$PROJECT_NAME/public $WEBROOT/$PROJECT_NAME"
if [ $? -ne 0 ]; then
exit;
fi
clear
echo "+----------------------------------------------------------------+"
echo " All done!"
echo "A. Edit "/home/$OWNER/HTML/$PROJECT_NAME"/app/config/database.php"
echo " and set your database password as needed."
echo "C. Remember to run compass watch and guard"
echo "+----------------------------------------------------------------+"
else
echo "Missing directory "$HOME "/HTML/$TEMPLATE_FILES"
fi
For the setup as I have described, these are my config.rb and master.scss which I keep in my development directory in a folder I call dev.foundation
config.rb :
# Require any additional compass plugins here.
add_import_path "bower_components/foundation/scss"
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "assets/css"
sass_dir = "assets/scss"
javascripts_dir = "assets/js"
fonts_dir = "assets/fonts"
images_dir = "images"
# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
output_style = :expanded
# To enable relative paths to assets via compass helper functions. Uncomment:
relative_assets = true
# To disable debugging comments that display the original location of your selectors. Uncomment:
line_comments = false
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
master.scss:
@import "partials/settings";
@import "partials/fonts";
@import "foundation";
@import "partials/variables";
@import "partials/base";
@import "partials/layouts";
@import "partials/modules";
Now this is of course tailored to the way I like my code structured, if you like it different (I can't imagine why ) just edit the master.scss and config.rb to your coding stile and you are on you way.
The main script is, or so I think , easy to understand but I'll be happy to answer questions if anyone has them.
You may also want to add other files to your template directory (dev.foundation) like I did (you will see that in the code) and that can be easily done by editing the main script. I've left the code in place so you can use it as an example, but if you do not need it just comment the lines and you are set.
BTW, I'm not a bash-fu coder, if  you see improvements to the code let me know.
I hope this will help some other developers.
Enjoy!!
R.
p.s: If someone wants a tar file with the scripts and my current development setup I'll be happy to put a link to a public server.

I think it is a reliable swing invest for new designs.
And after javafx (binding, property, effects, webpane, etc.), shows how swing is obsolete.
I just hoped that as the plan is to replace javafx swing, focus on having all the features of swing was more important.
Look at an example: multimedia components (audio and video) are important. but as I can see videos with webpane I believe that the same are secondary, and even more are not that important for most enterprise applications. While this lack essential components. As the focus of versions 2.1 and 2.2 are bug fixes, we wait long to see this component. And also still do not see any company preparing third-party components that will remedy this lack.

Similar Messages

  • ER Contribution for 401K additional medicare

    Hi Experts,
    How to update ER contribution for 401K Additional medicare and Pension plans?
    Will it be the same as for simple 401K ?
    Thanks in advance
    Jane

    Hi,
    Any idea how to write above query in user-exit in 'PBEN0014' SAP enhancement (SAP function 'EXIT_SAPLHRBEN00GENERAL_014')? will the limits check wil be taken care in that?
    thanks,
    vinoli Jacob

  • I partitioned a small drive for a windows program, and now the computer only wants to boot to Windows.  How do I get back to Mac so I can have a choice of drives?

      I partitioned a small drive for a windows program, and now the computer only wants to boot to Windows.  How do I get back to Mac so I can have a choice of drives?

    That doesn't sound good. It sounds like the power outage might have corrupted the partition for OS X. I would suggest booting from the Install DVD that came with your Mac while holding down the C key. Once you have selected the language start up Disk Utility from the pull down menu and repair the disk. Once you have done that then repair permissions also.
    Allan

  • Hi, I have small problem, for some time in music area I had two folders to use 1. Apple loops for soundtrack pro 2. Final Cut pro sound effects now both are gray and with out content may I know what happend

    Hi, I have small problem, for some time in music area I had two folders to use 1. Apple loops for soundtrack pro 2. Final Cut pro sound effects now both are gray and with out content may I know what happend

    I just went through this and it appears that my Focusrite Saffire was the culprit. I connected all the outputs on the focusrite according to the way the jacsk on the back were labeled and then set up the multichannel speaker setup to match. Then I went into STP, created a pink noise clip and panned it around, the LFE, center and rears were not in the right place.
    I reconnected the hardware to match the 5.1 pan pot in STP then changed the multichannel speaker setup to match. Everything appears to be correct now but I would have loved to have been able to just assigned the output busses to correct outputs in the saffire.
    Next step is to pan that pink noise around with my SPL meter to calibrate the room.

  • I have trouble seeing the small icons for the program functions in this tutorial.

    Hello,
    I have my assets from an older site, and want to start a site desktop site in muse. Is there a program ( maybe a book ) that can walk me through this step by step, instead of the Katie's Cafe demo / tutorial?
    The problem with the tutorial is in the dark interface I have trouble seeing the small icons for the program functions.
    I really need to setup a new site as soon as possible, but am not getting there right now.
    Thanks.
    Patricia Goff

    You can download the pdf from here :
    https://helpx.adobe.com/pdf/muse_reference.pdf
    Thanks,
    Sanjit

  • Dead Link in "Oracle ADF: Tutorial for Forms/4GL Developers"

    In "Oracle Application Development Framework: Tutorial for Forms/4GL Developers (10.1.3.1.0)"
    URL: http://www.oracle.com/technology/obe/ADFBC_tutorial_1013/10131/index.htm
    link "Download the zipped support files" returns "We're sorry, the page you requested was not found."
    URL: http://download.oracle.com/otndocs/products/jdev/10131/ADFBCTutorialSetup10131.zip

    In "Oracle Application Development Framework: Tutorial for Forms/4GL Developers (10.1.3.1.0)"
    URL: http://www.oracle.com/technology/obe/ADFBC_tutorial_1013/10131/index.htm
    link "Download the zipped support files" returns "We're sorry, the page you requested was not found."
    URL: http://download.oracle.com/otndocs/products/jdev/10131/ADFBCTutorialSetup10131.zip

  • JDeveloper - problems with Tutorial for Java EE Developers

    Hi,
    I am trying to start learning Oracle J2EE technologies, and I am using the Oracle "Tutorial for Java EE Developers (10.1.3.1.0)" listed in the Oracle Application Server 10g (10.1.3) page: http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/index.html.
    I am having problems in chapter 2, at the creating EJB 3.0 Persistence Entities stage, when using the Create Entities from Tables Wizard. Basically, when I select all the tables from the SRDEMO schema and attempt to create the Java classes, only the first table objects are created - ExpertiseAreas.java and ExpertiseAreasPK.java. I do not get any error messages, so I am not sure why the other table objects are not created.
    If I then use the Wizard to select tables individually, the objects are created. However, they appear to be missing some details - specifically the @OneToMany annotation.
    Has anyone encountered this same issue, or are there any known issues with this tutorial.
    I am using version 10.1.3.4 of JDeveloper, on a 10g (10.2) XE database. I installed the version of JDeveloper without JDK included. I have a Sun Java EE 5 SDK Udate 5 (JDK 6u7) install of JDK.
    Thanks,
    Fraser

    Please refer
    http://www.oracle.com/technology/obe/obe1013jdev/10131/10131_ejb_30/ejb_30.htm
    http://www.oracle.com/technology/tech/java/oc4j/ejb3/howtos/howtoejb30mappingannotations/doc/how-to-ejb30-mapping-annotations.html#onetomany

  • Looking for awesome Flex developers

    I'm looking for awesome Flex developers who are interested in creating real-time collaborative applications. Deadline is 7 of May.
    You may call it a race. The apps created are automatically registered in a public voting system. The most popular app created wins 1000$, and the guy who recommend the winner gets 500$. So if you don't have time or don't like the idea of an application contest, be sure to let your friends know.
    This is an actual opportunity for freelancers who are looking to play with new technologies, but often don't find the time or motivation to do it.
    Rules:
                 - register first [free, that's not the point]
                 - use XTWIP collaboration service in your app (much like Adobe LCCS, except that you have full control over the content being shared and that you don't have built-in components)
                 - send your app until 7 of May 2010 [better hurry]
    References:
                 - http://www.xtwip.com/blog/xtwip-developer-contest/
                 - http://www.xtwip.com/blog/xtwip-contest-terms-and-conditions/
    Feel free to ask any question here, on the website, blog, or support email.
    P.S. This is a great opportunity for Flex developers to test their adoption skills. Its target is non-commercial, but technology driven. Cheers.

    Hello tedro2,
    By submitting your application to this contest, you agree that the intellectual property of your creation goes public, under Apache 2.0 license. After the contest is over, we will publish your application source code, as we are interested to allow the open-source community to learn from these experiences.
    Under your approval, we can also publish your application in the XTWIP showcase (by carefully mentioning that you are the creator).
    The scope is not to repackage your application into a new product, but mainly to offer other developers the possibility to see more collaborative applications in action, as our belief is that web should be far more collaborative than it is today.
    Thank you for your question,
    Cristian Andreica
    co-founder XTWIP

  • Personalization:  available for ADF/Fusion developers?

    Hi,
    I had a questionion posited by my supervisor. He asked if the OA personalization "module" was available for Fusion/ADF developers as well? It would be really nice to be able to throw in a way to customize CSS (if personalization even allows this...he said it did) for all Fusion/ADF applications generated; for my client in particular, that is something specific they are looking for because they are OA users as well, and they saw it...so now they want it...
    Michael F.

    ADF/Fusion development is still underway and these standards are not yet out. As per my understanding, a more sophisticated and flexible personalization feature will be available but as of now, there are no published details.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Java Certification for Programmers and Developers(1.4),  by Barry Boone??

    hi,
    Java Certification for Programmers and Developers,
    by Barry Boone is availble for JDK 1.4 also in india???
    plz let me know.
    thanks

    Concerning the download time, see the following RFE.
    http://developer.java.sun.com/developer/bugParade/bugs/4267080.html

  • TRM for FOUNDATION Tables

    Hi all,
    I came to know that TRM is such a good reference for all tables in Oracle Apps.
    I got some TRMs in PDF format from Oracle website. I couldn't find any PDF for FOUNDATION tables.
    Where can i find the TRM for FOUNDATION Tables.
    Link for TRMs : Oracle Applications 11i ERP Documentation

    ArunPrasath wrote:
    Hi Srini & Hussein,
    Both of you have suggested the eTRM website to me in my earlier posts, and that was a great reference.
    But i need TRM in PDF files which gives lot of references. Oracle is providing PDF format of TRMs in this link : http://docs.oracle.com/cd/A85964_01/html/erpset.html
    In this link i couldn't find TRM for FOUNDATION tables.
    You can access PDF files from "Diagrams and PDF Files" under "Download Files" section on the left side of the page -- http://etrm.oracle.com/pls/et1211d9/etrm_fndnav.ls_object?c_name=*.PDF&c_type=FILE
    Thanks,
    Hussein

  • Problem while doing the demo ADF for Forms/4GL Developers

    Hi
    I am running the demo for ADF for Forms/4GL Developers. At Chapter 10(Enabling Security), in page 10-5, they have asked to copy META-INF folder and it should contain jazn-data.xml and orion-application.xml. But in my META-INF folder , i can only find one bundle.xml.
    Can you please help me on how to proceed on that?
    Regards
    Sabarish

    Hi
    I am running the demo for ADF for Forms/4GL Developers. At Chapter 10(Enabling Security), in page 10-5, they have asked to copy META-INF folder and it should contain jazn-data.xml and orion-application.xml. But in my META-INF folder , i can only find one bundle.xml.
    Can you please help me on how to proceed on that?
    Regards
    Sabarish

  • I have built a small website for or B

    I have built a small website for our B&B
    I published it and it worked fine
    I built a second english version (first one was in swedish). I set a path that ended with /en. But that did not work… seamed like iWeb could not create that folder on the ftp server
    So I created the folder myself using FileZilla that the web hotel one.com recommended
    I forget the details, but it does not work and now I get this message for both sites:
    Publish Error
    Can't create the file "nacfill-v2.jpg." The disk may be damaged or full, or you may not have sufficient access privileges,
    I tried deleting the files & folders with FileZilla, but still the same error message
    Anybody?

    Try the troubleshooting steps under "Fix iWeb" here...
    http://www.iwebformusicians.com/iWeb/iWeb-Tips.html
    Name the second website "en" in iWeb. This will produce a folder - en - and, when uploaded to the server, will open with this URL...
    http://www.domain-name.com/en/

  • [b]One small step for a man, one giant leap for mankind[/b]

    Just kidding :-) I was just looking for an eye catcher...
    Want you check out a nice feature? Check out
    http://apex.oracle.com/pls/otn/f?p=33231:40:::NO:::
    and tell me what you think...
    Has been tested with Firefox 2.0 and some basic testing with IE6.0
    More details coming soon.
    Patrick

    I have uploaded some details about the solution and how to integrate it into your own application.
    http://inside-apex.blogspot.com/2007/01/one-small-step-for-man-one-giant-leap.html
    As I have written in the blog posting, I'm really new to JavaScript, just started 1 1/2 month ago and I'm currently on page 351 (total 994) of the JavaScript - The Definitive Guilde. So if you look at my code and think, man are you crazy, why you write that much code to do that, it's a simple regular expression and you are done! Please let me know!
    The JavaScript stuff was more work as I thought (especially if it should work with Firefox and IE), you really appreciate the build in TO_DATE and TO_NUMBER and it's flexibility when you have to implement that by yourself. :-)
    At least I haven't found a JavaScript validation toolbox which is compatible with the format mask settings of Oracle.
    Call for testing:
    -) I want know if the format mask checks I implemented work for all the combinations out there. The weird American ones with AM/PM and the month at be beginning should also work ;-)
    -) If the inline error display also works with other themes and userdefined label templates.
    So please plug it into your application and do a test drive of the new Ferrari! ;-)
    Thanks a lot
    Patrick
    Check out my APEX-blog: http://inside-apex.blogspot.com

  • It's one small step for mankind, but one giant leap for me (DSP program)

    Hi guys,I don´t know if it is a off-topic here or if someone is interested.
    I was developing a DSP program i Java. All I told that I was developing this software
    said it was impossible. The JVM is very heavy, is an interpreted language etc. But it is working
    and with a good performance. Is a SDR (software defined radio) software, it is not finished but if anybody
    want to see some documentation, give me a few days and look for it at
    http:\\gvillamayor.angelfire.com
    If anyone is interested mail me [email protected]

    I have uploaded some details about the solution and how to integrate it into your own application.
    http://inside-apex.blogspot.com/2007/01/one-small-step-for-man-one-giant-leap.html
    As I have written in the blog posting, I'm really new to JavaScript, just started 1 1/2 month ago and I'm currently on page 351 (total 994) of the JavaScript - The Definitive Guilde. So if you look at my code and think, man are you crazy, why you write that much code to do that, it's a simple regular expression and you are done! Please let me know!
    The JavaScript stuff was more work as I thought (especially if it should work with Firefox and IE), you really appreciate the build in TO_DATE and TO_NUMBER and it's flexibility when you have to implement that by yourself. :-)
    At least I haven't found a JavaScript validation toolbox which is compatible with the format mask settings of Oracle.
    Call for testing:
    -) I want know if the format mask checks I implemented work for all the combinations out there. The weird American ones with AM/PM and the month at be beginning should also work ;-)
    -) If the inline error display also works with other themes and userdefined label templates.
    So please plug it into your application and do a test drive of the new Ferrari! ;-)
    Thanks a lot
    Patrick
    Check out my APEX-blog: http://inside-apex.blogspot.com

Maybe you are looking for

  • Why can't I get a pdf document to print in color?

    I am going to school online and I need to print a pdf document that my instructor had me download from my online classroom.  I can get the pdf to print in grayscale but I can't get it to print in color.  It doesn't have anything to do with my printer

  • Azure Pack Windows Service Bus 1.1 wont start on Windows 8.1

    Hi I am installing Azure Pack Windows Service Bus 1.1 on my Windows 8.1 (I have tried with 4 more computers) and everyone keep getting the same error. After the configuration when the Service Bus Gateway tries to start up it gets stuck in starting mo

  • My itunes wont load or open!

    I think I have tried absolutely everything and my Itunes still wont load. Every time I click on itunes it does the blue circle load for about 5 seconds then leaves but never pops up. I have uninstalled every apple product then downloaded them again.

  • How to activate IS-U

    Hi, All, I need to activate IS-U/CCS  utilities. I read notes, but i found some misunderstandings. As i understand to activate IS-U/CCS utiliteis i need to do: note 874416 Call transaction SFW5. Choose the "Utilities" business function set. Select th

  • ALV - field count

    Hi experts, I am having one requiment i am creating one alv report whre i am displyaing ALV grid. So i hav some fields such as org. unit, personal no, position and job id. so my requiment is i am haivng no of organiztional units i which there are no