2.0.0 • Published 1 year ago
spank v2.0.0
Export HTML pages from your SPA
Usage
//spank.config.js
module.exports = {
sitemap: 'path/to/a-list-of-urls.json',
entrypoint: 'dist/__index.html',
script: 'dist/main.js',
outputDir: 'dist'
}
open terminal and type
npx spank
Note
spank can also be used without a config. Use npx spank --help
for parameters.
Config options
prop | default | description |
---|---|---|
sitemap | .js or .json file with a list of relative paths. Eg. ['/', '/about', '/contact'] | |
entrypoint | dist/__app.html | path to the HTML template to render the SPA in. Often static/index.html |
script | dist/build/bundle.js | Path to the app script. Often dist/build/bundle.js or dist/build/main.js |
outputDir | dist | Folder to save HTML files to. |
forceIndex | false | Write /about to about/index.html instead of about.html |
inlineDynamicImports | false | Required if app uses dynamic imports |
concurrently | 3 | Max simultaneous running jobs |
eventName | If specified, HTMLs aren't saved till the page has emitted the event. | |
host | http://jsdom.ssr | Simulated host |
How does it work?
For each path in the sitemap, Spank creates a corresponding SPA in a simulated browser. The HTML for each page is then saved to the output folder.
2.0.0
1 year ago
2.0.0-14
1 year ago
2.0.0-13
1 year ago
2.0.0-12
1 year ago
2.0.0-11
2 years ago
2.0.0-10
2 years ago
2.0.0-6
2 years ago
2.0.0-5
2 years ago
2.0.0-4
2 years ago
2.0.0-3
2 years ago
2.0.0-2
2 years ago
2.0.0-1
2 years ago
2.0.0-0
2 years ago
2.0.0-9
2 years ago
2.0.0-8
2 years ago
2.0.0-7
2 years ago
1.9.0
2 years ago
1.8.0
3 years ago
1.7.1
3 years ago
1.7.1-0
3 years ago
1.7.0
3 years ago
1.6.1
3 years ago
1.6.0
3 years ago
1.5.3
3 years ago
1.5.2
3 years ago
1.5.1
3 years ago
1.5.0
3 years ago
1.5.0-0
3 years ago
1.4.0
4 years ago
1.3.3
4 years ago
1.3.2
4 years ago
1.3.1
4 years ago
1.3.0
4 years ago
1.2.0
4 years ago
1.2.0-0
4 years ago
1.1.0
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago