App-Dapper

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

```

Result:

```
Quick. Brown. Fox.
```

#### [%~ Chomp Greedy ~%]

Remove all adjacent whitespace.

```
Quick.

[%~ "Brown." ~%]

Fox.
```

Result:

```
Quick.Brown.Fox.
```

## Dumping

The `dump` directive inserts a Data::Dumper printout of the variable or 
expression. If no argument is passed it will dump the entire contents of the 
current variable stash (with private keys removed). The output also includes the 
current file and line number that the DUMP directive was called from. Example:

    [% dump %]      # dump everything
    [% dump site %] # dump everything in the site
    [% dump page %] # dump everything in the current page

# Deployment

To deploy your content, you have a number of options. This section outlines
a few of them.

## Amazon S3

It's possible to serve a static website using Amazon S3. Here's how.

1. In the AWS Console, create a bucket named after your domain (e.g.
   `mydomain.com`). Under 'Properties', enable 'Static website hosting' and
   set the 'Index document' to `index.html`.

2. New buckets block public access by default. To serve a website directly
   from the bucket, turn off 'Block public access' for it and add a bucket
   policy that allows `s3:GetObject` for everyone. Alternatively, keep the
   bucket private and put Amazon CloudFront in front of it, which also gives
   you HTTPS.

3. Optionally, create a second bucket named `www.mydomain.com` and set its
   static website hosting to 'Redirect requests' to `mydomain.com`.

4. Install and configure the [AWS CLI](https://aws.amazon.com/cli/) with
   your credentials:

       $ aws configure

5. Now any time you want to rebuild your content and push it to S3, it's a
   simple call to:

       $ dapper build
       $ aws s3 sync _output/ s3://mydomain.com --delete

    The `--delete` option removes files from the bucket that are no longer
    in `_output`. Note that Dapper does not remove files from `_output`
    when you delete a source file, so delete the `_output` directory before
    building if you want the bucket to match your source exactly. If you
    upload files to the bucket independently of Dapper, leave `--delete`
    off.

If you use Amazon Route 53 for DNS, create an alias A record for
`mydomain.com` (and `www.mydomain.com`) that points at the bucket's website
endpoint, or at your CloudFront distribution.

To make it easy to publish to Amazon S3, one option is to create a Makefile
that encodes the publishing instructions. For example:

    S3_BUCKET=mydomain.com

    build:
    	dapper build

    clean:
    	rm -rf _output

    serve:
    	dapper serve

    publish: clean build
    	aws s3 sync _output/ s3://$(S3_BUCKET) --delete

    watch:
    	dapper watch

    .PHONY: build clean serve publish watch

## GitHub Pages

GitHub Pages is a free service that allows you to publish a static website for
free. By pushing your changes to a git repository, your website will be
automatically available on github.io. Here are the steps:

1. First, if you don’t have an account already, you should sign up for a [GitHub
   account](https://github.com/).

2. Next, create a new repository named `<username>.github.io` where you should 
   replace `<username>` with your actual Github username.

3. After that, push the contents of your `_output` directory to the new github
   repo. Steps:

       $ cd _output
       $ touch .nojekyll
       $ git init -b main



( run in 0.539 second using v1.01-cache-2.11-cpan-3f962061493 )