Skip to content

calamity-inc/dynstat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dynstat

Develop dynamically, deploy statically.

Deploy to GitHub Pages

  1. Add the dynstat.yml to your .github/workflows folder.
  2. Set GitHub Pages "Source" to "Deploy from a branch", select the "gh-pages" branch, and click "Save."
  3. That's it!

Config

You can configure dynstat by creating a .dynstat.json file.

Per-build

  • dirs (default: ["."])
  • minify (default: false)
  • skip_empty (default: false) — don't write empty files to build directory?
  • nojekyll (default: true) — create .nojekyll file in build directory?

Global

  • php_ext (default: [".php"])
  • builds (default: {"build":{}})

Builds

Dynstat can create multiple builds, each with their own config. For example, this creates the regular "build" plus a minified version:

{
    "minify": false,
    "builds": {
        "build": {},
        "minified": {
            "minify": true
        }
    }
}

Runtime

You can detect that your script is being executed by dynstat to produce a static build by using !empty($_DYNSTAT).

$_DYNSTAT is an array, which provides the following keys:

  • BUILD_NAME (string)

Credits

The minify option is powered by Mecha CMS' Minify Engine.

About

Develop dynamically, deploy statically.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages