<commit_before># Front End Tasks

Command line tool for client side web application development. Great for develoeprs who prefer to write plain html, css, and javascript that works without any special pre-processing. This tool helps optimize, lint, and test that code.

# Installation

```bash
$ gem install front_end_tasks
```

# Usage

The `fe` command will be available after installing Front End Tasks.

## build

Compiles the given html file by combining and minifying javascript and stylesheet tags according to speical html comments (see HTML Comments section).

```bash
$ fe build path/to/public_dir path/to/public_dir/index.html
```

## server

Run a development server on localhost.

```bash
$ fe server --public_dir app/
```

## lint

Run the given files through JSLint.

```bash
$ fe lint app/js/file_to_lint.js app/js/another_file.js
```

## spec

Run Jasmine specs

```bash
$ fe spec --source_files app/js/post.js --spec_files spec/PostSpec.js
```

## list_scripts

List the javascript files that are included in the html (script tags) or js (importScripts) file

```bash
$ fe list_scripts index.html
```

# HTML Comments

## build:script<commit_msg>Show programmatic interface<commit_after># Front End Tasks

Command line tool for client side web application development. Great for develoeprs who prefer to write plain html, css, and javascript that works without any special pre-processing. This tool helps optimize, lint, and test that code.

# Installation

```bash
$ gem install front_end_tasks
```

The `fe` command will be available after installing Front End Tasks.

# Usage

Front End Tasks can be used from the command line or scripted with Ruby.

## build

Compiles the given html file by combining and minifying javascript and stylesheet tags according to speical html comments (see HTML Comments section).

```bash
$ fe build path/to/public_dir path/to/public_dir/index.html
```

```ruby
FrontEndTasks.build('path/to/public_dir', './build', 'path/to/public_dir/index.html')
```

## server

Run a development server on localhost.

```bash
$ fe server --public_dir app/
```

```ruby
FrontEndTasks.server(:public_dir => './app')
```

## lint

Run the given files through JSLint.

```bash
$ fe lint app/js/file_to_lint.js app/js/another_file.js
```

```ruby
FrontEndTasks.lint('./app/js/file_to_lint.js', './app/js/another_file.js')
```

## spec

Run Jasmine specs

```bash
$ fe spec --source_files app/js/post.js --spec_files spec/PostSpec.js
```

```ruby
FrontEndTasks.spec({
  :source_files => ['app/js/post.js'],
  :spec_files   => ['spec/PostSpec.js']
})
```

## list_scripts

List the javascript files that are included in the html (script tags) or js (importScripts) file

```bash
$ fe list_scripts ./app/index.html
```

```ruby
FrontEndTasks.list_scripts('./app/index.html')
```

# HTML Comments

## build:script
{'fraction_non_alphanumeric': 0.11572282799859304, 'fraction_numerical': 0.0, 'mean_word_length': 4.345864661654136, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5148887', 'n_tokens_mistral': 947, 'n_tokens_neox': 868, 'n_words': 321}