PhpStorm 8.0.0 Web Help

Generating a Project from a Framework Template

During project creation, PhpStorm can generate a project stub for developing Web applications. The project structure is set up and some sources are generated based on external templates and frameworks downloaded upon your request.

PhpStorm generates project stubs based on the following templates:

On this page:

Generating a HTML5 Boilerplate, Twitter Bootstrap, or Foundation Application Stub

  1. Choose File | New Project on the main menu or click the New Project button on the Welcome screen.
  2. In the Create New Project dialog box that opens, specify the project name and location.
  3. Choose the template to use depending on your preferences and the functionality to be implemented in your application. From the Project type drop-down list, choose one of the following items:
    • Empty: choose this option to get just a project folder without any contents.
    • Composer Project: choose this option to have a project stub created using the Composer template.
    • Drupal Module: choose this option to have a Drupal module created and set up.
    • HTML5 Boilerplate: choose this option to use the HTML5 Boilerplate template. This is a starting project template that can be easily adapted to your needs.
    • Twitter Bootstrap: choose this option to use the Twitter Bootstrap template, which is an elaborate modular toolkit with rich HTML, CSS, and JavaScript support.
    • Foundation: choose this option to use the Foundation framework.
    Click OK, when ready.
  4. In the dialog box, that opens, choose the template version to use and click the Create button.

Generating a Node.js Express Application Stub

  1. Choose File | New Project on the main menu or click the New Project button on the Welcome screen.
  2. In the Create New Project dialog box that opens, specify the project name and location.
  3. From the Project type drop-down list, choose Node.js Express App and click OK.
  4. In the Express App Project Settings dialog box, that opens, specify the following:
    1. The location of the Node.js executable file node.exe.
    2. The location of the Node.js package manager file npm.cmd.
    3. The Express template engine to use. From the Template engine drop-down list, choose one of the following:
      • Jade - haml.js successor.
      • EJS - embedded JavaScript.
    4. The CSS engine to use. From the CSS engine drop-down list, choose one of the following:
  5. Click OK, when ready. PhpStorm launches the Express Project Generator tool that downloads all the required data, sets up the project structure, and opens the project either in the current window or in a new one, depending on your choice.

Generating a Dart Application Stub

  1. From the Project type drop-down list, choose one of the following:
    • Choose Empty Dart Project to have PhpStorm generate a project stub with the .idea folder and the Dart SDK attached as an External Library.
    • Choose Dart Web Application if you are going to develop a client-side Dart application.
    • Choose Dart Command Line Application for developing a server-side or a client-side application, provided that you are going to run, debug, and test it in the command line mode, that is, without deploying and running it on the server or in the browser and with the output shown in the console.
  2. In the Dart dialog box that opens, specify the paths to the Dart SDK and to the Dartium executable file. PhpStorm detects and displays the Dart version. If the SDK was downloaded within the Dart Editor Bundle, the path to Dartium is also detected and filled in automatically.

    To have have annotations verified and assertions checked, select the Start Dartium in checked mode check box. Learn more about Dartium command line flags at https://www.dartlang.org/tools/dartium/.

    Click OK when ready.

Generating a Meteor Application Stub

  1. Choose File | New Project on the main menu or click the New Project button on the Welcome screen.
  2. In the Create New Project dialog box that opens, specify the project name and location.
  3. From the Project type drop-down list, choose Meteor JS App and click OK.
  4. In the Meteor JS App dialog box, that opens, specify the location of the Meteor executable file (see Installing Meteor), and choose the sample to generate from the Project Template drop-down list. To have a basic project structure generated, choose the Default option.

Generating a PhoneGap/Cordova/Ionic Application Stub

  1. Choose File | New Project on the main menu or click the New Project button on the Welcome screen.
  2. In the Create New Project dialog box that opens, specify the project name and location.
  3. From the Project type drop-down list, choose PhoneGap/Cordova App and click OK.
  4. In the PhoneGap/Cordova App dialog box, that opens, specify the location of the executable file phonegap.cmd, or cordova.cmd, or ionic.cmd (see Installing PhoneGap/Cordova/Ionic).

Generating an AngularJS Application Stub

  1. Choose File | New Project on the main menu or click the New Project button on the Welcome screen.
  2. In the Create New Project dialog box that opens, specify the project name and location.
  3. From the Project type drop-down list, choose AngularJS. The AngularJS dialog box opens.
  4. From the Version drop-down list, choose the branch https://github.com/angular/angular.js to download the project template from. By default, master if shown.
  5. When you click OK, PhpStorm sets up the AngularJS-specific project structure and generates the bower.json and package.json files with the definitions of all the necessary dependencies.
  6. Download the AngularJs dependencies that contain the AngularJS code and the tools that support development and testing.
    1. Launch the embedded Terminal by hovering your mouse pointer over show_tool_window_bars in the lower left corner of PhpStorm and choosing Terminal from the menu (see Working with Embedded Local Terminal for details).
    2. Switch to the directory where NPM is stored or define a PATH variable for it so it is available from any folder, see Installing NodeJs.
    3. At the command line prompt, type the following command:
      d112793e260_2429665768874183

    Learn more about the installation of dependencies in the Install Dependencies section of the readme.md file.

Generating a Composer Project Stub

  1. Choose File | New Project on the main menu or click the New Project button on the Welcome screen.
  2. In the Create New Project dialog box that opens, specify the project name and location.
  3. From the Project type drop-down list, choose Composer Project. The Composer Project Dialog opens.
  4. Appoint the Composer instance to use.
    • To use commands from a previously downloaded composer.phar, choose Use existing composer.phar: and specify it location in the text box.
    • To have a new instance of Composer downloaded, choose Download composer.phar from getcomposer.org:. The composer.phar file will be saved under the project root folder specified in the Create New Project dialog.
  5. In the Package area, specify the package to install during the project creation. Select the package to add from the Available Packages list, possibly using the search field, and choose the relevant version from the Version to install drop-down list.

Generating a WordPress Application Stub

  1. From the Project type drop-down list, choose WordPress Plugin. The WordPress Plugin dialog box opens.
  2. In the WordPress Installation Path text box, specify the folder where WordPress is installed. This folder should contain the wp-admin and wp-includes subdirectories.
  3. If the project is outside the WordPress installation folder, configure it as an external library by adding it to the list of included path.
    1. Open the project settings by choosing File | Settings | Project Settings . Then click PHP.
    2. On the PHP page that opens, add the path to the WordPress installation folder to the Include Paths list: click the add button and specify the path to the installation folder in the dialog box that opens. Learn more in Configuring Include Paths.

See Also

Last modified: 2 December 2014
comments powered by Disqus