Coder Social home page Coder Social logo

file-driven-development's Introduction

file-driven-development

Utilities for a stateless, serverless development environment.

Operating System:

  • Mac OS currently.

Goals

  • Open resources in the browser.
    • Remove the need to manage development/build servers.
    • Refocus existing resources when they are already open.
  • Develop local web applications without needing to host a server, while still being able to make XMLHTTPRequests to your local file system. Normally Chrome will block this ability by default because they believe it poses a security risk to have it enabled by default.
    • file-driven-development has a script localOpen.sh which opens up a dedicated Chrome instance with this restriction disabled, and therefore allows you to load local .html files, which can make requests back to the file system. This is intentionally a dedicated Chrome instance - for local, file system driven development, apart from your other normal Chrome browsing instance, because you don't want to disable this XMLHTTPRequest for general browsing.
Usage:
npm install --save-dev git://github.com/jordwalke/file-driven-development.git
osascript path/to/openLocal.osa reuseSearchPattern openFileUrl useCanary
  • path/to/openLocal.osa Path to where openLocal.osa was installed (typically in node_modules).
  • reuseSearchPattern is the pattern used to search for existing tabs in the dedicated Chrome instance in order to reuse them.
  • openFileUrl is the file url that you wish to open if it cannot reuse the existing tab (discovered by reuseSearchPattern).
  • useCanary whether or not to use Chrome Canary.

Typicaly, you would run a command like:

osascript ./node_modules/file-driven-development/scripts/openLocal.osa /myPath/foo.html file:///myPath/foo.html

The search string is intentionally not the same as the file path that is opened, because you may want to be a little more loose with the matching to an existing tab.

Caution:

Be aware of the implications of browsing the internet with the relaxed XMLHTTPRequest for local file system access. Only use the dedicated Chrome instance that opens for local file system development, and don't later use that running Chrome instance to browse the general internet. You are responsible for safe browsing, so make sure you understand what the scripts in file-driven-development are doing.

Credit:

Original Script inspired by Rob Mayoff's https://gist.github.com/mayoff/1138816, but it may likely diverge significantly over time.

file-driven-development's People

Contributors

jordwalke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.