Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
create-static
Advanced tools
Create static html pages with ESNext, SCSS and Nunjucks.
npm i create-static --save-dev
Usage: create-static -s ./path/to/src -o ./path/to/dist
Options:
--source, -s path to source folder containing all promo folders
--output, -o path to dist folder with resulted builds
--help, -h print help
--version, -v print version
const createStatic = require('create-static');
const source = './path/to/src';
const output = './path/to/dist';
createStatic.run({ source, output })
.then(() => {
console.log('Success!');
})
.catch(err => {
console.log(err);
});
Every folder in source folder should have following structure:
index.html
- required, html powered by nunjucks template enginecontent.yml
- optional, data to render inside htmlindex.js
- optional, javascript powered by browserify and babelify (uses es2015
and stage-0
presets)indes.scss
- optional, css powered by node-sassassets
- optional folder to store all static files (it will be copied into build).
|____dist
|____src
| |____page-1
| | |____index.html # required
| | |____index.js
| | |____index.scss
| |____page-2
| | |____assets
| | | |____icon.png
| | | |____some-webfont.woff
| | |____index.html # required
| | |____index.scss
| |____page-3
| | |____content.yml
| | |____index.html # required
| | |____index.scss
# as many folders as you want...
create-static -s ./src -o ./dist
# will output all ready to use files in `dist` folder
MIT Licensed
FAQs
Create static HTML pages with ESNext, SCSS and Nunjucks.
The npm package create-static receives a total of 0 weekly downloads. As such, create-static popularity was classified as not popular.
We found that create-static demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.