Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Drupal
drupalizer
Commits
5848f913
Unverified
Commit
5848f913
authored
May 19, 2016
by
Emmanuel Milou
Browse files
Build the PatternLab static site
parent
a1a9e2fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
__init__.py
View file @
5848f913
...
...
@@ -2,6 +2,7 @@ import docker
from
deploy
import
*
import
drush
import
behat
import
patternlab
from
.environments
import
e
from
fabric.api
import
task
,
env
,
execute
...
...
default_vars.py
View file @
5848f913
...
...
@@ -28,8 +28,15 @@ env.site_admin_pass = 'admin'
env
.
site_subdir
=
'default'
# PatternLab
# Specify the PatternLab dir is you want the style guide to be generated
env
.
patternlab_dir
=
''
# Database dump
# To enable it, replace the boolean value with the absolute path of a gzipped SQL dump file.
env
.
db_dump
=
False
# Docker
...
...
patternlab.py
0 → 100644
View file @
5848f913
from
__future__
import
unicode_literals
from
fabric.api
import
task
,
roles
,
env
from
fabric.colors
import
green
import
helpers
as
h
@
task
@
roles
(
'local'
)
def
build
():
"""
Generate the PatternLab static site
"""
role
=
'local'
workspace
=
env
.
docker_workspace
host
=
env
.
site_hostname
site_root
=
env
.
docker_site_root
with
h
.
fab_cd
(
role
,
env
.
patternlab_dir
):
h
.
fab_run
(
role
,
'touch public/styleguide/html/styleguide.html'
)
h
.
fab_run
(
role
,
'php core/builder.php -g'
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment