I manage a project written in angularjs with the default directory structure, except for the directory of the application using version control (for example, app / 0.0.0 / "," app / 0.1.0 / ", etc.) ..
I'm trying to use the grunt property package.json file "version" to load the correct one, so I donβt have to manually change the application path in the gruntfile.js file but for some reason I keep getting "Can not GET /" when I start the "server grunt ".
To better explain this, here is an example of my gruntfile.js:
var yeomanConfig = { app: 'app/<% pkg.version %>/', dist: 'dist' ... grunt.initConfig({ yeoman: yeomanConfig, pkg: grunt.file.readJSON('package.json'), ...
If I manually changed the application property to "application / 0.0.0", it works like a charm so I assume this has something to do with the templates.
Any ideas?
Thank you for help.
Edit: Thanks for fixing Andreas and Matthias, but this does not solve the problem and gives the same error ... This solves the problem for me, but without the template system:
var pkgVersion = grunt.file.readJSON('package.json').version; // configurable paths var yeomanConfig = { app: 'app/'+pkgVersion, dist: 'dist' };
This is pretty ugly, but it works. Hoping for the right decision.
onearmfrog
source share