발전기를 사용하여 https://github.com/seaneking/generator-polymer-element에서 종료되었습니다.
이 내 작업 gulpfile.js입니다 :
https://jsfiddle.net/svantetobias/qqwcrwcf/1/ 내가 여기에 중요한 부분이라고 생각 :
// Core deps
// Using require() because of rollup babel preset
const gulp = require('gulp');
const gulprun = require('run-sequence');
const browserSync = require('browser-sync');
const bs = browserSync.create()
const OPTIONS = {
browserSync: {
server: {
baseDir: './',
index: 'demo/index.html',
routes: {
'/': './bower_components'
}
},
open: false, // Don't open browser on reload
notify: true // Show notifications in the browser.
}
};
gulp.task('build',() => {
// Build stuff...
});
gulp.task('serve', (callback) => bs.init(OPTIONS.browserSync));
gulp.task('refresh',() => bs.reload());
gulp.task('watch',() => gulp.watch(['src/**/*'],() => gulprun('build', 'refresh')));
gulp.task('default', ['build', 'serve', 'watch']);
이 작업을 얻기에 어떤 행운이? 나는 많은 엑스트라를 포함하고 있기 때문에 그가 링크하고있는 repo가 실패하고있는 것처럼 보이기 때문에 아래의 답을 사용하고 싶지 않습니다. 내 목표는 간단하게 유지하고 사용자 정의 빌드에 브라우저 동기화 만 추가하는 것입니다. – Oneezy
gulp 파일을 다음과 같이 변경했습니다. https://gist.github.com/edvail/4c0ffb1d76c86808cd3d7b467b0e7ab5 –
감사합니다! 나는 그것을 줄 것이다 – Oneezy