SPServices is a jQuery library which abstracts SharePoint's Web Services and makes them easier to use. It also includes functions which use the various Web Service operations to provide more useful (and cool) capabilities. It works entirely client side and requires no server install.
This is the starting ground for splitting up SPServices into smaller modules using AMD.
Converted utilities and SPCascadeDropdowns to AMD modules
Created module constants will keep CONST across SPServices
Fixed jshint issues due to move of code to new modules
Added grunt build task to - Deploy - copies the src folder to another location (ex. sharepoint mapped drive)
Added new aspx page - src/dev.aspx - to assist with development. Loads all code using require.js
Where does this leave you
You are not setup to start splitting other functionality from core/jquery.SPServices.js into modules... The dev.aspx file should give you a good page to start testing with. It loads SPServices by simply requiring src/SPServices.js (new file)... I did not touch src/jquery.SPServices.js and thus it remains the file that built into the release file.
Build Single File for Dist
I did not get time to work on changing the build to use the new broken out code... I will do that the next time around. The process that it will follow will be:
User r.js (requireJS build script) to build all of SPServices depdencies into a single file
Use AMDClean to convert the Require.JS single file into plain javascript (remove dependency on a module loader... I prefer AMDClean over the more popular almond.js).
Changes
This is the starting ground for splitting up SPServices into smaller modules using AMD.
Where does this leave you
You are not setup to start splitting other functionality from
core/jquery.SPServices.js
into modules... The dev.aspx file should give you a good page to start testing with. It loads SPServices by simply requiringsrc/SPServices.js
(new file)... I did not touchsrc/jquery.SPServices.js
and thus it remains the file that built into the release file.Build Single File for Dist
I did not get time to work on changing the build to use the new broken out code... I will do that the next time around. The process that it will follow will be:
/paul.