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.
generator-twigup
Advanced tools
Yeoman generator for creating html markup using Twig template engine.
TwigUp is Yeoman generator for creating Html markup using Twig template engine (twig.js implementation).
Make sure you have Yeoman installed:
npm install -g yo
To install generator-twigup from npm, run:
npm install -g generator-twigup
Initiate generator with:
yo twigup
public // static resources
|- images
|- scripts
|- styles
|- vendor
views // contains twig views templates
|- _layouts // layouts templates for pages
|- _partials // templates for partials
|- Index
|- index.html.twig // index page
|- Second
|- index.html.twig // /second page
|- inner.html.twig // /second/inner page
Generator will install jQuery, Require.js and normalize.css.
Generated project has 2 useful tasks aliases: server
and build
server
alias launches express server on port 3000
(you can change port number in Gruntfile.js).
It compiles requested twig template and responses with pure html.
Rule for urls is simple: for example url http://localhost:3001/second
compiles ./views/Second/index.html.twig
, http://localhost:3001/second/inner
compiles ./views/Second/inner.html.twig
and so on.
build
alias creates build
folder, which contains html
folder with static resources and compiled html files, root
folder with files, that should be placed in root folder of production server (for now its package.json, bower.json and .bowerrc files), and views
folder with all twig templates (useful for projects uses Twig template, for example Symfony framework projects).
data.json
file contains data for templates for both tasks.
MIT
0.3.0
Moved to twig-renderer
plugin for html rendering
Removed prettify
plugin
Added browser-sync
task, grunt server
task now runs with browser-sync
Moved jquery
to version 2
Twig updated to 0.8.8
FAQs
Yeoman generator for creating html markup using Twig template engine.
We found that generator-twigup 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.