Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Added Gulp Setup and Troubleshooting to docs/0.4.x
Browse files Browse the repository at this point in the history
Removed Obvious Node Install Warning

Removed Gulp Build from cloud-foundry.html to be added in 0.5

Added and Cleaned Up Gulp Setup and Troubleshooting to docs/0.4.x
  • Loading branch information
dprea committed Oct 31, 2015
1 parent 5fc52ae commit 61e3bed
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 3 deletions.
13 changes: 12 additions & 1 deletion _includes/docs/0.4.x/gettingstarted.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ <h2>Prerequisites</h2>
You're going to use the <a target="_blank" href="http://gruntjs.com/">Grunt Task Runner</a> to automate your development process, in order to install it make sure you've installed Node.js and npm, then install grunt globally using npm:
<pre>$ npm install -g grunt-cli</pre>
</dd>
<dt>Gulp (Optional)</dt>
<dd>
You may use the <a target="_blank" href="http://gulpjs.com/">Gulp Task Runner</a> instead of Grunt. You may use Gulp for Live Reload, Linting, and SASS or LESS compilation.
<pre>$ npm install -g gulp</pre>
</dd>
</dl>
<p class="alert alert-info">
<b>Note:</b> Your user might not have the permissions to install package globally, so use a super user or <b>sudo</b>.
Expand Down Expand Up @@ -81,12 +86,18 @@ <h2>Quick Install</h2>
<code>bower install</code>command to install all the front-end modules needed for the application.</li>
</ul>
</p>
<h2>Running Your Application</h2>
<h2>Running Your Application with Grunt</h2>
<p>
After the install process is over, you'll be able to run your application using Grunt, just run grunt default task:
<pre>$ grunt</pre>
Your application should run on the 3000 port so in your browser just go to <a target="_blank" href="http://localhost:3000">http://localhost:3000</a>.
</p>
<h2>Running Your Application with Gulp (Optional)</h2>
<p>
After the install process is over, you'll be able to run your application using Gulp, just run gulp default task:
<pre>$ gulp</pre>
Your application should run on the 3000 port so in your browser just go to <a target="_blank" href="http://localhost:3000">http://localhost:3000</a>.
</p>
<p>
That's it! your application should be running by now, to proceed with your development check the other sections in this documentation.
<br>If you encounter any problem try the <a href="#troubleshooting">Troubleshooting</a> section.
Expand Down
34 changes: 32 additions & 2 deletions _includes/docs/0.4.x/troubleshooting.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2>Check Node.js and npm Versions</h2>
npm version 1.3.x is supported.
</dd>
</dl>
<h2>Update npm, Bower or Grunt</h2>
<h2>Update npm, Bower, Grunt, or Gulp</h2>
<p>
You may find there is a weird error during install like npm's Error: ENOENT, usually updating those tools to the latest version solves the issue.
</p>
Expand All @@ -50,6 +50,11 @@ <h2>Update npm, Bower or Grunt</h2>
To update grunt just run this command in the command-line:
<pre>$ npm update -g grunt-cli</pre>
</dd>
<dt>Updating Gulp</dt>
<dd>
To update gulp just run this command in the command-line:
<pre>$ npm update -g gulp</pre>
</dd>
</dl>
<h2>Cleaning npm and Bower cache</h2>
<p>
Expand All @@ -72,7 +77,7 @@ <h2>Common Issues</h2>
There are some common errors while installing mean:
</p>
<dl>
<dt>Node is running but AgnularJS application won't load</dt>
<dt>Node is running but AngularJS application won't load</dt>
<dd>
Check to see all your front-end packages were installed.
<a target="_blank" href="https://bower.io/">Bower</a> package manager is used to install the front-end package and it will need a <a target="_blank" href="http://bower.io/#configuration">.bowerrc</a> file to install the packages in the right location.
Expand All @@ -88,4 +93,29 @@ <h2>Common Issues</h2>
<p class="alert alert-warning">
Sometimes it can be a local issue or something that we didn't cover, in case you have any further questions please contact us via the community page.
</p>
<h2>Common node-sass, grunt-sass, gulp-sass Issue</h2>
<p>
Another common error for applications using SASS revolves around node-sass and grunt-sass or gulp-sass depending on your choice. The error may occur during npm install or when starting the server.
</p>
<dl>
<dt>Error during install about node-sass, grunt-sass, or gulp-sass</dt>
<dd>
First uninstall the project and global gulp-sass and grunt-sass modules.
<pre>$ npm uninstall grunt-sass
$ npm uninstall gulp-sass
$ npm uninstall -g grunt-sass
$ npm uninstall -g gulp-sass</pre>
Next uninstall the global node-sass module.
<pre>$ npm uninstall -g node-sass</pre>
Install the global node-sass first. Then install the grunt-sass and/or gulp-sass modules.
<pre>$ npm install grunt-sass
$ npm install gulp-sass</pre>
Now try the npm install again from the project folder.
<pre>$ npm install</pre>
If your npm install still fails at this point. Repeat the above steps but use npm rebuild -g after the global node-sass install, but before installing the project grunt/gulp sass modules.
<pre>$ npm rebuild -g</pre>
As suggested above, you can also try npm update.
<pre>$ npm update -g</pre>
</dd>
</dl>
</section>

0 comments on commit 61e3bed

Please sign in to comment.