Dear developer collegues,
I am new to using build tools and am trying out Mimosa. Unfortunately I fail to understand some key concepts and hoped somebody could help me out.
I have a nodejs server and use angular/express on client. I successfully run "mimosa watch -s". Below is my mimosa.config (My assets older is called client, I'll rename it eventually).
Now the questions:
- My app does not seem to serve from the public folder. Do I have to tell node or mimosa specifically that it should do it? I still have "client" harcoded in my server.js. Maybe it is that?
app.set('view engine', 'jade');
app.set('views', __dirname + '/client/javascripts/core');
app.use(express.static(path.join(__dirname, 'client')));
- I tried replacing "client" with "public" but then my browser complains about not finding the index view.
- Where do I load the template.js which contains my compiled jade files
- Do I need to add requirejs to my project?
I hope I do not sound too confused, but I am a bit.
Best regards,
Christophe
-----------------------
Mimosa config
exports.config = {
"modules": [
"copy",
"jshint",
"csslint",
"server",
"require",
"minify-js",
"minify-css",
"live-...@1.1.4",
"bower",
"jade",
"server-reload",
"web-package"
],
"watch": {
"sourceDir":"client",
"exclude":[/[/\\](\.|~)[^/\\]+$/, /.ejs$/]
},
"logger":{
"growl": {
"enabled": false
}
},
"server": {
"views": {
"path":"client/javascripts/core"
},
"path":"server.js"
},
"liveReload": {
"enabled":false
},
"serverReload": {
"watch":["server.coffee", "server.js", "
server.ls", "server.iced", "routes", "src", "lib", "server", "config"],
"exclude":[],
"validate":true
},
"webPackage": {
"archiveName": "app",
"configName": "config",
"useEntireConfig": false,
"outPath": "dist",
"exclude": ["README.md", "node_modules", "mimosa-config.coffee", "mimosa-config.js", "assets", ".git", ".gitignore", "mimosa-config-documented.coffee", ".mimosa", "bower.json"],
"appjs": "app.js"
}
}