Closed aalokt89 closed 4 years ago
If you want to use panini via cli you have to install it globally, start it via npm script or via npx.
You can install panini globally via npm install -g panini
, then you can simply use panini
in the cli.
Via an npm script it works as follows. You have to add a command panini
in the scripts
section of package.json.
{
"scripts": {
"panini": "panini"
},
"devDependencies": {
"panini": "^1.3.0"
}
}
Then you can use it the following way: npm run panini -- --root=src/pages --layouts=src/layouts --partials=src/partials --data=src/data --output=dist
And from npm version 5.2 you can simply run npx panini --root=src/pages --layouts=src/layouts --partials=src/partials --data=src/data --output=dist
.
This should fix your Command not found
error.
Without seeing the whole project it is difficult to find the mistake with gulp.
Closing as stale.
I love the power of panini, but I want to use it without the Zurb stack. I'm trying to set up my project but the documentation is very thin and not detailed for beginners (I'm admittedly a beginner with gulp). Is there a detailed guide or simple example project example anywhere?
Steps I've taken so far:
npm init
npm install panini --save-dev
npm install gulp --save-dev
gulp.task('default', function() { gulp.src('pages/*/.html') .pipe(panini({ root: 'pages/', layouts: 'layouts/', partials: 'partials/', helpers: 'helpers/', data: 'data/' })) .pipe(gulp.dest('build')); });
gulp.watch(['./src/{layouts,partials,helpers,data}/*/'], [panini.refresh]);