Haven been playing with this for several hours
package.json
{
"name": "compile-tests",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"devDependencies": {
"grunt": "^0.4.5",
"assemble": "^0.7.3"
}
}
Gruntfile.js
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
assemble: {
options: {
flatten: true,
layout: "../templates/1.hbs"
},
pages: {
files: {
'../dist' : ['../pages/*.hbs']
}
}
}
});
grunt.loadNpmTasks('assemble');
grunt.registerTask('default', ['assemble']);
};
Tried removing and re-installing all the modules a few times. And also tried different versions, interestingly the versions mentioned in this article http://blog.parkji.co.uk/2013/07/06/building-a-static-site-using-grunt-and-assemble.html seem to work but then I get other issues because those versions are out of date.
Error
$ Grunt
>> Local Npm module "assemble" not found. Is it installed?
Warning: Task "assemble" not found. Used --force, continuing.
I just had to use grunt-assemble
$ npm install grunt-assemble --save-dev
And adjust this line in the Gruntfile.js
grunt.loadNpmTasks('grunt-assemble');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With