gulp-declare | Safely declare namespaces and set their properties | Reflection library
kandi X-RAY | gulp-declare Summary
kandi X-RAY | gulp-declare Summary
Safely declare namespaces and set their properties
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gulp-declare
gulp-declare Key Features
gulp-declare Examples and Code Snippets
Community Discussions
Trending Discussions on gulp-declare
QUESTION
Firstly, sorry my english.
I'm developing the frontend of a system where I've some js files that will be concatened and uglified to app.js. That's ok. But, some js files will be load by demand, that is, the files will be at differents folders, loaded by request, and consume the uglified app.js . My problem is that I need uglify global variables and name functions, and when I will uglify my scripts, the files not contain the "context" equal.
My struct:
...ANSWER
Answered 2017-Oct-09 at 13:47I created a method in gulpfile, using node.js, that "randomizes" global variables and specific functions to resolve my problem. To do this, I separated all global variables in a unique file called ./scripts/core/_variables.js
where each variable is declared line for line. I mapped all global variables dinamically, concating with functions name and I replace in the files allready builded in ./public/assets/js/**/*.js
.
The algorithm bellow can be configured with functions name and directories that can be randomfy.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gulp-declare
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page