Extending existing app using modules or library

On enyo 2.5.1 create modules was easy, just add a directory including package.js. But on 2.7 enyo-dev pack the app preventing that.

Any know a workaround?
Thanks!

Comments

  • I'm not certain what your question is. You can add new modules or directories in an Enyo 2.7 app easily. Just be sure to require it from somewhere. Can you give an example of what you're trying to accomplish?
  • Yeap, after all you know that the main app manage the module logic to its presentation.
    So on previous version my build structure contains a folder that inside has a package.js, when a module is added, it creates a new folder inside module folder (following the package.js subfolders or js that respects) and edit module package.js to add the new module folder name.

    On new enyo, that isn't possible, because when you require from source, enyo pack need module source file to pack it on build package.
  • edited March 22
    In 2.7, you'll need a package.json file instead of a package.js file, but otherwise, it should work similarly. Of course, it expects it will be in the src directory. If you want it somewhere else, you will have to tell enyo-pack where to find it. You can specify directories where to search for libraries.
Sign In or Register to comment.