From 9ecdd7b68efd9460d27f82b6464a19dceb58e734 Mon Sep 17 00:00:00 2001 From: Patrick Weston Date: Tue, 19 Dec 2017 11:30:46 -0500 Subject: [PATCH 1/3] Update and rename config_dev.yml to config_vagrant.yml --- STYLEGUIDE_TEMPLATE_SPRESS/config_dev.yml | 4 ---- STYLEGUIDE_TEMPLATE_SPRESS/config_vagrant.yml | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 STYLEGUIDE_TEMPLATE_SPRESS/config_dev.yml create mode 100644 STYLEGUIDE_TEMPLATE_SPRESS/config_vagrant.yml diff --git a/STYLEGUIDE_TEMPLATE_SPRESS/config_dev.yml b/STYLEGUIDE_TEMPLATE_SPRESS/config_dev.yml deleted file mode 100644 index 692ec10..0000000 --- a/STYLEGUIDE_TEMPLATE_SPRESS/config_dev.yml +++ /dev/null @@ -1,4 +0,0 @@ -# Site configuration - -url: '' -debug: true diff --git a/STYLEGUIDE_TEMPLATE_SPRESS/config_vagrant.yml b/STYLEGUIDE_TEMPLATE_SPRESS/config_vagrant.yml new file mode 100644 index 0000000..cd4e1d0 --- /dev/null +++ b/STYLEGUIDE_TEMPLATE_SPRESS/config_vagrant.yml @@ -0,0 +1,3 @@ +# Site configuration for running Butler and Spress inside of vagrant +url: '' +debug: true From 38f31abfb908170bcd3e9b02f3d975dc9f7e1bb9 Mon Sep 17 00:00:00 2001 From: Patrick Weston Date: Tue, 19 Dec 2017 11:38:14 -0500 Subject: [PATCH 2/3] Add task for running on vagrant --- Gulpfile.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Gulpfile.js b/Gulpfile.js index e03ab7e..da65774 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -120,6 +120,12 @@ gulp.task('spress-serve', ['sass'], function () { .pipe(exec(defaults.spress_bin + ' site:build --server --source=' + defaults.spress_home)); }); +gulp.task('spress-serve-vagrant', ['sass'], function () { + return gulp.src(defaults.spress_home) + .pipe(exec('fuser 4000/tcp --kill || true')) + .pipe(exec(defaults.spress_bin + ' site:build --server --env=vagrant --source=' + defaults.spress_home)); +}); + gulp.task('spress-build', function () { return gulp.src(defaults.spress_home) .pipe(exec(defaults.spress_bin + ' site:build --source=' + defaults.spress_home)); @@ -162,6 +168,9 @@ gulp.task('watch', function() { // Set Develop task gulp.task('develop', defaults.develop_tasks); +// Set develop-vagrant task +gulp.task('develop-vagrant', defaults.develop_tasks_vagrant); + // Set a test task gulp.task('test', ['lint', 'audit']); From e39940e362d69acf5852761c81fb80bdf866d431 Mon Sep 17 00:00:00 2001 From: Patrick Weston Date: Tue, 19 Dec 2017 11:40:07 -0500 Subject: [PATCH 3/3] Update README with new script for package.json --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 26bd405..926783c 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ npm install --save --save-exact palantirnet/butler ```` "scripts": { "butler": "node_modules/butler/node_modules/.bin/gulp --gulpfile node_modules/butler/Gulpfile.js", + "butler-vagrant": "node_modules/butler/node_modules/.bin/gulp --gulpfile node_modules/butler/Gulpfile.js develop-vagrant", "develop": "node_modules/butler/node_modules/.bin/gulp --gulpfile node_modules/butler/Gulpfile.js develop", "tests": "node_modules/butler/node_modules/.bin/gulp --gulpfile node_modules/butler/Gulpfile.js test", "deploy": "node_modules/butler/node_modules/.bin/gulp --gulpfile node_modules/butler/Gulpfile.js spress-deploy"