Giter Club home page Giter Club logo

fsdeploy's Introduction

README

File System Deploy. Auto-deploys a file after saving.

Features

Define a source and target folder structure to automatically copy a file, which was saved inside the source target structure.

For example if there is a file in your workspace under /usr/code/project/test.js and you have a source defined as /usr/code/project and a target defined as /var/www/html/foo the file test.js will get copied to/var/www/html/foo/test as soon as you hit save or execute the command fsdeploy: Deploy File.

Extension Settings

This extension contributes the following settings

  • fsdeploy.nodes: array of objects containing a source/target set.
  • fsdeploy.deployOnSave: boolean flag indicating if a file should get immeadiately deployed when saving. (Defaults to true.)

example:

  {
      "fsdeploy.nodes": [
          {
              "source":"/usr/code/project/",
              "target":"/var/www/html/foo",
              "include":"**/*.*",
              "exclude":"**/min/*.*"
          }
      ],
      "fsdeploy.deployOnSave": true
  }
  • You can have multiple targets for the same source. Just add multiple nodes then with different targetts which copy from the same source.

  • Adding include/exclude rules in the form of glob patterns

          The pattern to match. e.g. **/*.js to match all JavaScript files 
          or myFolder/** to match that folder with all children.
    
          Reference:
          * matches 0 or more characters
          ? matches 1 character
          ** matches zero or more directories
          [a-z] matches a range of characters
          {a,b} matches any of the patterns
    

example using extended glob:

Let's say you have following source structure

- opt
  - usr
    - projects
      - foo
        - templates
          - main.html
        - js
          - main.js
          - tests
            - test.main.js
        - src
          - main.ts
        - build
          - combine.sh
        index.html

and want it to end up in following target structre

- var
  - www
    - bar
      - templates
        - main.html
      - js
        - main.js
      index.html

You would need to create a glob excluding src, build and /tests/:

{
"fsdeploy.nodes": [
    {
        "source":"/opt/usr/projects/foo",
        "target":"/var/www/bar",
        "exclude":"**/tests/**",
        "include": "{templates,js}/**/*.*"
    }
}

Known Issues

none

Changelog

0.1.3

  • Adding configuration to package.json
  • Don't remove leading/trailing slashes in pathes when building the effective subpaath

0.1.2

  • Fixing path issues on non windows environments

0.1.1

  • Adding configuration to stop auto-deploy on save

0.1.0

  • Fixing NPE when accessing the status bar
  • Fixing multiple issues to bring the extension to a more final stage
  • Fixing dependencies

0.0.6

  • Fixing issues in workspace deployment

0.0.5

  • Minor fixes

0.0.4

  • Minor fixes

0.0.3

  • Added status bar icon whihc indicates if the current workspace has a deployment mapping
  • Added status bar functions popping up after a click
  • Some code streamlining
  • Remove some annoying popup message

0.0.2

  • Added "Deploy Workspace" command to deploy the entire workspace
  • Added include/exclude config
    • Only applies to "Deploy Workspace"

0.0.1

  • Initial release

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.