Yeoman angular-generator grunt serve:dist giving error - gruntjs

My gruntfile.js has been created by Yeoman angular-generator. When I run this in development site using grunt serve, it works fine, but using grunt serve:dist it does not work. The site is opened but views link do not work only Home link works, I think it is because other view templates are not reachable.
Gives following error after running grunt serve:dist
Running "ngtemplates:dist" (ngtemplates) task
File .tmp/templateCache.js created.
Usemin has not created uglify.generated yet!
My Gruntfile.js is below:
https://github.com/charutiwari04/dashboard/blob/master/Gruntfile.js
Can anybody help me on this?

Related

NextJS/Link component href error in production

Let's say I've this folder structure:
pages/index.js
pages/contact/index.js
with pages/index.js having this link:
<Link href='/contact'>Contact me</a>
If I run the production build locally:
yarn build
yarn start
(yarn build comand: next build && next export, cause I want to self-host it as a static html website)
Link works fine. But if I move that on my production machine, and I click the Link, I get a 404 error, which I can manually work around adding '.html' at the end of the url in the address bar:
/contact -> /contact.html
which is pretty obvious due to the build structure, that flats all the pages/folder in root renaming the index.js file with its floder name. Nonetheless, it works fine on my machine.
If I change the href to /contact.html, it works fine in production, but get broken locally.
So I believe there is some mismatch between my local server and the production one. What can I do to have the same build working on both machine?

Grunt is not able to detect the file

I am developing a new moodle plugin. But when I run grunt in my plugin folder
grunt amd.
directory structure
local->webcam->amd
amd has two folder build and src and my file is in src folder
I am getting following error
PS C:\xampp\htdocs\moodle\local\webcam> grunt amd
Running "ignorefiles" task
Running "eslint:amd" (eslint) task
Could not find any files to validate
I have no idea why it is not detecting my file.
My node version is correct and everything but grunt is not detecting my file

How to use Laravel 5 with Gulp, Elixir and Bower?

I am completely new to all this, 'Bower' and 'Gulp' and Laravel 'Elixir'. I purchased a template that uses them (unfortunately) and now I need some help on how to go about implementing them. I have already installed NPM and Bower. All my packages have been downloaded into:
resources > assets > vendor
This is a screenshot:
Now my question is how do I include all those packages I downloaded in my view? From my understanding I can't run less files directly in the browser, it only runs once due to 'browser caching' or something like that, also the JS scripts are just too many to include in my page.
I want a way where I can work on my files and have them automatically compiled with the compiled files being referenced in my app.php file.
This is a link to the GulpJS file included in my template: http://pastebin.com/3PSN6NZY
You do not need to compile every time someone visits. The compiled sass/js should be run in dev and then the output files referenced.
If you have gulp installed on the project, you should see a gulp.js file in the root of your project. If not, visit here for instructions:
Gulp/Elixer installation and setup
In your gulp.js file:
var elixir = require('laravel-elixir');
elixir(function(mix) {
mix.less([
'app.less',
'normalize.less',
'some-other-less.less',
'and-another.less'
]);
mix.scripts(['app.js', 'some-other-js.js'], 'public/js/output-file.js');
});
While in development you can run gulp watch from the command line to listen for changes and run compile tasks when it hears a change. Then you simply reference the output files in the public directory as you normally would.
If you don't want to listen, you can just run the gulp command for a single once-off task run.
The docs are pretty straight forward and can be found here:
Gulp/Elixer docs

Setting Up Multiple Grunt files

I want to run grunt on several projects simultaneously. However i'm not sure how to setup so it works. Here's what my setup looks like:
- Project 1 folder
-[project files]
-Gruntfile
- Project 2 folder
-[project files]
-Gruntfile
- Grunt Folder
-[nodeModules]
-package.json
So the idea is that have all grunt dependencies (node modules) in a single centralised folder. Then each project folder has its own Gruntfile.
The problem I have is that I don't know how to setup the gruntFile so that it can use the node modules and package.json from the grunt dependancy folder.
Can anyone help me with how I can get this to work? Specifically with code examples.

Error while executing grunt command

While trying to execute grunt command.
I have used yeoman, bower, generator-angular and grunt with nodejs in windows 7.
Everything worked fine. And I have added font-awesome with bower-install, and to update my html I executed grunt wiredep.
it throws the following error.
Also my bower components are outside app folder, But in index file it started with bower_compontents/jquery/dist/jquery.js instead ../bower_components/jquery/dist/jquery.js.
The problem is with the node modules.
I just deleted it and executed npm install again. All worked well :-)
Change bower_components path
in .bowerrc file, I have changed the directory path. :-)

Resources