Git Product home page Git Product logo

pluralsight-gulp's Introduction

pluralsight-gulp

You've built your JavaScript application but how do you automate testing, code analysis, running it locally or deploying it? These redundant tasks can consume valuable time and resources. Stop working so hard and take advantage of JavaScript task automation using Gulp to streamline these tasks and give you back more time in the day. Studying this repo can help clarify how Gulp works, jump-start task automation with Gulp, find and resolve issues faster, and be a more productive.

Requirements

  • Install Node
    • on OSX install home brew and type brew install node
    • on Windows install chocolatey
    • Read here for some tips on Windows
    • open command prompt as administrator
      • type choco install nodejs
      • type choco install nodejs.install
  • On OSX you can alleviate the need to run as sudo by following these instructions. I highly recommend this step on OSX
  • Open terminal
  • Type npm install -g node-inspector bower gulp

Quick Start

Prior to taking the course, clone this repo and run the content locally

$ npm install
$ bower install
$ npm start

pluralsight-gulp's People

Contributors

johnpapa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pluralsight-gulp's Issues

gulp-less print out nothing error in case extend a non-existing mixin

@johnpapa ,
I have followed your course and everything works well, also, i have added some more gulp tasks successfully.
Unfortunately, i have met a problem for gulp-less. Can you give a hand?

Here i copied something for your help:
I have posted a thread in stackoverflow about gulp-less. I want to know how to deliver error information when an error happens during extend a non-existing mixing/class.
http://stackoverflow.com/questions/34107876/is-there-any-way-to-let-gulp-less-print-error-in-case-extend-a-non-existing-mixi
gulp-community/gulp-less#206

Can you have a look and give me clue. Following is copied from stackoverflow:

In my less build process, i use the gulp-less. In the build process, i use gulp-plumber to print out error information during that build. It works well for the less syntax error, reference to non-exist variables. Unfortunately, the gulp-less build task print out nothing in case we extend a non-existing mixin/class. Does anyone know about how to enable such kind of "error" or even warning during the build? Following is the gulpfile:
gulp.task('less',function(){
var pagelessentry = config.pagelessentry;
log(pagelessentry);
return gulp
.src(pagelessentry)
.pipe(plumber({
errorhandler: errorhandler
}))
.pipe(debug({
title: 'LESS'
}))
.pipe(sourcemaps.init())
.pipe(less())
.pipe(uncss({
html: ['index.html', 'http://homestead.app'],
ignore: [/header-down/,/header-up/]
}))
.pipe(sourcemaps.write(projectrootdir+'public/preparebuild/assets/css/',{includeContent: true}))
.pipe(gulp.dest(projectrootdir+'public/preparebuild/assets/css/'));
});
Following is the "wrong" less code where i want gulp to print out some "error or warning" information:
.footer{
background-color: @primary-background;
&:extend(.NONEXISTING all);
}
In above code, when we extend .NOEXISTING mixin, nothing printed out.
It is quite annoying thing.
Please help me out
Thanks~!

Builded version error - Javascript error

When I try to execute my app in build mode, occurs the following error:

