- Install Node.js
- Run
sudo npm install -g gulp yo generator-pho
Phở Devstack uses Gulp as task runner, Yeoman for scaffolding new projects and Bower for installing client-side packages
- Create a project directory
mkdir new-project && cd $_
- Generate initial project structure
yo pho
You project directory will look like this:
.bowerrc
- config file that tells Bower where to install packages.editorconfig
- EditorConfig sets consistent coding styles between different editors.gitignore
- files that should not be commited to Git.jshintrc
- JSHint settings for detecting possible problems in your JavaScript sourcesdist
- folder where generated files are placed (do not edit files here)gulpfile-production.js
- settings for production mode of Phở Devstackgulpfile.js
- settings for development mode of Phở Devstacknode_modules
- folder where npm packages like gulp or pho-devstack are installedpackage.json
- file that specifies which packages should npm installsrc
- folder with source files (write your code here)bower_components
- folder where Bower packages like lesshat are installedimages
- folder containing imagessprites
- images for sprites-preprocessor
index.html
- main markup filescripts
- folder with JavaScript codestyles
- folder containing stylesheets
substitute-config.js
- settings for substituter, e.g. Analytics ID, project description
- Run build system
gulp
- Open
dist/index.html
in your browser - Edit files in
src/
, build will run automatically and page will be reloaded in browser(s)
When you're finished, press Ctrl + C
to quit build system.
For a production build, run gulp --gulpfile gulpfile-production.js
. You can use this command in your CI or deploy script.
Now you've created a new project or set up Phở for an existing project. With the default options enabled, you'll find yourself able to do a lot of cool stuff, but every plugin that's included in Phở is customizable and can be turned off.
For information about configuring Phở, see Configuration. For answers to some common questions see FAQ.