1 person found this helpful
Can you just put links in the page to directly access the files via CDN (e.g. http://code.jquery.com/jquery-1.7.2.min.js). That way, the user doesn't need to worry about hosting the files on their site, and you don't need to worry about uploading them.
Take alook at this doc:
Yes, in some cases access via CDN is ok, but in some cases i need to include custom css or .js files.
Dont want to write everithing in to one file.
When the user uploads the updated page to their server, then the files will get uploaded as dependent files, correct?
Sorry about my bad english
What i'm tring to do is DW extension.
When DW developer use it, then it act so:
DW developer have defined local site in computer and DW. Sample http://localhost/mysite/
He make new blank html file in DW
He use my extension, what will generate new code in to blank file:
Sample in to head tag:
<link href="my_custom.css" rel="stylesheet" type="text/css" />
some HTML code In to body.
Problem is, files like "my_custom.js" and "my_custom.css" have to be uploaded in to development site folder (http://localhost/mysite/)
Later. deweloper able to upload all files in to publik server, but thats not my problem.
i'm tring to find out how to add custom files in to extension and upload them in to development site when developer use that extension.
If there exsits some tutorial or documentation about that?
I think its possible, i seen some extensions work that way, also Adobe spry tools do that.
Sample: when you add spry accordion, then code like:
<link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
generated in to head tag and these files uploaded automatically in to development site
Thank You in advance
Take a look in SpryAccordion.htm at the objectTag() function. It uses the dom.copyAssets() API.
dom.copyAssets() do that what i need.