Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Watch Pattern #115

Closed
wants to merge 1 commit into from
Closed

Fix: Watch Pattern #115

wants to merge 1 commit into from

Conversation

gpedro
Copy link
Member

@gpedro gpedro commented Apr 21, 2015

No description provided.

@gpedro
Copy link
Member Author

gpedro commented Apr 21, 2015

#109

@zenorocha
Copy link
Member

Just started reviewing :)

:octocat: Sent from GH.

@zenorocha
Copy link
Member

Hey @gpedro, I tried changing a value in src/layout/default.html and changes were not updated.

@gpedro
Copy link
Member Author

gpedro commented Apr 21, 2015

@zenorocha, it appears that changed, but we need a trigger to rebuild.

@obetomuniz
Copy link
Member

@gpedro @zenorocha The link below show another implementation using path module

https://github.com/braziljs/conf-boilerplate/blob/migration/docpad2metalsmith/metalsmith.js

@zenorocha
Copy link
Member

I noticed that too @gpedro, could you send a fix?

@gpedro
Copy link
Member Author

gpedro commented Apr 21, 2015

path.join LGTM. i'm trying understand how to trigger build on watch

@gpedro
Copy link
Member Author

gpedro commented Apr 21, 2015

well, the problem is caused by

metalsmith.source('src/documents')

the rebuilder is working, but the source path fucks my life. If I change the layout/default and save, it creates the layouts folder in the root directory.
this happens with both branches migration/docpad2metalsmith as metalsmith.

we may have to create an intermediate folder (.tmp) to separate what will not go to the out folder

cc @zenorocha @obetomuniz

@zenorocha
Copy link
Member

I see... well, we could try another solution such as metalsmith-simplewatch.

That way we don't need to create another build step to filter what is generated and what isn't.

@zenorocha
Copy link
Member

Could you check it out @gpedro?

@gpedro
Copy link
Member Author

gpedro commented Apr 21, 2015

@zenorocha: I will test this.

@gpedro
Copy link
Member Author

gpedro commented Apr 21, 2015

@zenorocha, @obetomuniz
there are better ways to solve this problem, but gulp LGTM
https://github.com/gpedro/conf-boilerplate/commits/feature/metalsmith-gulp

@zenorocha
Copy link
Member

I love gulp but introducing another build tool doesn't look good to me.

@zenorocha
Copy link
Member

Maybe a standalone solution like simple-recursive-watch may work.

@gpedro
Copy link
Member Author

gpedro commented Apr 21, 2015

@zenorocha,
simple-recursive-watch works! but the metalsmith does not work. When he will rebuild, rather than loading the file name, it loads the content in the name. WTF?

look: http://i.imgur.com/qnyC7yf.png

@zenorocha
Copy link
Member

wait, what? hahaha

can you send your code so we can take a look?

@gpedro
Copy link
Member Author

gpedro commented Apr 21, 2015

@zenorocha
Copy link
Member

Tried several stuff here and still couldn't make it work. @obetomuniz, could you take a look?

@gpedro
Copy link
Member Author

gpedro commented Apr 22, 2015

@zenorocha, I will create an issue at segmentio/metalsmith reporting that.

---edit
segmentio/metalsmith/#134

@diogomoretti
Copy link
Member

Any solution to the watch? The metalsmith watch it is now in version 1.0.1. Or we will use gulp method?

@gpedro
Copy link
Member Author

gpedro commented May 17, 2015

@diogomoretti i will try with the 1.0.1

@diogomoretti
Copy link
Member

The same error for me in your gif :/

@gpedro
Copy link
Member Author

gpedro commented Jun 8, 2015

why we choose metalsmith? cc @zenorocha

@zenorocha
Copy link
Member

Problem fixed.

@zenorocha zenorocha closed this May 5, 2016
@zenorocha
Copy link
Member

I chose metalsmith after evaluating all the other JavaScript-based static generators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants