Skip to content

Instantly share code, notes, and snippets.

@lrobeson
Created April 12, 2017 00:10
Show Gist options
  • Save lrobeson/924429f70deee325db56c5500202c20e to your computer and use it in GitHub Desktop.
Save lrobeson/924429f70deee325db56c5500202c20e to your computer and use it in GitHub Desktop.
Vagrant + Pattern Lab + BrowserSync + Grunt happiness
module.exports = function (grunt) {
grunt.config.merge({
browserSync: {
dev: {
bsFiles: {
src : ['<%= pkg.themePath %>/css/pattern-lab.css',
'<%= pkg.themePath %>/pattern-lab/public/latest-change.txt'
]
},
options: {
proxy: "10.11.12.14",
open: false
}
}
}
});
grunt.loadNpmTasks('grunt-browser-sync');
}
module.exports = function (grunt) {
grunt.config.merge({
concurrent: {
watchSync: ['simple-watch', 'browserSync'],
options: {
logConcurrentOutput: true
}
}
});
grunt.loadNpmTasks('grunt-concurrent');
}
module.exports = function (grunt) {
grunt.registerTask('default', [
'concurrent:watchSync'
]);
};
# npm install grunt-browser-sync --save-dev
"grunt-browser-sync": "^2.2.0",
# npm install grunt-concurrent --save-dev
"grunt-concurrent": "^2.3.1",
# BrowserSync
config.vm.network :forwarded_port, guest: 3000, host: 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment