0.2.1 • Published 11 years ago

frontfax v0.2.1

Weekly downloads
107
License
-
Repository
-
Last release
11 years ago

Frontfax

Sets up a development environment for frontend developers that can't access the source code. Recently, at the last couple of places that I've been working, it's been somewhat impossible to access the source code of the working project, and therefore, I've been downloading the source via the web, working on it and then posting it back to backend developers to insert in to the project. This is somewhat annoying, so I've developed Frontfax.

Installation

  1. Install node and npm
  2. Install Frontfax [sudo] npm i -g frontfax (TODO: It hasn't been released to NPM yet.
  3. Create a project frontfax project:new myproject
  4. Install the dependencies cd myproject && npm i
  5. Start the server npm start
  6. Then view the server

Your Workspace

- myproject
	- assets
		- css
		- images
		- js
		- less
	- static

This is the process in which frontfax handles each HTTP request:

  1. Receives a request (for example /images/logo.png).
  2. Tries to find it in your workspace (assets/images/logo.png). If found the file is returned and the process stops here.
  3. Proxies the request to the configured proxy server and returns the result.

URL Configuration

The images, js, css URLs are can configured, but these files will always be accessed from you assets directory.

The static directory is the last place the server looks before proxying the request. This is good for HTML files. You do not need to configure the URL for this as it will consider the root to be accessible from the static directory.

To change the URLs open the config/default.json file and edit the assets.image|css|js urls.

LESS

While you're working on any less files they will automatically be converted in to css and placed in the css directory.

The advantages are of writing you CSS as LESS are:

  • Pre-processing functionality
  • Syntax is the same as CSS, so even if you don't want to use LESS's functionality you can just write plain CSS.
  • You can compile a selection of files in to one.

When writing your less files, it is recommended to have one "main" file that includes all the requirements. This means that only one file needs to be uploaded to the production server after development.

Here's an example. Try to split your work in to many easy to read files.

/* assets/header.less */

.header {
	.nav {
		/* nav styles */
	}

	.logo {
		/* logo styles */
	}
}
/* assets/article.less */

.article {
	.picture {
		/* picture styles */
	}

	.teaser {
		/* teaser styles */
	}
}
/* assets/main.less */

@import 'header';
@import 'article';

Now you can point to one CSS file (/my/configured/css/path/main.css) and have all your CSS returned:

/* build/main.css */

.header .nav {
	/* nav styles */
}
.header .logo {
	/* logo styles */
}
.article .picture {
	/* picture styles */
}
.article .teaser {
	/* teaser styles */
}

JS Combine

While you're working on any js files they will automatically be combined into assets/js/main.js.

Bugs

Report all bugs in the Bitucket issue list.

0.2.1

11 years ago

0.2.0

11 years ago

0.1.0

11 years ago

0.0.34

11 years ago

0.0.33

11 years ago

0.0.32

11 years ago

0.0.31

11 years ago

0.0.30

11 years ago

0.0.29

11 years ago

0.0.28

11 years ago

0.0.27

11 years ago

0.0.26

11 years ago

0.0.25

11 years ago

0.0.24

11 years ago

0.0.23

11 years ago

0.0.22

11 years ago

0.0.21

11 years ago

0.0.20

11 years ago

0.0.19

11 years ago

0.0.18

11 years ago

0.0.17

11 years ago

0.0.16

11 years ago

0.0.15

11 years ago

0.0.14

11 years ago

0.0.13

11 years ago

0.0.12

11 years ago

0.0.11

11 years ago

0.0.10

11 years ago

0.0.9

11 years ago

0.0.8

11 years ago

0.0.7

11 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago