Comments (8)
This issue seems to have been fixed by my PR #5 .
If you want to give it a try on your site, you can use this command:
npm install --save-dev git://github.com/claycarpenter/metalsmith-browser-sync#active-check
from metalsmith-browser-sync.
@claycarpenter thanks, but... Am I missing something?
npm install --save-dev git://github.com/claycarpenter/metalsmith-browser-sync#active-check
zsh: no matches found: git://github.com/claycarpenter/metalsmith-browser-sync#active-check
from metalsmith-browser-sync.
Now it worked. I changed the contents manually and it worked.
I'll have repeat this process until our friend accepts your PR.
Thanks mate @claycarpenter
from metalsmith-browser-sync.
@franklinjavier great! I was just going to reply that I couldn't replicate the error and suggest you make the changes manually. Glad to hear it's working for you.
from metalsmith-browser-sync.
🍻
from metalsmith-browser-sync.
@claycarpenter every time I save a file, duplicates the quantity of posts.
from metalsmith-browser-sync.
@franklinjavier As far as I can tell right now, this looks like an issue with metalsmith-collections when it's run multiple times without a fresh Metalsmith build. It's late and I'm sleepy and stupid, but it looks like the ms-collections plugin adds the matching files it finds to the global (Metalsmith) metadata each time it's run.
I made a very quick hack that fixed the problem by clearing out the metadata.posts collection before each metalsmith-collections run. The "plugin" looks like this:
.use(function (files, metalsmith, done) {
var metadata = metalsmith.metadata();
delete metadata.posts;
done();
})
And should be inserted before the metalsmith-collections plugin in the pipeline. I'm not saying this is a smart hack, but it should get you going for the time being.
Considering this issue probably isn't the fault of this metalsmith-browser-sync plugin, we should probably move the conversation over to your repo if you want to continue.
from metalsmith-browser-sync.
Thanks for the solution.
from metalsmith-browser-sync.
Related Issues (11)
- Triggerring multiple builds HOT 3
- Wrapping plugin causes browserSync issues
- Doesn't trigger a rebuild/refresh for changes in css HOT 1
- How to inject CSS without reload? What am I doing wrong? HOT 5
- 404 on file change. HOT 2
- collection is appended at each change HOT 1
- Ambiguous files option and watchers
- Consider displaying an error message if the build fails, even without debug set
- Opens browser by default - can that be disabled? HOT 1
- Dangling server process after interrupt
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metalsmith-browser-sync.