Miquel Brazil
03/02/2020, 1:28 PMMichal
03/02/2020, 2:05 PMMichal
03/02/2020, 2:05 PMerictgrubaugh
03/02/2020, 2:19 PMMiquel Brazil
03/02/2020, 2:34 PMMiquel Brazil
03/02/2020, 2:36 PMMiquel Brazil
03/02/2020, 2:37 PMMiquel Brazil
03/02/2020, 2:38 PMconfig.json
file to modify the require.js
behavior. Seperate modules would update the config.json
file but it would be self-contained to project.erictgrubaugh
03/02/2020, 2:49 PMerictgrubaugh
03/02/2020, 2:50 PM<dependency>
for the projecterictgrubaugh
03/02/2020, 2:51 PMMiquel Brazil
03/02/2020, 3:10 PMjs
build of those dependencies?erictgrubaugh
03/02/2020, 3:12 PMMiquel Brazil
03/02/2020, 3:20 PMnpm
but admittedly I’ve only used it once or twice. I’m under the impression that you need some sort of build process to deploy those packages with a project.Miquel Brazil
03/02/2020, 3:22 PMrequire()
?erictgrubaugh
03/02/2020, 3:25 PM/SuiteScripts/lib/
, and I'll just manually upload the minified version there (e.g. /SuiteScripts/lib/lodash.min.js
). Then my manifest.xml
has a dependency
on that file being there, my config.json
will alias the minified file (e.g. paths: { "lodash": "/SuiteScripts/lib/lodash.min.js" }
), and my scripts can pull it in via define(["lodash"], function (_) { ... });
erictgrubaugh
03/02/2020, 3:26 PMMiquel Brazil
03/02/2020, 3:33 PMpackage.json
file in the project as well. where are those dependencies being saved?erictgrubaugh
03/02/2020, 3:38 PMnpm
gives you several options for dependencies. You can use some reasonably advanced bundling functionality if you need. I just add the libs as a normal dependency, which pops the file into my node_modules
directory, then I copy the file from there to the File Cabinet manually since I only need to do it one time. If I were building SuiteApps, then I'd just source control the libs I needed directly in the project.Chris Deakin
03/02/2020, 3:44 PMMiquel Brazil
03/02/2020, 3:44 PM/node_modules
and the /SuiteScripts/lib
folders from source control.erictgrubaugh
03/02/2020, 4:00 PMerictgrubaugh
03/02/2020, 4:00 PM/SuiteScripts
as wellerictgrubaugh
03/02/2020, 4:00 PM/SuiteScripts/
, then they're not mine. I keep all projects contained in their own foldererictgrubaugh
03/02/2020, 4:01 PMMiquel Brazil
03/02/2020, 4:02 PM/SuitesScripts/
and then we have folders for each script type and the script lives under their respective type.Miquel Brazil
03/02/2020, 4:03 PMMiquel Brazil
03/02/2020, 4:16 PMMiquel Brazil
03/02/2020, 4:16 PMMiquel Brazil
03/02/2020, 4:17 PMSuiteScripts/lib
directory?Brendan Boyd
03/02/2020, 6:25 PMBrendan Boyd
03/02/2020, 6:27 PMerictgrubaugh
03/02/2020, 6:49 PMmoment
and lodash
are the only libs I use very consistently. Anything else would be much more project-specific and would be stored with that project directly.erictgrubaugh
03/02/2020, 6:51 PM