Is there a way to put copyright content in the generated js file using rollup? - rollup

There are options to put copyright content while generating bundle using gulp etc. Is there some support provided by rollup for the same?

You probably want to add a banner.

Related

Have stencil compiler ignore certain files?

A plugin is generating *.json files during the build and when I'm using the watch flag, it keep re-triggering the build forever.
Is there a way to tell Stencil to ignore certain filetypes on watch?
After upgrading to 2.0.3, I was able to add the following to the stencil config and it worked: watchIgnoredRegex: /\.*\.json$/

How to proper integrate PrismJS into a Eleventy project?

I'm building a site using eleventy and want to include code examples with code-highlighting. Prism looks like a great choice for this. How would I add it proper to the build process (not as CDN)?
Use the download option. This gives you the JS/CSS you need. Copy it to your site and ensure you are using the "Passthrough File Copy" (https://www.11ty.dev/docs/copy/) option to copy CSS and JS files over.

Understanding PDFBox jar files

I am attempting to install PDFBox on my system in order to create PDF files, but am unsure which jar files I need. If I go to https://pdfbox.apache.org/download.cgi
I see command line tools as follows:
pdfbox-app (9.1MB)
preflight-app (9.2MB)
debugger-app (9.0MB)
I also see "Libraries of each subproject" as follows:
pdfbox (2.6MB)
fontbox (1.6MB)
preflight (248KB)
xmpbox (132KB)
pdfbox-tools (77KB)
pdfbox-debugger (245KB)
What is meant by "each subproject"? Is it talking about the command line tools or something different?
I am planning to use java from the command line rather than in an IDE. Does this mean that I just need the Command line tools or do I need the "Libraries of each Subproject" as well? What does the "-app" indicated in the command line tools vs the related libraries?
Is there a page on apache.org that mentions the differences between all of these?
To create PDF files should I be using the preflight and debugger files as well or are those optional?
Summarizing the comments: you want to create a PDF from scratch and access your development over ssh so you can't use an IDE and have to use javac. For that you could use pdfbox-app jar file, but this would be huge. Instead, use the pdfbox, fontbox and commons-log jar files. See also here for additional dependencies if you want to do more advanced stuff (read / render (= convert to image) / decrypt / sign).

Sitefinity CSS combining in MVC Layouts

In Sitefinity WebForms you have a ResourceLinks control allowing you to combine multiple, but what do you use in MVC layouts?
I'm not sure if the razor helper #Html.StyleSheet will do the job?
Adding all the CSS files to the Global folder in App_Data\Sitefinity\WebsiteTemplates[template_folder]\App_Themes[theme] will automatically add them to the site, but won't combine them.
We're working with Sitefinity 8.x and looking for a definitive way to compress and combine JS and CSS, but the pickings seem slim.
With the move from webforms to mvc, Sitefinity didn't include specifically introduce a new bundler or something so you're left with essentially 2 default options, but they've seemed to have opted for approach #3.
1) Use .less and .sass to pre-process as part of your build process.
So in your theme folder you would have a global.less (or scss or sass) that essentially combines them using the #import directive.
Install a VisualStudio extension like Mad's Kristensen Bundler and Minification VS Extension (previously part of WebEssentials) and then define in the VS settings that it should compile and minify on build.
Then every time you build or publish, your one bundled-and-compressed .min.css will be available for Sitefinity.
2) Second option would be to use default ASP.NET Web Optimization.
Where you define static bundles in VisualStudio and then use these bundles by means of #Styles.Render or #Scripts.Render to output them.
3) Lastly a new way has been added with the new Feather approach, which uses the current fashionable approach of Grunt to bundle and optimize your styles and scripts.
In the /ResourcePackages folder you'll already see a gruntfile.js file which has a task you can run which can then compile (and can be extended to prefix, bundle, minify, etc) your .sass into a .min.css which you can then add to your solution.
A sample can be seen here (https://github.com/Sitefinity/feather-packages/blob/master/Bootstrap/gruntfile.js)
I'd use a combination of the above approach to receive the maximum result with Sitefinity where you use option 1 to have VS build out your core/base CSS and JS and then include them using Web.Optimization.
Any additional page or widget related styles or JS can then be included afterwards manually through the css widget which gets compiled through option number 3.
Once you get more familiar with this new approach you can create and load optimized .css and .js on demand - even using a RequireJS approach to load them depended on the widget dragged and dropped on the page. RequireJS might seem out-dated given the latest gadgets and gizmo's but with v9.0 its still being used by Sitefinity itself to add inline-editing functionality.
Let me know if you need more info on option 3, I'm happy to extend my answer with some code snippets, or sample scripts on how I've tailored them.

Give copyright in Ruby on Rails files

I want provide to copyright notice at start of files in my Ruby on Rails project. Can I give copyright notice in all Ruby on Rails files including auto generated files like application.rb, routes.rb. ?
I have seen this in some ruby files available online such ashttps://github.com/diaspora/diaspora/blob/develop/app/models/account_deletion.rb
I needed to do the same, but I needed a tool to automate adding it to all .rb files.
I have written the following script for this reason
https://gist.github.com/modsaid/5435473
You would need to review the MIT-license for that: http://www.opensource.org/licenses/mit-license.php
but if my understanding is correct, yes you can put a copyright notice on your files.