nv / chrome-devtools-autosave-server Goto Github PK
View Code? Open in Web Editor NEWSimple Node.js server for chrome-devtools-autosave
Simple Node.js server for chrome-devtools-autosave
It seems that there's some conflicts when I start the livereload app on my mac. I have tried to uninstall livereload and use gulp-livereload, browsersync and gulp-connect but they all use livereload. The problem is that basically I can only save one css rule and then it looks like autosave stalls and loses connection. Any ideas??
At the end, I'm trying to start my gulp project and have autosave available for editing my css.
Also, can this support SASS?
Thanks!
Hi,
I get following errors when installing via cmd on Windows:
C:>npm install -g autosave
npm http GET https://registry.npmjs.org/autosave
npm http 200 https://registry.npmjs.org/autosave
npm http GET https://registry.npmjs.org/autosave/-/autosave-1.0.1.tgz
npm http 200 https://registry.npmjs.org/autosave/-/autosave-1.0.1.tgz
npm http GET https://registry.npmjs.org/commander
npm http 200 https://registry.npmjs.org/commander
npm http GET https://registry.npmjs.org/commander/-/commander-0.5.2.tgz
npm http 200 https://registry.npmjs.org/commander/-/commander-0.5.2.tgz
C:\Documents and Settings\guma\Application Data\npm\autosave -> C:\Documents and
Settings\guma\Application Data\npm\node_modules\autosave\bin\autosave
[email protected] install C:\Documents and Settings\guma\Application Data\npm\nod
e_modules\autosave
node ./scripts/install.js
fs.js:420
return binding.lstat(pathModule._makeLong(path));
^
Error: ENOENT, no such file or directory 'C:\Documents and Settings\guma\Library
\LaunchAgents'
at Object.lstatSync (fs.js:420:18)
at isDirectory (C:\Documents and Settings\guma\Application Data\npm\node_mod
ules\autosave\scripts\install.js:9:20)
at Object. (C:\Documents and Settings\guma\Application Data\npm\n
ode_modules\autosave\scripts\install.js:3:25)
at Module._compile (module.js:446:26)
at Object..js (module.js:464:10)
at Module.load (module.js:353:31)
at Function._load (module.js:311:12)
at Array.0 (module.js:484:10)
at EventEmitter._tickCallback (node.js:190:38)
npm ERR! [email protected] install: node ./scripts/install.js
npm ERR! cmd "/c" "node ./scripts/install.js"
failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the autosave package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./scripts/install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls autosave
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System Windows_NT 5.1.2600
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "autosave"
npm ERR! cwd C:
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.24
npm ERR! code ELIFECYCLE
npm ERR! message [email protected] install: node ./scripts/install.js
npm ERR! message cmd "/c" "node ./scripts/install.js"
failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\npm-debug.log
npm not ok
npm not ok
Please help
The bash script for the autostart appears to use the $HOME variable, but with a (very) few mac systems (at least mine) this variable has whitespace with "/Volumes/Macintosh HD". This is entirely due to the fact that I'm nuts and use an SSD for my OS and an HDD for my home directory (performance and storage ftw).
At your discretion this issue can be fixed by simply wrapping this variable in double quotes. I realize this is a super minor issue. thanks! :)
if [ -d "$HOME/Library/LaunchAgents/" ]; then
# Mac OS X
launch_agents_dir="$HOME/Library/LaunchAgents/"
name='com.chrome.devtools.autosave.launchd'
filename=$name.plist
cp -v dirname $0
/$filename "$launch_agents_dir"
launchctl remove $name >/dev/null 2>/dev/null
launchctl load "$launch_agents_dir/$filename"
elif [ -d /etc/init ]; then
# Ubuntu
cp -v dirname $0
/autosave.conf /etc/init/
start autosave
else
echo 'Unsupported platform'
exit 1
fi
How do I get rid off Autosave? I've removed the Chrome extension. Where is the server installed and how do I remove from terminal?
Sorry, but I couldn't get it working, so I'm trying Tincr instead. It's very likely my fault, but I don't have time to look into it any deeper.
i have installed everything correctly
but i am getting
" DevTools Autosave Server doesn’t run on http://127.0.0.1:9104/save"
error
and wen i opened http://127.0.0.1:9104/save it says X-URL header is missing
I get this error. Does it mean anything to anyone?
C:\Users\myname>npm install -g autosave
npm http GET https://registry.npmjs.org/autosave
npm http 304 https://registry.npmjs.org/autosave
npm WARN package.json [email protected] No README.md file found!
npm http GET https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/commander
\mydomain.local\data\Profiles\myname\Application Data\npm\autosave -> \mydomain.lo
cal\data\Profiles\myname\Application Data\npm\node_modules\autosave\bin
autosave
[email protected] install \mydomain.local\data\Profiles\myname\Application Dat
a\npm\node_modules\autosave
node ./scripts/install.js
'\mydomain.local\data\Profiles\myname\Application Data\npm\node_modules\autos
ave'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
module.js:340
throw err;
^
Error: Cannot find module 'C:\Windows\scripts\install.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.runMain (module.js:492:10)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
npm ERR! [email protected] install: node ./scripts/install.js
npm ERR! cmd "/c" "node ./scripts/install.js"
failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the autosave package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./scripts/install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls autosave
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "-g" "autosave"
npm ERR! cwd C:\Users\myname
npm ERR! node -v v0.8.11
npm ERR! npm -v 1.1.62
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\myname\npm-debug.log
npm ERR! not ok code 0
To easily track errors like this one NV/chrome-devtools-autosave#15.
Turn it on by default.
First let me commend you on an AMAZING application you've built here, thank you very much! Second I'm not a strong terminal user yet so this issue is probably with me. Autosave runs great for me if I simply open Chrome and run Autosave, however in order to run certain JS files durning my website development I have to open chrome with the flag --allow-file-access-from-files in order to work on it locally. When I open chrome with this flag and restart Autosave I can't get Autosave to work... Any ideas? Similarly I'm running 2 versions of chrome (stable release and canary) and I can not get Autosave to run on Chrome Canary either. I tried finding where I could edit the Autosave file in /usr/bin to maybe find where I could change "Google Chrome.app" to "Google Chrome Canary.app" HAHAHAHA no dice. Regardless Autosave FTW!!!!
I'm using this on a vagrant VM where the IP address is 33.33.33.10 instead of 127.0.0.1.
Might be nice to be able to run this on a remote dev server as well, I can see that making life easier for front enders if they don't have to install a complicated CMS.
I tried to update the new version, but it gives error. How can I install?
Screenshot: http://d1206.hizliresim.com/y/d/7td5c.jpg
Is it possible to autosave on a remote machine?.
That would be awsome.
Thanks for this great tool!
Deprecating the "X-" Prefix and Similar Constructs in Application Protocols
X-URL → Autosave-URL
X-Autosave-Version → Autosave-Version
X-Path → Autosave-Path
X-Type → Autosave-Type
Do it in the next major release.
this is related to #21, but essentially I just installed autosave using npm, and for some reason the 1.0.2 version didn't include quotes around the $HOME variable strings... after putting these in everything described at https://github.com/NV/chrome-devtools-autosave-server worked.
if [ -d "$HOME/Library/LaunchAgents/" ]; then
# Mac OS X
launch_agents_dir="$HOME/Library/LaunchAgents/"
name='com.chrome.devtools.autosave.launchd'
filename=$name.plist
cp -v `dirname $0`/$filename "$launch_agents_dir"
launchctl remove $name >/dev/null 2>/dev/null
launchctl load "$launch_agents_dir"/$filename
elif [ -d /etc/init ]; then
# Ubuntu
cp -v `dirname $0`/autosave.conf /etc/init/
start autosave
else
echo 'Unsupported platform'
exit 1
fi
Make a script that runs autosave
as a daemon on OS start up. Use launchd for Mac OS X, /etc/init.d for Linux and something for Windows.
➤ autosave
DevTools Autosave 0.2.3 is listening on http://127.0.0.1:9104
➤ autosave
DevTools Autosave 0.2.3 is listening on http://127.0.0.1:9104
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: listen EADDRINUSE
at errnoException (net.js:642:11)
at Array.0 (net.js:743:26)
at EventEmitter._tickCallback (node.js:192:40)
Keep getting this error:
8/23/14 2:14:12.184 PM com.apple.xpc.launchd[1]: (com.chrome.devtools.autosave.launchd[2940]) Service could not initialize: 14A329r: xpcproxy + 14049 [1344][4D240BE7-AF8F-3396-859F-B6E646073F3A]: 0xd 8/23/14 2:14:12.185 PM com.apple.xpc.launchd[1]: (com.chrome.devtools.autosave.launchd) Service only ran for 0 seconds. Pushing respawn out by 10 seconds.
It seems autosave on windows adds lines ending with CRLF.
That's ..unfortunate if the rest of the file uses only LF.
Autodetection would be nice but all I really need is a switch to force LF always.
Anyone solve it yet?
Thanks
Can we timestamp the output of the server so we know when a file was last saved at a quick glance?
Currently:
Saved a stylesheet to /css/global.css
Saved a stylesheet to /css/global.css
Saved a stylesheet to /css/global.css
Proposed:
2012-01-13 12:08:45: Saved a stylesheet to /css/global.css
2012-01-13 12:08:52: Saved a stylesheet to /css/global.css
2012-01-13 12:09:07: Saved a stylesheet to /css/global.css
Ubuntu 12.04
sudo npm install -g autosave
module.js:340
throw err;
^
Error: Cannot find module 'graceful-fs'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object. (/usr/share/npm/lib/utils/ini.js:32:10)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
Please add a license ASAP even if it is unmaintained
It should be possible to disable writing to specific subfolders, so that you can prevent accidental changes to external libraries.
When I run the command prompt "npm install -g autosave" I get:
"'npm' is not recognized as an internal or external command, operable program or batch file."
Any suggestions?
Windows 7
Intel i7
Make a postinstall npm hook for all major operating systems.
http://en.wikipedia.org/wiki/Init
Create a ~/Library/LaunchAgents/com.chrome.devtools.autosave.launchd.plist file with the following content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.chrome.devtools.autosave.launchd</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/autosave</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin</string><!-- dirname $(which node) -->
</dict>
<key>StandardOutPath</key>
<string>/var/log/autosave.log</string>
<key>StandardErrorPath</key>
<string>/var/log/autosave.error.log</string>
</dict>
</plist>
Make sure it works:
➤ launchctl load ~/Library/LaunchAgents/com.chrome.devtools.autosave.launchd.plist
➤ launchctl list | grep chrome
38609 - com.chrome.devtools.autosave.launchd
Enjoy.
http://en.wikipedia.org/wiki/Windows_Registry#Command_line_editing
I'm having problems with this extension. CMD says "Dev Tools Autosave is running on http://127.0.0.1:9104".
However, when I try to make changes in browser window pops up and says "Autoserver doesn't run on http://127.0.0.1:9104". What should I do? I've re-installed extension once already and run that command in CMD.
I'm currently not running the server as a service, and would love to see the time again in the output. This often helped me determine when / if something stopped working, and when the last save was.
Let's say we have 3 request happens almost at the same time:
request #1 | r1 r2 r3
We begin writing to the file when request event 'end' fires. Writing to the file takes much more time than processing a request (parse HTTP headers and stuff):
begin writing end writing | | r1-b------------e r2 r3
Where is no need to write second request r2
— we're going to rewrite it anyway. We could just write the third r3
when the first is done:
begin writing end writing | | r1-b------------e r2 r3....b------------e
Or, we could stop writing the current request when the next one is available:
stop writing | r1-b-----s r2--b-s r3-b------------e
I want to manage my routes in a json file, which I know is supported, but I'd like to get the ones that I've already configured in Chrome as a starting point. Where are these stored?
Users shouldn't have to edit index.js just to add a new route.
NV/chrome-devtools-autosave#7
Hello
I really like your plug-in. The last half a year doing front end on it.
recently I decided to pass away from the window to the xubuntu .
installation error.
root @ kep-Lenovo-G570: / home / kep # sudo npm install -g autosave
npm http GET https://registry.npmjs.org/autosave
npm http 304 https://registry.npmjs.org/autosave
npm http GET https://registry.npmjs.org/commander
npm http 304 https://registry.npmjs.org/commander
/ usr / local / bin / autosave -> / usr / local / lib / node_modules / autosave / bin / autosave
[email protected] install / usr / local / lib / node_modules / autosave
Node ./scripts/install.js
sh: 1 : node: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! weird error 127
npm ERR! not ok code 0
please what can be a problem
It doesnt work.
I have server running up showing:
DevTools Autosave 1.0.0
and in settings I have match as ^file://[^/]*/
and path as /
If I edit any local file It doesnt get autosaved.
Since I am behind a proxy server, I followed your instructions to install from a folder, but it still throws an error when it tries to get commander 0.5.x. I tried to remove the dependency directly from the package.json and it insatlled, but when I execute C:\Documents and Settings\Andy>autosave, it shows this: Error: Cannot find module 'commander'.
How can I install commander the same way I installed autosave server?
Thanks,
Andy
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.