mark-hahn / server-script

Atom editor package to sync files and/or run a script on the server
MIT License
3 stars 1 forks source link

No such file or directory during copying folder "init-setup-folder" #1

Open Goster opened 8 years ago

Goster commented 8 years ago

OS: Deepin server-script: 0.1.2 Atom.io: 1.4.0

When I tried to generate .server-script folder in my project then I received error that that plugin could not find directory "init-setup-folder"

I had to modify following line in file server-script.coffe to get it run: from: "fs.copySync 'init-setup-folder', @serverScriptFolder" to: "fs.copySync './.atom/packages/server-script/init-setup-folder', @serverScriptFolder"

btw. Could you implement following functionalities ?:

  1. possibility to configure which files from an open project should be synchronized -> now plugin allways synchronize the whole project
  2. integration with "https://atom.io/packages/console-panel"
mark-hahn commented 8 years ago

Duh. I know what that is. I'll fix it this morning. Thanks.

On Fri, Mar 25, 2016 at 4:00 AM, Goster notifications@github.com wrote:

OS: Deepin server-script: 0.1.2 Atom.io: 1.4.0

When I tried to generate .server-script folder in my project then I received error that that plugin could not find directory "init-setup-folder"

I had to modify following line in file server-script.coffe to get it run: from: "fs.copySync 'init-setup-folder', @serverScriptFolder" to: "fs.copySync './.atom/packages/server-script/init-setup-folder', @serverScriptFolder"

btw. Could you implement following functionalities ?:

  1. possibility to configure which files from an open project should be synchronized -> now plugin allways synchronize the whole project
  2. integration with "https://atom.io/packages/console-panel"

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/mark-hahn/server-script/issues/1

mark-hahn commented 8 years ago

I was wrong about the "duh". I can't find what causes this. I installed it from scratch and it worked find.

Could you do me a favor and print out what process.cwd() and __dirname are before the statement you changed? Like this ...

  initSetupFolder: ->
    console.log process.cwd(), __dirname
    fs.copySync 'init-setup-folder', @serverScriptFolder
mark-hahn commented 8 years ago
  1. possibility to configure which files from an open project should be synchronized -> now plugin always synchronize the whole project

So .gitignore isn't good enough?`. I had no plans to do this but I'll put this as a feature request.

  1. integration with "https://atom.io/packages/console-panel"

Just to make the current console output prettier? In other words is this an aesthetic request?

Goster commented 8 years ago

Could you do me a favor and print out what process.cwd() and __dirname

Here it is: /home/xxx_xxx /home/xxx_xxx/.atom/packages/server-script/lib Uncaught Error: ENOENT: no such file or directory, scandir 'init-setup-folder'GET GET https://api.github.com/search/issues?q=Uncaught%20Error:%20ENOENT:%20no%20s…setup-folder%27%20repo:git@github.com/mark-hahn/server-script&sort=created 422 (Unprocessable Entity)

So .gitignore isn't good enough?`. I had no plans to do this but I'll put this as a feature request.

I have a project with shell scripts that are used to manage a few different environments. Some of the scripts are shared and used in each of the environment (e.g some general utility functions) but some scripts/configuration files are not and are linked to specific environments. gitignore file is not enough in this scenario because there is a big difference between what I want to commit to GIT (generally all changes in scripts no matter what environment they are linked to) and what files I want to transfer and to what servers ;-) Ideally I would love to see such functionality in Your plugin: Let's say we have following project structure: PROJECT_X ./config/ ./config/122.cfg ./config/123.cfg ./utils/ ./utils/compiling.sh ./utils/backup.sh ./backend/ ./backend/start.sh ./frontend/ ./frontend/start.sh

And let's imagine I have following setup.cson

servers:
  prod_1:
    location: '10.12.34.122'
    projectRoot: '/home/prod_1/.scripts'    
    files_whitelist: [ -> synchronize to this server only these files/folders
      './config/122.cfg'
      './utils' -> synchronize whole directory with all files inside
      './backend'
      './frontend'
    ]
  prod_2:
    location: '10.12.34.123'
    projectRoot: '/home/prod_2/.scripts'    
    files_blacklist: [
      './config/122.cfg' -> don't synchronize config files from environment 122
    ]
    files_whitelist: [
      './*' -> synchronize all files/folders in project except these from blacklist section
    ]
    server_options:
       syncChangedFiles: yes
       scriptOnRun:  'build.sh'
       scriptOnSave: ''
       scriptsOutToConsole: yes
general_options:
  syncChangedFiles: yes
  debugToDeveloperConsole: yes

Just to make the current console output prettier? In other words is this an aesthetic request?

Usually there are a lot more notifications in developer console. And therefore it would be nice to have a dedicated panel to see there only scriptOnRun and scriptOnSave output. And yes of course in some part it is an aesthetic request ;-) but I think usability would also be better because of that ;-)

mark-hahn commented 8 years ago

Thanks. I was able to repeat the bug. I'll fix it ASAP.

imagine I have following setup.cson

You aren't asking for much (grin). I made this a feature request but I doubt I'd be motivated to work on it soon since I have no need myself. If you work on it I'd be happy to help.

mark-hahn commented 8 years ago

Fixed in 0.1.3