Skip to content
Dennis Heibuelt edited this page May 27, 2015 · 2 revisions

When you begin a new project with patternlab-scaffolding, you got to set up everything in order to scaffold your codebase correctly.

Automatic

First of all you need to clone this project:

$ git clone [email protected]:csshugs/patternlab-scaffolding.git

Next, get yourself the necessary dependencies:

$ npm install 

$ bower install

Then you'll need to run the init script:

$ sh init

Generate Pattern Lab initially:

$ php core/builder.php -g

Pattern Lab is now scaffolded and you can start the Pattern Lab watcher with:

$ php core/builder.php -wrp

...and the grunt watcher with:

$ grunt dev

...and go to http://localhost:8000.

Manually

Clone this project:

$ git clone [email protected]:csshugs/patternlab-scaffolding.git

Get yourself the necessary dependencies:

$ npm install 

$ bower install

Remove source folder:

$ rm -rf source/

Next Download Pattern Lab and grab everthing from the Pattern Lab Zip except the .gitignore and README.md and throw it into the root of your project.

Generate Pattern Lab initially:

$ php core/builder.php -g

Remove css folder:

$ rm -rf source/css/

Then:

$ git submodule init 

$ git submodule update

Make sure the submodule is up to date:

$ cd source/css/

$ git pull origin master

$ cd ../../    

Remove unnecessary git files and folders:

$ rm -rf source/css/.git

$ rm -rf .git/

$ rm -rf .gitmodules

Remove unnecessary js files:

$ rm -rf source/js/

Create empty script.js:

$ mkdir source/js/

$ > source/js/script.js

Finally remove the init script:

$ rm init

Pattern Lab is now scaffolded and you can start the Pattern Lab watcher with:

$ php core/builder.php -wrp

...and the grunt watcher with:

$ grunt dev

...and go to http://localhost:8000.