Menu icon Foundation

Developer

My Posts


  • NEW
  • How to include jQuery plugins?

    By Dustin

    javascript

    How do you add jQuery plugins to your project in Foundation 6.4? I'm using the Zurb Template.  I am trying to add Fancybox but I keep getting a "Uncaught ReferenceError: jQuery is not defined" error. I have tried several ways to get this to work base... (continued)






My Comments

Dustin commented on RCD's post 7 months

Nobody knows. I have asked this same question so many times and have received ZERO help. It is a shame.

Dustin commented on Martin's post 7 months

I've tried everything above and it does not work for me. The docs on this area are so poor and its extremely frustrating. Thinking about not using Foundation anymore. Everytime I got to build something there's a drastic difference with no docs to back it up. Why can't we just list .JS files in the config.yml file like we used to? This is ridiculous. 

Dustin commented on Deryck Oñate's post 8 months

Same problem here. Did you come up with a solution?

Dustin commented on Pieter Wensveen's post 8 months

Rafi, what about adding a jQuery plugin like DataTables? Based on the documentation it seems like I should be able to just place that in the js folder and it will get compiled in the app.js.. but that is not happening. I've also tried adding "import './lib/datatables.min';" to the app.js file and that just throws this error when I run foundation watch...
 
Error in plugin 'webpack-stream'
Message:
./src/assets/js/lib/datatables.min.js
Module not found: Error: Can't resolve 'datatables.net' in '/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib'
resolve 'datatables.net' in '/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib'
Parsed request is a module
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./src/assets/js/lib)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./src/assets/js/lib)
resolve as module
/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/assets/js/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/assets/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/node_modules doesn't exist or is not a directory
/Applications/MAMP/node_modules doesn't exist or is not a directory
/Applications/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
looking for modules in /Applications/MAMP/htdocs/ezdesign/node_modules
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules)
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules/datatables.net)
no extension
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net.json doesn't exist
as directory
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net doesn't exist
[/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/assets/js/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/assets/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/node_modules]
[/Applications/MAMP/htdocs/node_modules]
[/Applications/MAMP/node_modules]
[/Applications/node_modules]
[/node_modules]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net.js]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net.json]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net]
@ ./src/assets/js/lib/datatables.min.js 1926:47-1928:4 1969:47-1971:4 2074:47-2076:4
@ ./src/assets/js/app.js
@ multi ./src/assets/js/app.js./src/assets/js/lib/datatables.min.js
Module not found: Error: Can't resolve 'datatables.net-zf' in '/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib'
resolve 'datatables.net-zf' in '/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib'
Parsed request is a module
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./src/assets/js/lib)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./src/assets/js/lib)
resolve as module
/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/assets/js/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/assets/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/node_modules doesn't exist or is not a directory
/Applications/MAMP/node_modules doesn't exist or is not a directory
/Applications/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
looking for modules in /Applications/MAMP/htdocs/ezdesign/node_modules
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules)
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules/datatables.net-zf)
no extension
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf.json doesn't exist
as directory
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf doesn't exist
[/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/assets/js/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/assets/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/node_modules]
[/Applications/MAMP/htdocs/node_modules]
[/Applications/MAMP/node_modules]
[/Applications/node_modules]
[/node_modules]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf.js]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf.json]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf]
@ ./src/assets/js/lib/datatables.min.js 2365:47-2367:4
@ ./src/assets/js/app.js
@ multi ./src/assets/js/app.js./src/assets/js/lib/datatables.min.js
Module not found: Error: Can't resolve 'datatables.net-responsive' in '/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib'
resolve 'datatables.net-responsive' in '/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib'
Parsed request is a module
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./src/assets/js/lib)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./src/assets/js/lib)
resolve as module
/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/assets/js/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/assets/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/node_modules doesn't exist or is not a directory
/Applications/MAMP/node_modules doesn't exist or is not a directory
/Applications/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
looking for modules in /Applications/MAMP/htdocs/ezdesign/node_modules
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules)
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules/datatables.net-responsive)
no extension
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive.json doesn't exist
as directory
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive doesn't exist
[/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/assets/js/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/assets/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/node_modules]
[/Applications/MAMP/htdocs/node_modules]
[/Applications/MAMP/node_modules]
[/Applications/node_modules]
[/node_modules]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive.js]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive.json]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive]
@ ./src/assets/js/lib/datatables.min.js 2365:47-2367:4
@ ./src/assets/js/app.js
@ multi ./src/assets/js/app.js
Details:
domain: [object Object]
domainThrown: true
[15:39:22] 'build' errored after 9.57 s
[15:39:22] 'default' errored after 9.57 s
Error: foundation-zurb-template@1.0.0 start: gulp
Exit status 1
at EventEmitter.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/lifecycle.js:217:16)
at emitTwo (events.js:125:13)
at EventEmitter.emit (events.js:213:7)
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/spawn.js:24:14)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:887:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
 

