trying to include enyo in ionic project

I'm trying to get enyo modules in an ionic project.
In my gulpfile.js (for ionic), I added:

var enyo = require('enyo');

But I get the following error:

Uh oh! Looks like you're missing a module in your gulpfile:
Cannot find module 'enyo/dom'

Do you need to run `npm install`?
Any thoughts on what I can try to get a reference to enyo ionic project? In my ionic project, I have JS files like shown below and I'd like for "enyo/kind" to refer to the correct path/source.

var
    kind = require('enyo/kind'),
    platform = require('enyo/platform'),
    Collection = require('enyo/Collection'),
    CaseModel = require('./case-model');
Thanks!
Cage

Comments

  • You probably can't directly include Enyo modules into npm projects. It wasn't designed to work that way. You will probably need to pre-build and then include the built output into your ionic project. I'm curious how it will all turn out!
  • For that, would you recommend gulp? It was working when ionic used webpack but now they have moved to gulp and I can't get it find the correct path or properly include them via gulp.
  • My guess is the gulp script is still calling webpack, no? Gulp relies on other packages to actually do work.
Sign In or Register to comment.