You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @roosh-t3 can you please provide an example of how Winwheel.js would be used after being downloaded via NPM? Should trying to use the Winwheel.js in the /lib directory work or only the files in the /dist directory? Sorry my knowledge of NPM quite limited and I am having trouble testing the changes proposed in this merge request. Thanks.
/dist directory the distribution directory. NPM doesn't need this. but to distribute your codes for others such as non NPM users for an example. If you look at the composer.json, you will see the main file as index.js "main": "index.js" and the index file contains the simple code module.exports = require('./lib/Winwheel'); which requires Winwheel.js file and exports it. in the lib folder Winwheel.js file exports the entire function module.exports = Winwheel; So the mechanism can be explained as,
Winwheel.js exports the Winwheel function
index.js imports (using require) the Winwheel.js and exports it.
basically a user can simply, in his code let winwheel = require('winwheel);andlet instance = new winwheel();` I hope I explained well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added package.json and modified to work with NPM