Dustin commented on Dustin's post over 1 year

Did you restart gulp after making your changes to the gulpfile?

Dustin commented on Dustin's post over 1 year

Hi Sergey,
 
I did get an answer on stackoverflow... http://stackoverflow.com/questions/40639661/babel-breaks-other-javascript-plugins-frameworks
I haven't actually tried that solution yet but I'm sure it would work. 

Dustin commented on Dustin's post almost 2 years

No, I'm pretty sure it has something to do with the babel conversion. I removed all references to Foundation JS files in the config.yml file. So right now all gulp is doing is taking snap.svg.js, running babel on it, and placing it in dist/assets/js/app.js. The only thing in app.js is just the snap.svg code but converted with babel. I still get the same TypeError. So that confirms to me that its a problem related to Babel and nothing to do with the order or minification.

Dustin commented on Dustin's post over 2 years

I think I have this figured out. I guess I had to import the SASS Functions file.. http://foundation.zurb.com/sites/docs/sass-functions.html#rem-calc

Is this new for Foundation 6? Don't remember having to do this with 5.

Posts Followed


  • 13
    Replies
  • Foundation 6.4.1 - Add JS files

    By Martin

    js6.4.1

    Hi all,&nbsp; Ive installed a clean version of 6.4.1 through the CLI. On previous versions I would add a js file into the js folder and it would be compiled into app.js file, just as the foundation docs outline. &nbsp; I'm unfamiliar with webpack, but ... (continued)

    Last Reply by ritariya 12 days ago




Following

    No Content

Followers

My Posts

My Comments

You commented on RCD's post 7 months

Nobody knows. I have asked this same question so many times and have received ZERO help. It is a shame.

You commented on Martin's post 7 months

I've tried everything above and it does not work for me. The docs on this area are so poor and its extremely frustrating. Thinking about not using Foundation anymore. Everytime I got to build something there's a drastic difference with no docs to back it up. Why can't we just list .JS files in the config.yml file like we used to? This is ridiculous. 

You commented on Deryck Oñate's post 8 months

Same problem here. Did you come up with a solution?

You commented on Pieter Wensveen's post 8 months

Rafi, what about adding a jQuery plugin like DataTables? Based on the documentation it seems like I should be able to just place that in the js folder and it will get compiled in the app.js.. but that is not happening. I've also tried adding "import './lib/datatables.min';" to the app.js file and that just throws this error when I run foundation watch...
 
