This is still an issue. Just to clarifty, where modernizr is being called as a file in assets.php, upon the gulp process running modernizr is being minified into main.js however the call to dist/js/modernizr.js remains and is called. This results in a 404 error on the file. However because modernizr is minified and still included it works as expected.
May I suggest that you link to this issue on the closed topic? There was another user experiencing this issue and he/she may be able to help. I didnāt mean to come across as ungrateful, you guys are doing a brilliant job but it seemed a bit abrupt just closing the issue.
Regardless I have replicated this issue on another Windows 7 machine with a fresh install of 64bit Node, latest npm, bower and gulp and Iām getting the same issue where the modernizr.js is being minified to main.js
Could you possibly point me in the direction where the the operation to create the modernizr.js file is run/where the main.js file is compiled so that I can help resolve the issue?
To clarify this is a basic install and nothing has been changed. My current test environment is a clean machine which didnāt have node.js or any packages installed previously which eliminates any possible conflict in that area.
Iām having a similar issue with Sage 8.0.0. but in my case both Modernizr and jQuery are minified into main.js and they are not created in the dist folder on build. Tried with gulp, gulp build and gulp --production.
Iām using Windows 7 (64 bit) and node 0.12.0, npm 2.6.0, bower 1.3.12, gulp 3.8.11. donāt know if this is necessary but here is the main.js file (https://gist.github.com/slobich/b2def7bb1aedb5211bf6). i tried both by cloning the repo and downloading the zip file and got the same results.
All the fancy path management is done by asset-builder so if those tests fail then that will tell us it is an issue with asset-builder and windows. https://github.com/austinpray/asset-builder
Apologies but just for clarification should asset-builder contents be placed in the same directory as sage and then I run ānpm testā or should I run ānpm testā in the asset-builder directory isolated?
When running in an isolated folder the npm test fails with the following notice @austin :
foreach dep
ā should loop through the dependencies
28 passing (15s)
1 failing
1) Integration Tests manifests roots manifest default roots manifest:
AssertionError: expected 'C:\\Users\\Craig\\Downloads\\asset-builder-master
\\asset-builder-master\\test\\tmp\\bower_components\\modernizr\\modernizr.js' to
not include 'modernizr'
at Function.assert.notInclude (C:\Users\Craig\Downloads\asset-builder-mast
er\asset-builder-master\node_modules\chai\lib\chai\interface\assert.js:715:52)
at C:\Users\Craig\Downloads\asset-builder-master\asset-builder-master\test
\test.js:318:18
at arrayEach (C:\Users\Craig\Downloads\asset-builder-master\asset-builder-
master\node_modules\lodash\index.js:1317:13)
at Function.forEach (C:\Users\Craig\Downloads\asset-builder-master\asset-b
uilder-master\node_modules\lodash\index.js:5958:11)
at Context.<anonymous> (C:\Users\Craig\Downloads\asset-builder-master\asse
t-builder-master\test\test.js:316:11)
at callFn (C:\Users\Craig\Downloads\asset-builder-master\asset-builder-mas
ter\node_modules\mocha\lib\runnable.js:251:21)
at Test.Runnable.run (C:\Users\Craig\Downloads\asset-builder-master\asset-
builder-master\node_modules\mocha\lib\runnable.js:244:7)
at Runner.runTest (C:\Users\Craig\Downloads\asset-builder-master\asset-bui
lder-master\node_modules\mocha\lib\runner.js:374:10)
at C:\Users\Craig\Downloads\asset-builder-master\asset-builder-master\node
_modules\mocha\lib\runner.js:452:12
at next (C:\Users\Craig\Downloads\asset-builder-master\asset-builder-maste
r\node_modules\mocha\lib\runner.js:299:14)
at C:\Users\Craig\Downloads\asset-builder-master\asset-builder-master\node
_modules\mocha\lib\runner.js:309:7
at next (C:\Users\Craig\Downloads\asset-builder-master\asset-builder-maste
r\node_modules\mocha\lib\runner.js:248:23)
at Immediate._onImmediate (C:\Users\Craig\Downloads\asset-builder-master\a
sset-builder-master\node_modules\mocha\lib\runner.js:276:5)
at processImmediate [as _immediateCallback] (timers.js:358:17)
The fix is working for my issues (both Modernizr and jQuery). Both scripts get compiled and minified in the dist folder. Tried all 3 tasks (gulp, gulp build and gulp --production) and working on all 3.
I just cloned Sage (8.0 and then 8.0.1) and got this error when running gulp or gulp --production.
Details:
Windows 7
Node: v0.10.20
NPM: 2.6.0
Bower: 1.3.12
Let me know if you need any more info.
$ gulp
[17:51:37] Using gulpfile c:\Dropbox\sites\testsite\wp-content\themes\sage\gulpfile.js
[17:51:37] Starting 'clean'...
[17:51:37] Finished 'clean' after 3.18 ms
[17:51:37] Starting 'default'...
[17:51:37] Starting 'wiredep'...
[17:51:38] Starting 'jshint'...
[17:51:38] Starting 'fonts'...
[17:51:39] Starting 'images'...
[17:51:39] Finished 'default' after 1.92 s
[17:51:39] gulp-imagemin: Minified 0 images
[17:51:39] Finished 'images' after 672 ms
[17:51:39] Finished 'wiredep' after 2.07 s
[17:51:39] Starting 'styles'...
[17:51:40] 'styles' errored after 243 ms
[17:51:40] AssertionError: path must be a string
at Module.require (module.js:362:3)
at require (module.js:380:17)
at requireFn (c:\Dropbox\sites\testsite\wp-content\themes\sage\node_modules\gulp-load-plugins\index.js:37:14)
at Object.defineProperty.get (c:\Dropbox\sites\testsite\wp-content\themes\sage\node_modules\gulp-load-plugins\index.js:68:18)
at cssTasks (c:\Dropbox\sites\testsite\wp-content\themes\sage\gulpfile.js:83:14)
at c:\Dropbox\sites\testsite\wp-content\themes\sage\gulpfile.js:147:28
at arrayEach (c:\Dropbox\sites\testsite\wp-content\themes\sage\node_modules\asset-builder\node_modules\lodash\index.js:1317:13)
at Function.forEach (c:\Dropbox\sites\testsite\wp-content\themes\sage\node_modules\asset-builder\node_modules\lodash\index.js:5958:11)
at Manifest.forEachDependency (c:\Dropbox\sites\testsite\wp-content\themes\sage\node_modules\asset-builder\lib\Manifest.js:47:5)
at Gulp.<anonymous> (c:\Dropbox\sites\testsite\wp-content\themes\sage\gulpfile.js:146:12)
[17:51:40] Finished 'jshint' after 1.83 s
[17:51:40] Finished 'fonts' after 1.28 s