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

New auto #1734

Merged
merged 33 commits into from Jun 9, 2015
Merged

New auto #1734

merged 33 commits into from Jun 9, 2015

Conversation

ralsina
Copy link
Member

@ralsina ralsina commented May 19, 2015

This replaces livereload with a homebrew version. It seems to fix #1729 and #1757 to me, and also adds a nice thing in that it shows build failures in the web page as an alert (may be too annoying ;-)

Missing bits:

  • Cleanup
  • Support -b
  • Support -a
  • Error out on missing deps
  • Use re to inject JS instead of replace

@Kwpolska
Copy link
Member

Kwpolska commented May 20, 2015

suggestion:

mv auto.plugin ../
mv auto.py __init__.py

Will make things a bit cleaner.

def inject_js(self, mimetype, data):
"""Inject livereload.js in HTML files."""
if mimetype == 'text/html':
data = re.sub('</head>', self.snippet, data, 1, re.IGNORECASE)
Copy link
Contributor

@da2x da2x May 21, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

</body> or add <script async …>

Note that HTML5 do not guarantee any element. It requires doctype and title only.

Copy link
Member Author

@ralsina ralsina May 31, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the suggestion. How would you inject it?

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@ralsina ralsina changed the title [WIP] New auto New auto May 24, 2015
@ralsina
Copy link
Member Author

ralsina commented Jun 2, 2015

@Aeyoun @Kwpolska so ... any pending concerns with this branch?

import wsgiref.util

from blinker import signal
import pyinotify
Copy link
Member

@Kwpolska Kwpolska Jun 2, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works on Linux only and crashes on other platforms:

Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\yapsy\PluginManager.py", line 484, in loadPlugins
    candidate_module = imp.load_module(plugin_module_name,None,candidate_filepath,("py","r",imp.PKG_DIRECTORY))
  File "C:\projects\nikola\nikola\plugins\command\auto\__init__.py", line 43, in <module>
    import pyinotify
ImportError: No module named pyinotify

You would have to find another library, like watchdog.

ralsina added a commit that referenced this issue Jun 9, 2015
@ralsina ralsina merged commit 88c4cad into master Jun 9, 2015
3 checks passed
@ralsina ralsina deleted the new-auto branch Jun 9, 2015
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.

3 participants