Error in plugin 'webpack-stream'
Message:
./src/assets/js/lib/datatables.min.js
Module not found: Error: Can't resolve 'datatables.net' in '/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib'
resolve 'datatables.net' in '/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib'
Parsed request is a module
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./src/assets/js/lib)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./src/assets/js/lib)
resolve as module
/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/assets/js/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/assets/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/node_modules doesn't exist or is not a directory
/Applications/MAMP/node_modules doesn't exist or is not a directory
/Applications/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
looking for modules in /Applications/MAMP/htdocs/ezdesign/node_modules
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules)
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules/datatables.net)
no extension
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net.json doesn't exist
as directory
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net doesn't exist
[/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/assets/js/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/assets/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/node_modules]
[/Applications/MAMP/htdocs/node_modules]
[/Applications/MAMP/node_modules]
[/Applications/node_modules]
[/node_modules]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net.js]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net.json]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net]
@ ./src/assets/js/lib/datatables.min.js 1926:47-1928:4 1969:47-1971:4 2074:47-2076:4
@ ./src/assets/js/app.js
@ multi ./src/assets/js/app.js./src/assets/js/lib/datatables.min.js
Module not found: Error: Can't resolve 'datatables.net-zf' in '/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib'
resolve 'datatables.net-zf' in '/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib'
Parsed request is a module
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./src/assets/js/lib)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./src/assets/js/lib)
resolve as module
/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/assets/js/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/assets/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/node_modules doesn't exist or is not a directory
/Applications/MAMP/node_modules doesn't exist or is not a directory
/Applications/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
looking for modules in /Applications/MAMP/htdocs/ezdesign/node_modules
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules)
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules/datatables.net-zf)
no extension
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf.json doesn't exist
as directory
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf doesn't exist
[/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/assets/js/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/assets/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/node_modules]
[/Applications/MAMP/htdocs/node_modules]
[/Applications/MAMP/node_modules]
[/Applications/node_modules]
[/node_modules]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf.js]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf.json]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-zf]
@ ./src/assets/js/lib/datatables.min.js 2365:47-2367:4
@ ./src/assets/js/app.js
@ multi ./src/assets/js/app.js./src/assets/js/lib/datatables.min.js
Module not found: Error: Can't resolve 'datatables.net-responsive' in '/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib'
resolve 'datatables.net-responsive' in '/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib'
Parsed request is a module
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./src/assets/js/lib)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./src/assets/js/lib)
resolve as module
/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/assets/js/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/assets/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/ezdesign/src/node_modules doesn't exist or is not a directory
/Applications/MAMP/htdocs/node_modules doesn't exist or is not a directory
/Applications/MAMP/node_modules doesn't exist or is not a directory
/Applications/node_modules doesn't exist or is not a directory
/node_modules doesn't exist or is not a directory
looking for modules in /Applications/MAMP/htdocs/ezdesign/node_modules
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules)
Field 'browser' doesn't contain a valid alias configuration
after using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules)
using description file: /Applications/MAMP/htdocs/ezdesign/package.json (relative path: ./node_modules/datatables.net-responsive)
no extension
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive.js doesn't exist
.json
Field 'browser' doesn't contain a valid alias configuration
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive.json doesn't exist
as directory
/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive doesn't exist
[/Applications/MAMP/htdocs/ezdesign/src/assets/js/lib/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/assets/js/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/assets/node_modules]
[/Applications/MAMP/htdocs/ezdesign/src/node_modules]
[/Applications/MAMP/htdocs/node_modules]
[/Applications/MAMP/node_modules]
[/Applications/node_modules]
[/node_modules]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive.js]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive.json]
[/Applications/MAMP/htdocs/ezdesign/node_modules/datatables.net-responsive]
@ ./src/assets/js/lib/datatables.min.js 2365:47-2367:4
@ ./src/assets/js/app.js
@ multi ./src/assets/js/app.js
Details:
domain: [object Object]
domainThrown: true
[15:39:22] 'build' errored after 9.57 s
[15:39:22] 'default' errored after 9.57 s
Error: foundation-zurb-template@1.0.0 start: gulp
Exit status 1
at EventEmitter.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/lifecycle.js:217:16)
at emitTwo (events.js:125:13)
at EventEmitter.emit (events.js:213:7)
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/foundation-cli/node_modules/npm/lib/utils/spawn.js:24:14)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:887:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:208:5)
 

You commented on Dustin's post over 1 year

Did you restart gulp after making your changes to the gulpfile?

You commented on Dustin's post over 1 year

Hi Sergey,
 
I did get an answer on stackoverflow... http://stackoverflow.com/questions/40639661/babel-breaks-other-javascript-plugins-frameworks
I haven't actually tried that solution yet but I'm sure it would work. 

You commented on Dustin's post almost 2 years

No, I'm pretty sure it has something to do with the babel conversion. I removed all references to Foundation JS files in the config.yml file. So right now all gulp is doing is taking snap.svg.js, running babel on it, and placing it in dist/assets/js/app.js. The only thing in app.js is just the snap.svg code but converted with babel. I still get the same TypeError. So that confirms to me that its a problem related to Babel and nothing to do with the order or minification.

You commented on Dustin's post over 2 years

I think I have this figured out. I guess I had to import the SASS Functions file.. http://foundation.zurb.com/sites/docs/sass-functions.html#rem-calc

Is this new for Foundation 6? Don't remember having to do this with 5.

Posts Followed

Following

  • No Content

Followers

  • No Content