2.0.0 • Published 2 years 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
2 years ago
2.0.0-14
3 years ago
2.0.0-13
3 years ago
2.0.0-12
3 years ago
2.0.0-11
3 years ago
2.0.0-10
3 years ago
2.0.0-6
3 years ago
2.0.0-5
3 years ago
2.0.0-4
3 years ago
2.0.0-3
3 years ago
2.0.0-2
3 years ago
2.0.0-1
3 years ago
2.0.0-0
3 years ago
2.0.0-9
3 years ago
2.0.0-8
3 years ago
2.0.0-7
3 years ago
1.9.0
4 years ago
1.8.0
4 years ago
1.7.1
4 years ago
1.7.1-0
4 years ago
1.7.0
4 years ago
1.6.1
4 years ago
1.6.0
4 years ago
1.5.3
4 years ago
1.5.2
4 years ago
1.5.1
4 years ago
1.5.0
4 years ago
1.5.0-0
5 years ago
1.4.0
5 years ago
1.3.3
5 years ago
1.3.2
5 years ago
1.3.1
5 years ago
1.3.0
5 years ago
1.2.0
5 years ago
1.2.0-0
5 years ago
1.1.0
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago