Created
April 12, 2017 00:10
-
-
Save lrobeson/924429f70deee325db56c5500202c20e to your computer and use it in GitHub Desktop.
Vagrant + Pattern Lab + BrowserSync + Grunt happiness
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (grunt) { | |
grunt.config.merge({ | |
concurrent: { | |
watchSync: ['simple-watch', 'browserSync'], | |
options: { | |
logConcurrentOutput: true | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-concurrent'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (grunt) { | |
grunt.registerTask('default', [ | |
'concurrent:watchSync' | |
]); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# npm install grunt-browser-sync --save-dev | |
"grunt-browser-sync": "^2.2.0", | |
# npm install grunt-concurrent --save-dev | |
"grunt-concurrent": "^2.3.1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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