Uncaught ReferenceError: describe is not defined dataservice.spec.js
Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module app.core due to:
Error: [$injector:unpr] Unknown provider: routerHelperProvider
http://errors.angularjs.org/1.3.20/$injector/unpr?p0=routerHelperProvider
at http://localhost:7203/js/lib-20045cb1d4.js:9274:12
at http://localhost:7203/js/lib-20045cb1d4.js:13242:19
at getService (http://localhost:7203/js/lib-20045cb1d4.js:13389:39)
at Object.invoke (http://localhost:7203/js/lib-20045cb1d4.js:13421:13)
at runInvokeQueue (http://localhost:7203/js/lib-20045cb1d4.js:13336:35)
at http://localhost:7203/js/lib-20045cb1d4.js:13345:11
at forEach (http://localhost:7203/js/lib-20045cb1d4.js:9537:20)
at loadModules (http://localhost:7203/js/lib-20045cb1d4.js:13326:5)
at http://localhost:7203/js/lib-20045cb1d4.js:13343:40
at forEach (http://localhost:7203/js/lib-20045cb1d4.js:9537:20)
http://errors.angularjs.org/1.3.20/$injector/modulerr?p0=app.core&p1=Error%…Each%20(http%3A%2F%2Flocalhost%3A7203%2Fjs%2Flib-20045cb1d4.js%3A9537%3A20)
at http://localhost:7203/js/lib-20045cb1d4.js:9274:12
at http://localhost:7203/js/lib-20045cb1d4.js:13365:15
at forEach (http://localhost:7203/js/lib-20045cb1d4.js:9537:20)
at loadModules (http://localhost:7203/js/lib-20045cb1d4.js:13326:5)
at http://localhost:7203/js/lib-20045cb1d4.js:13343:40
at forEach (http://localhost:7203/js/lib-20045cb1d4.js:9537:20)
at loadModules (http://localhost:7203/js/lib-20045cb1d4.js:13326:5)
at createInjector (http://localhost:7203/js/lib-20045cb1d4.js:13252:11)
at doBootstrap (http://localhost:7203/js/lib-20045cb1d4.js:10666:20)
at bootstrap (http://localhost:7203/js/lib-20045cb1d4.js:10687:12)
http://errors.angularjs.org/1.3.20/$injector/modulerr?p0=app&p1=Error%3A%20…rap%20(http%3A%2F%2Flocalhost%3A7203%2Fjs%2Flib-20045cb1d4.js%3A10687%3A12)

Injection CSS with Browser-sync

First, congratulation for the course, it's great.

Second, I'm having problems to figure it out why my browser is reloading on inject css. I tried to find help on the plugin docs, it's seems to be updated and it's a little bit different of your implementation, so, no success.

I copied and paste the exercise gulp files, but it's keep not working, the browser is reloading when I change the less file.
Thanks in advanced !

Assets not found if apps running in subfolder not ROOT

Hi @johnpapa,

I'm try running this angular app (after build) in tomcat (not nodejs) but not in the ROOT folder, somehow all my assets and files (injected with gulp-inject) path is relative to root.

How can i configure gulp to create path with my subfolder ?

Thanks

gulp-filter - undefined is not a function when i try to restore

I got this error in the cssFilter.restore()
...

gulp.task('optimize', ['inject'], function() {
  log('Optimizing the javascript, css, html');

  var assets        = useref.assets({searchPath: './'}),
      cssFilter     = filter('**/*.css'),
      templateCache = config.temp + config.templateCache.file;

  return gulp
    .src(config.index)
    .pipe(plumber())
    .pipe(inject(gulp.src(templateCache, {read: false}), {
      starttag: '<!-- inject:templates:js -->'
    }))
    .pipe(assets)
    // Filter down to css
    .pipe(cssFilter)
    // CSS Optimizer
    .pipe(csso())
    // Filter restore
    .pipe(cssFilter.restore())
    .pipe(assets.restore())
    .pipe(useref())
    .pipe(gulp.dest(config.build));
});
[13:20:50] Optimizing the javascript, css, html
[13:20:50] 'optimize' errored after 200 ms
[13:20:50] TypeError: object is not a function
    at Gulp.<anonymous> (/Users/pluralsight-gulp/gulpfile.js:136:21)
    at module.exports (/Users/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
    at Gulp.Orchestrator._runTask (/Users/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
    at Gulp.Orchestrator._runStep (/Users/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
    at /Users/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/index.js:279:18
    at finish (/Users/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
    at /Users/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:52:4
    at f (/Users/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/node_modules/end-of-stream/node_modules/once/once.js:17:25)
    at DestroyableTransform.onend (/Users/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/node_modules/end-of-stream/index.js:31:18)
    at DestroyableTransform.emit (events.js:129:20)
[13:20:50] gulp-inject 1 files into index.html.

But if i modify the cssFilter.restore() and remove that parenthesis, then Plumber talk to me :)

[13:22:34] Optimizing the javascript, css, html
[13:22:34] 'optimize' errored after 200 ms
[13:22:34] Error in plugin 'plumber'
Message:
    Can't pipe to undefined
[13:22:34] gulp-inject 1 files into index.html.

i tried the @annabellor issue-solution but doesn't work

Injecting into html problem when dependencies dont specified main files

Everything works but there is a problem when in the example folder i figured out that Bootstrap has this in his Bower.json

"main": [
    "less/bootstrap.less",
    "dist/js/bootstrap.js"
  ],

So... they didn't add .css as main file, instead they put the .less, and we can't inject that. They have, of course the .css file in dist/ folder.

In this case, the best is report to them right ? because change their json manually is crazy the next time you update :S

Where is gulp.on() in the API?

You mention gulp.on('error',someFunc); I can't find any documentation for the on() method and my IDE, Webstorm doesn't recognize .on() as a resolved method.

Thoughts? Thanks.

GIT error when running npm install on windows

Hi,
I'm getting below error when I run npm install

42 error Windows_NT 6.3.9600
43 error argv "node" "C:\\Users\\Harish Chouhan\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install"
44 error node v0.12.7
45 error npm  v2.11.3
46 error code ELIFECYCLE
47 error [email protected] install: `bower install`
47 error Exit status 1
48 error Failed at the [email protected] install script 'bower install'.
48 error This is most likely a problem with the Pluralsight-Gulp package,
48 error not with npm itself.
48 error Tell the author that this fails on your system:
48 error     bower install
48 error You can get their info via:
48 error     npm owner ls Pluralsight-Gulp
48 error There is likely additional logging output above.
49 verbose exit [ 1, true ]

Don't cleaning when i add the callback done.

Hi, everything is working fine as you can see

gulp.task('styles', ['clean-styles'], function() {
  log('Compiling Less --> CSS');

  return gulp
    .src(config.lessInput)
    .pipe(less())
    .pipe(autoprefixer({browsers: ['last 2 versions', '> 5%']}))
    .pipe(gulp.dest(config.temp))
});

gulp.task('clean-styles', function() {
  var files = config.temp + '/**/*.css';
  clean(files);
});

function clean(path){
  log('Cleaning: ' + util.colors.blue(path));
  del(path);
}
▶ gulp styles
[11:59:06] Using gulpfile ~/pluralsight-gulp/gulpfile.js
[11:59:06] Starting 'clean-styles'...
[11:59:06] Cleaning: ./.tmp/**/*.css
[11:59:06] Finished 'clean-styles' after 8.29 ms
[11:59:06] Starting 'styles'...
[11:59:06] Compiling Less --> CSS
[11:59:07] Finished 'styles' after 201 ms

but i got this problem when i add the 'done' callback

gulp.task('styles', ['clean-styles'], function() {
  log('Compiling Less --> CSS');

  return gulp
    .src(config.lessInput)
    .pipe(less())
    .pipe(autoprefixer({browsers: ['last 2 versions', '> 5%']}))
    .pipe(gulp.dest(config.temp))
});

gulp.task('clean-styles', function(done) {
  var files = config.temp + '/**/*.css';
  clean(files, done);
});

function clean(path, done){
  log('Cleaning: ' + util.colors.blue(path));
  del(path, done);
}
▶ gulp styles
[12:02:21] Using gulpfile ~/pluralsight-gulp/gulpfile.js
[12:02:21] Starting 'clean-styles'...
[12:02:21] Cleaning: ./.tmp/**/*.css

Do you see ? the task stopped after log message :(

Windows Enviroment: useref not injecting the files that are in "bower_components"

Explanation:

When gulp-inject adds the references from the bower components folder, it creates them with this path:

    <!-- build:css styles/vendor.css -->
    <!-- bower:css -->
    <link rel="stylesheet" href="../../bower_components/bootstrap/dist/css/bootstrap.css" />
    <link rel="stylesheet" href="../../bower_components/font-awesome/css/font-awesome.css" />
    <link rel="stylesheet" href="../../bower_components/toastr/toastr.css" />
    <!-- endbower -->
    <!-- endbuild -->

After running the optimize task, the _vendor.css_ and _vendor.js_ where not created in the build folder. The issue was that gulp-useref couldn't locate correctly the bower_components folder because was looking in a different path:

C:\Users\eliashdezr\bower_components\jquery\dist\jquery.js
C:\Users\eliashdezr\bower_components\angular\angular.js

Instead of this

C:\Users\eliashdezr\Desktop\pluralsight-gulp\bower_components\jquery\dist\jquery.js
C:\Users\eliashdezr\Desktop\pluralsight-gulp\bower_components\angular\angular.js

Solution/Workaround

I just added another pipe in the inject task using gulp-replace

gulp.task('inject', ['wiredep', 'styles', 'template-cache'], function () {
    log('Wire up the bower css and js references into the index.html');

    return gulp
        .src(config.index)
        .pipe($.inject(gulp.src(config.css)))
        .pipe($.replace(/="..\/..\/bower_components\//g, '="/bower_components/'))
        .pipe(gulp.dest(config.client));
});

gulp-filter and gulp-csso

If you'r on module Minifying and filtering - optimizing css, you may need to alter some code in correction to the video:

package.json

"gulp-csso": "^1.0.0",
"gulp-filter": "^3.0.1",

gulpfile.js

    var cssFilter = $.filter(['**/*.css'], {restore: true});

    return gulp
        .... omitted
        .pipe(cssFilter)
        .pipe($.csso())
        .pipe(cssFilter.restore)
        .... omitted

Notice the value of cssFilter and the pipe of css filter restore.

update:
You can also apply the same thing for the next video - Optimizing javascript

Cannot find module 'q'

I get the following error message after running : bower install

module.js:340
throw err;
^
Error: Cannot find module 'q'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (C:\Users\Mark\AppData\Roaming\npm\node_modules\bower\bin\bower:6:9)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)

Brackets use of JSHint and JSCS

John, great class, I had to do a little more setup to mimic your Brackets setup, I may have skipped over this if you did mention.
Using Brackets Release 1.2 build 1.2.0-15697
in Brackets menu

Debug-> Open Preferences File

I added the language section

{
    "themes.theme": "delkos",
    "fonts.fontSize": "19px",
    "language": {
        "javascript": {
            "linting.prefer": [
                "JSHint",
                "JSCS"
            ],
            "linting.usePreferredOnly": true
        }
    },
    "linting.enabled": true
}

web app not showing the same as in the course?

Hello i am following the course on pluralsight and when i got to HTML injection part when you take a look at the app to make sure everything is working, mine is not showing the same it looks like this

preview

when i resize the windows:

preview-min

to make sure i didnt break anything i cloned the repo again and did npm install , bower install and npm start and got the same result.

all the console shows is

Info: Primed the app data undefined
angular.js:11655 Success: Gulp Patterns Demo loaded! null
angular.js:11655 Info: Activated Dashboard undefined

but no errors, am missing something?

I am on windows 8.1

NODE_ENV undefined

Running the server normally goes well without errors, but when doing the 'serve-dev' task NODE_ENV is always undefined, even if I explicitly set it to 'dev'
`About to crank up node

PORT=7203

NODE_ENV=undefined

** DEV **

Express server listening on port 7203

env = development

__dirname = C:\Projects\pluralsight-gulp\src\server

process.cwd = C:\Projects\pluralsight-gulp`

Gulp-inject error for version 4.0.0

It seems that the gulp-inject fails for "gulp-inject": "^4.0.0" while running the wiredep task reporting for unexpected token (syntax error related to startTag) . If I switch to "gulp-inject": "^1.1.1" works fine. Any ideas?

Continuously loading Files

After running the node server (using either gulp-serve-dev or node src/server/app.js) the server runs ok with no errors. But the page is blank and the node server then reports loading the bower_components ,, Continuously .... It seems to be stuck in a loop and eventually breaks chrome and I have to stop the server.

Problem Minifying HTML and Putting in $templatecache

I am having an issue while running gulp templatecache. I have installed the dependencies gulp-angular-templatecache and gulp-minify-html. I have also added the information in the gulp.config.js file.

TYPEERROR: undefined is not a function

Assistance would be greatly appreciated.

gulpfile.js --->

gulp.task('templatecache',['clean-code'], function() {
log('Creating an AngularJS $templateCache');
return gulp
.src(config.htmltemplates)
.pipe($.minifyHtml({empty: true}))
.pipe($.angularTemplatecache(config.templateCache.file, config.templateCache.options))
.pipe(gulp.dest(config.temp));
});

gulp.config.js --->

htmltemplates: clientApp + '*/.html',
templateCache: {
file: 'templates.js',
options: {
module: 'app.core',
standAlone: false,
root: 'app/'
}
},

console info and error ---->

➜ pluralsight-gulp git:(master) ✗ gulp templatecache
[10:25:39] Using gulpfile ~/sites/pluralsight-gulp/gulpfile.js
[10:25:39] Starting 'clean-code'...
[10:25:39] Cleaning: ./.tmp//*.js,./build//.html,./build/js/__/.js
[10:25:39] Finished 'clean-code' after 82 ms
[10:25:39] Starting 'templatecache'...
[10:25:39] Creating an AngularJS $templateCache
[10:25:39] 'templatecache' errored after 7.49 ms
[10:25:39] TypeError: undefined is not a function
at Gulp. (/Users/malikdixon1/sites/pluralsight-gulp/gulpfile.js:110:19)
at module.exports (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:34:7)
at Gulp.Orchestrator._runTask (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/index.js:273:3)
at Gulp.Orchestrator._runStep (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/index.js:214:10)
at /Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/index.js:279:18
at finish (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:21:8)
at cb (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/gulp/node_modules/orchestrator/lib/runTask.js:29:3)
at /Users/malikdixon1/sites/pluralsight-gulp/node_modules/del/index.js:54:4
at module.exports (/Users/malikdixon1/sites/pluralsight-gulp/node_modules/del/node_modules/each-async/index.js:22:3)
at /Users/malikdixon1/sites/pluralsight-gulp/node_modules/del/index.js:40:3

G4 error, Did you forget to signal async completion?

I just switched to Gulp version 4, everything works fine except my useref task giving me error:

The following tasks did not complete:  dependencies-admin
 Did you forget to signal async completion?

If I remove the useref pipe it works perfectly fine

gulp.task('dependencies-admin', function (done) {

    return gulp.src(['app/view/admin/admin-index.php'], {base: '.'})

        .pipe(useref({searchPath: '.'}))    // if I comment this line  the error goes away

        .pipe(gulp.dest(destination));

});

for some reason useref is not signalling the end of it's task? have you tested it with G4? Am I missing something here?

gulp-useref.assets is not a function

While following along your pluralsight video, the following gulp task results in an error 'TypeError: $GLP.useref.assets is not a function'.

gulp.task('optimize', ['inject', 'fonts', 'images'], function () {
    log('Optimizing the javascript, css, and html');

    var assets = $GLP.useref.assets({searchPath: './'}),
        templateCache = config.temp + config.templateCache.file,
        cssFilter = $GLP.filter('**/*.css'),
        jsLibFilter = $GLP.filter('**/' + config.optimized.lib),
        jsAppFilter = $GLP.filter('**/' + config.optimized.app);

    return gulp
        .src(config.index)
        .pipe($GLP.plumber())
        .pipe($GLP.inject(gulp.src(templateCache, { read: false }), {
            starttag: '<!-- inject:templates:js -->'
        }))
        .pipe(assets)
            .pipe(cssFilter)
            .pipe($GLP.csso())
            .pipe(cssFilter.restore())

            .pipe(jsLibFilter)
            .pipe($GLP.uglify())
            .pipe(jsLibFilter.restore())

            .pipe(jsAppFilter)
            .pipe($GLP.ngAnnotate())
            .pipe($GLP.uglify())
            .pipe(jsAppFilter.restore())

            .pipe($GLP.rev())
        .pipe(assets.restore)
        .pipe($GLP.useref())
        .pipe($GLP.revReplace())
        .pipe(gulp.dest(config.build))
        .pipe($GLP.rev.manifest())
        .pipe(gulp.dest(config.build));
});

As per gulp-useref documentation, v3 no longer uses:

var gulp = require('gulp'),
    useref = require('gulp-useref');

gulp.task('default', function () {
    var assets = useref.assets();

    return gulp.src('app/*.html')
        .pipe(assets)
        .pipe(assets.restore())
        .pipe(useref())
        .pipe(gulp.dest('dist'));
});

but instead uses the following syntax:

var gulp = require('gulp'),
    useref = require('gulp-useref');

gulp.task('default', function () {
    return gulp.src('app/*.html')
        .pipe(useref())
        .pipe(gulp.dest('dist'));
});

I was able to find a workaround while digging around the inner tubes but it does not append a version to the index.html page itself. Hopefully this will help others.

gulp.task('optimize', ['inject', 'fonts', 'images'], function () {
    log('Optimizing the javascript, css, and html');

    var lazypipe = require('lazypipe'),
        templateCache = config.temp + config.templateCache.file,
        cssFilter = $GLP.filter('**/*.css', {restore: true}),
        jsLibFilter = $GLP.filter('**/' + config.optimized.lib, {restore: true}),
        jsAppFilter = $GLP.filter('**/' + config.optimized.app, {restore: true}),
        notIndexFilter = $GLP.filter(['**/*', '!**/index.html'], {restore: true});

    return gulp
        .src(config.index)
        .pipe($GLP.plumber())
        .pipe($GLP.inject(
            gulp.src(templateCache, { read: false }),
            { starttag: '<!-- inject:templates:js -->' }
        ))
        // Apply the concat and file replacement with useref
        .pipe($GLP.useref({searchPath: './'}, lazypipe().pipe($GLP.sourcemaps.init,{loadMaps: true})))

        // Get the css
        .pipe(cssFilter)
        .pipe($GLP.csso())
        .pipe(cssFilter.restore)

        // Get the custom javascript
        .pipe(jsAppFilter)
        .pipe($GLP.ngAnnotate())
        .pipe($GLP.uglify())
        .pipe(jsAppFilter.restore)

        // Get the vendor javascript
        .pipe(jsLibFilter)
        .pipe($GLP.uglify())
        .pipe(jsLibFilter.restore)

        // Take inventory of the file names for future rev numbers
        .pipe(notIndexFilter)
        .pipe($GLP.rev())
        .pipe(notIndexFilter.restore)

        // Replace the file names in the html with rev numbers
        .pipe($GLP.revReplace())
        .pipe($GLP.sourcemaps.write('.'))
        .pipe(gulp.dest(config.build))
        .pipe($GLP.rev.manifest())
        .pipe(gulp.dest(config.build));
});

gulp wiredep cmd not injecting bootstrap.css

I downloaded the source files here from Github and have been following the course; I just finished up the HTML Injection section. When running the gulp wiredep command, bootstrap.css is not being injected in the bower:css section of Index.html. Everything else is injected fine - even bootstrap.js down in the bower:js section - just not bootstrap.css. I tried copying the gulpfile.js and gulp.config.js from the end of the course from the Excercise Files, in case it was an error I made in one of those, but bootstrap.css still fails to inject.

gulp-jscs requires reporter

When running the first task, gulp vet, no output was generated from jscs.

It appears that gulp-jscs now needs a reporter like jshint:

gulp.task('vet', function() {
    console.log('vetting');
    return gulp
        .src([
            './src/**/*.js',
            './*.js'
        ])
        .pipe(jscs())
        .pipe(jscs.reporter())
        .pipe(jshint())
        .pipe(jshint.reporter('jshint-stylish', {verbose: true}));
});

Thanks to EdinM for that one.

Bunch of JSLINT errors in Brackets that you didn't get.

Hi! I'm following your course. Originally, I was using WebStorm for programming, but I got a bunch of errors that you didn't get. I then switched to Brackets, but I still get these JSLint problems.

The errors look like this:
Missing 'use strict' statement.
'log' was used before it was defined.
'require' was used before it was defined.
'module' was used before it was defined.

I've just finished "Getting started with Gulp" and it would be convenient to not get these errors, like you are.

Great course by the way! I hope you can help me.

gulp-nodemon - watch not working

In the "Using nodemon in a Gulp Task" segment of "Serving your Development Build", I had to change var server = './src/server/' to var server = '/src/server/' (remove the leading '.'). Not sure if this is a windows issue... but the watch wasn't firing the restart without this change.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.