
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
A static website development server. (Deprecated, moving to staticbuild.)
A basic front-end development server built with Express, less and nunjucks.
Install
npm install -g staticdev
Run
staticdev path/to/project
or
staticdev path/to/project/staticbuild.json
See test/default-config-site
for an example.
The project directory should contain a staticbuild.json
configuration file
or be organized according to the default configuration. A project directory
organized according to the default-staticbuild.json configuration looks like
this:
/path/to/project
- src/...
- staticbuild.data.json
- staticbuild.htm.js
- [staticbuild.json]
The src/
sub-directory is the root of the site which can contain static .html
,
.js
and .css
files as well as .less
and .htm
(nunjucks) files.
The default configured template engine and css preprocessor are the only supported options right now.
Here is a look at the default configuration (at the time of this writing):
{
"verbose": false,
"data": "staticbuild.data.json",
"host": null,
"port": 8080,
"source": "src",
"dest": "dist",
"favicon": "favicon.ico",
"template": {
"index": "index",
"engine": "nunjucks",
"extension": "htm",
"globals": "staticbuild.htm.js",
"locals": false,
"options": {
"autoescape": true
}
},
"css": {
"preprocessor": "less",
"map": {
"enabled": true,
"inline": false
}
},
"ignore": [
".gitignore",
"*.layout.htm",
"*.part.htm",
"*.map"
]
}
This section is incomplete.
data
, extensions
, filters
and functions
objects instead of setting
each of these options separately. The separate global options are merged into
this base object.true
, enables
loading of local template context data and functions from files that match
the following default pattern: "<filename>.+(js|json)"
. When a glob pattern
string is given, the directory containing a given template will be searched
using the pattern. Data and functions from all matched files are merged into
the render context. Note that the token <filename>
will be replaced with a
given template's file name including extension. Use the <filename_noext>
token instead in a custom pattern to target the file name without extension.staticdev: A static website development server.
Syntax:
staticdev [options | path]
Options:
--help -h Prints this help message.
--init-default Writes the default config file to the given path
--no-restart Disables the built-in nodemon server restart.
--restart-delay Number of seconds to delay nodemon restart when global
script and data files change.
--verbose -V Prints verbose messages.
--version -v Prints version information.
path Path to a staticbuild.json file or directory to find one.
If no path is supplied, the current directory is used.
FAQs
A static website development server. (Deprecated, moving to staticbuild.)
We found that staticdev 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 CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.