grunt-contrib-connect | Start a static web server | Static Site Generator library
kandi X-RAY | grunt-contrib-connect Summary
kandi X-RAY | grunt-contrib-connect Summary
Start a static web server.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of grunt-contrib-connect
grunt-contrib-connect Key Features
grunt-contrib-connect Examples and Code Snippets
Community Discussions
Trending Discussions on grunt-contrib-connect
QUESTION
I'm setting grunt-contrib-watch
, and grunt-contrib-connect
to live reload, like this:
ANSWER
Answered 2018-Jul-31 at 21:08A couple requirements:
Make sure you're not already starting up localhost 8000 somewhere else. If you have two local servers running on the same port it won't work. (Check your other tabs in terminal)
Make sure the following is in your html(at the bottom with the other js)
QUESTION
I need help please, I can't use dependency between tasks in angular-gantt. I found this error:
TypeError: Cannot read property 'jsPlumb' of undefined at new DependenciesManager (http://localhost:8080/....
HTML file code:
...ANSWER
Answered 2019-Aug-14 at 14:34The library is not loaded. Try just to put on top of the loaded
node_modules
scripts
QUESTION
npm now installs a package-lock.json every time which seems to be a part of npm now. However, this simple package.json file when run with npm install installs over 300 packages. what could be going wrong and why are there 300+? even without the package-lock file when run (it then creates the lock file) and still gives 300+ packages
...ANSWER
Answered 2018-Jun-07 at 09:13Those packages depend on other packages, which depend on other packages, which depend on yet other packages…. A package manager resolves that entire dependency graph, which can easily grow into the hundreds from an innocent-looking initial list.
The package-lock.json
file you mention can help you understand how this happens for your particular dependencies. Look for "requires"
. For example, in your setup, grunt-sass
requires node-sass
:
QUESTION
I'm not a pro with grunt but i have an angular js template that i want to use for my application i'm trying to make the browser open automaticaly when grunt is launched and reload page when html, js and css files are modified i added watch and livereload but it wont work is there something wrong in my code
Here is my gruntfile.js
...ANSWER
Answered 2017-Nov-09 at 10:54i found a solution for my problem to open automatically the browser i added the parameter livereload to connect object in my Gruntfile configuration
QUESTION
I am getting this error when I run grunt browserify
ReferenceError: [BABEL] src/app.js: Using removed Babel 5 option: base.stage - Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets while parsing file: src/app.js
This is my gruntfile
...ANSWER
Answered 2017-Nov-05 at 00:42The error means that the grunt definition for babelify is obsolete and invalid.
It does not accept an option named stage
anymore.
I would try
QUESTION
I have this repo angularseed at this commit: a9ad4568bd8534b888ae5cb3bf1a7f92f66d633d (just learning tools and libs). Maybe somebody can help me.
The problem that I have it's when I try to optimize my code with Optimizer from requirejs. Im using grunt-contrib-requirejs.
To see the problem, you must to clone the repo.
Nodejs it's mandatory.
...ANSWER
Answered 2017-May-09 at 16:01Angular fails because it calls .toString()
on your functions to figure out what parameters it needs to inject. This of course immediately breaks when you minify your script. For example, instead of this:
QUESTION
I'm currently using browser-refresh
to restart my node server every time I make a change to my server file. I want to take this further and have my browser refresh/reload every time I make a change to an HTML file. I'm using handlebars for the client, so I have .hbs
files in my views
directory. I thought browser-refresh
was supposed to be able to refresh the browser as well, but it's not working for me.
For grunt
, I have the following tasks installed:
ANSWER
Answered 2017-Mar-27 at 18:10Using the grunt-contrib-watch and setting the Live reload option to true, will enable live reloads and grunt auto rebuild.
For example, in your gruntfile.js:
QUESTION
I am trying to watch sass changes but I am not be able to see any changes on main.css whenever I update on sass files.Can some please suggest me what I am doing wrong here I am new to grunt js .
...ANSWER
Answered 2017-Mar-22 at 10:58Grunt watch
is a blocking task so grunt connect
is never reached.
grunt-contrib-connect
blocks only if keepalive: true
is set otherwise it runs as long as grunt is running. As grunt watch
runs indefinitely you do not need to force grunt-contrib-connect
to "keepalive
"
To fix.
QUESTION
I'm have problem with my Gruntfile config but I don't know how resolve this. When my path has single route ex: localhost:9000/contractor reload work fine, but when reload localhost:9000/add/something I get error 404 beacuse browser search files in 'add' directory not in main directory example: GET localhost:9000/add/bower_components/bootstrap/dist/css/bootstrap.css Directory 'add' not exist. I'm using Angular 1.6.0 and angular-route 1.6.0
Gruntfile.js
...ANSWER
Answered 2017-Mar-21 at 07:48Problem was be on angular-route 1.6.0 . I'm add
QUESTION
I've seen problems stem from confusing grunt-connect
and grunt-contrib-connect
(See grunt connect port option ignored and grunt watch & connect)
Given their similarity and conflicting natures, could someone describe their syntactical differences, as well as any functional differences?
...ANSWER
Answered 2017-Mar-09 at 15:46- For when you want to run a server indefinitely, for example on a web server (note: this is not what grunt is intended for, instead use grunt to process files, then something like nodejs or apache HTTP server, to host the processed files).
- When you want to start a web server for other grunt tasks to use.
- This is similar to
grunt-connect
and is what I use in my projects.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install grunt-contrib-connect
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page