-
Notifications
You must be signed in to change notification settings - Fork 3
Working with patternlab scaffolding
Your working directory is source/
.
public/
is Pattern Labs destination folder where everything comes in automatically and gets displayed in the browser. So don't ever touch files in there!
As long as you have $ grunt dev
and $ php core/builder.php -wrp
running in parallel, every change of source code in source/
is recognized. Consequently, the particular compilation takes effect and the compiled files are copied into public/
. Ultimately the browser is reloaded automatically.
When you are working with a content managment system such as WordPress, patternlab-scaffolding provides the feature to copy the CSS/JavaScript/Fonts automatically to the correspondent path of the cms. Therefore you must adjust that path in the Gruntfile.js
:
cms: {
css: 'cms/css',
stylesheet: 'cms/css/style.css',
js: 'cms/js',
fonts: 'cms/fonts'
}
By these default settings, the CSS/JavaScript/Fonts will go into a cms/
folder in the projects' root directory.
To match the path, e.g. for a WordPress project, the configuration will look like this:
cms: {
css: '../wordpress/wp-content/themes/twentyfifteen',
stylesheet: '../wordpress/wp-content/themes/twentyfifteen/style.css',
js: '../wordpress/wp-content/themes/twentyfifteen/js',
fonts: '../wordpress/wp-content/themes/twentyfifteen/fonts'
}