usablica / intro.js

Lightweight, user-friendly onboarding tour library
http://introjs.com
Other
22.8k stars 2.59k forks source link

Modularize the code #666

Closed nblackburn closed 3 years ago

nblackburn commented 7 years ago

I think it would be a good move to break up the code to be more modular, this will ease development as there is quite a lot of helper functions in the code base that would better be moved to their own file which would be merged when packaged.

afshinm commented 7 years ago

Good idea, yes. Do you have anything in mind?

nblackburn commented 7 years ago

I was thinking of breaking it up into modules and utilizing node to bring the code base a little more up to date with today's conventions.

afshinm commented 7 years ago

Yeah, can you do this on a separate branch to have a look. It's a good idea in general but I'm not exactly sure how we can do this. Indeed making each function (or say, each logical part of the app) in a separate file, makes the project much more maintainable and one step close to adding the ability to develop plugins for Introjs.

bozdoz commented 7 years ago

When we move to Webpack, we can create a src directory, and further split the code into its own files/directories within. Webpack can then combine them to create production-ready files.

The main intro.js file can require all other code files (or import if we use babel and es6).

Splitting everything into its own modular files will make community development, spotting issues, etc, easier, IMO.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.