How to disable resources of a grails plugin - javascript

I am working on a project which I have divided into several independent plugins. So like wise for each functionality I have a plugin which is integrated and can be re-used in another project.
So now I am using the plugin of my theme in development mode without packaging with grails.plugin.location.'MyThemePlugin' = "../MyThemePlugin"
All goes well till now but these is another plugin which I recently integrated and it has few same CSS and JS file names but of very old versions. So due to this problem my theme breaks and does not work.
So is there any way to disable the resource (css and js) files of this other plugin?

If there is no use of the css and js file of the new plugin then why don't you simply delete those files from plugin directory itself. Inline plugin editing seems should work.

Related

Using Bootstrap and ng-bootstrap is good?

I have two modules in my angular website , one is "bootstrap" and another one is "ng-bootstarp".
Does both modules are required , or any one is needed?
I am planning to keep only "ng-bootstarp" 4.0.0.0 and to remove "bootstrap"
Is this fine?
Also let me know the steps to remove "Bootstrap" ?
Can i just go ahead and delete the bootstrap from the ng_module folder or do i need to use any commands?
Don't delete it unless it's causing issues, Bootstrap is intended to be installed alongside ng-bootstrap.
Bootstrap is supposed to be installed when using ng-bootstrap, because ng-bootstrap
relies on Bootstrap's CSS, but it replaces everything else that comes with Bootstrap, as you can see in their dependencies. The CSS is then set in your angular.json or imported into the main styles.css
That said, the non-CSS parts of Bootstrap are unused and could be deleted, but if you're using a package manger, e.g. NPM, this could cause issues when updating and you'll need to repeat this process each update.
As pointed out by #Eliseo, an alternative to using the normal Boostrap with everything included is to use bootstrap-only-css, which can be installed using NPM or Bower, details here. This isn't an official Boostrap distribution as far as I can tell, so keep that in mind.
TLDR: there's no good reason to delete Boostrap.
Angular Material is the official UI framework for Angular, and is maintained (aside from open-source contributors) by Google engineers.
The community is fantastic, the documentation is excellent, and all of the components and utilities are designed to be used with Angular specifically. The source is a case-study in how to write code the Angular way.
It is for the reasons outlined above that I picked AM to be our company’s preferred UI framework.
I haven’t used Bootstrap in a very long time and I would not consider using it in a new project now.

How can I teach Eclipse with AngularJS Plugin to resolve directives and CSS classes in templates

I installed Nodeclipse (which includes the AngularJS Eclipse Plugin) and configured a project to be an AngularJS project, which works fine. In my main HTML file the angular directives and CSS classes are resolved correctly.
But in Angular templates, the validator seems not to be able to resolve anything. I guess it is because no CSS file is linked in the template's HTML (it is only linked in the main HTML file).
Is it possible to teach Eclipse to validate the template files correctly?
If so, how can I achieve this?
Regards
Markus
There is a useful workaround for this that works with the web-resources plugin in eclipse Neon (1.1.0). In the project settings, under "Web resources -> CSS", there is the option to search CSS class and id in all the project's CSS files, if there is no link.
This assumes that your template file has access to every css file in your project, so it is still error prone. However, if you don't keep around orphaned css files, it works very well.

Combine CKEditor into 1 file

Thought I would open this question to the javascript community. Does anyone know if its possible to combine CKEditor into 1 file? I want to try and integrate it in one of my desktop applications which uses a web viewer - I can execute one flat file in my web viewer internally in my application otherwise I'll have to reference to the CDN which I'm hoping to avoid. I want to develop an app that does not require external web service.
Performance should not be an issue as the file would be in my application running locally - I would include all the licenses/readme etc etc.
Is there a tool out there that can help me to achieve this, and has anyone done it or is not possible due to the architecture - the way CKEditor has been written?
Thanks
CKEditor loads some JS files on demand (i.e. dialog definitions). There are also several skin CSS files, sprites with icons and separate langfiles. I hardly think there's any reasonable way to combine all these resources into a working JS bundle without architectural changes.

Foundation Sass, Accordion and Tabs not working

I am having problems with Foundation and the Accordion and Tabs modules. I created my project using the command line compass create <project name> -r zurb-foundation --using foundation and I then customized the style sheet using Sass and the _settings.scss.
Although, I can't get the Accordion and Tabs modules working and I don't understand why. I realized that both foundation.accordion.js and foundation.tab.js files do not come with, in the JS folder when creating a project like I did. I therefore decided to put them myself there from a standard downloading of Foundation but it is still not working. I obviously included the script tags for them at the end my Html page.
Do you guys know if there's any possibility to create a Foundation project using Sass that includes those two modules? I can't use the standard Foundation since I am like customizing everything.
Thanks for your help.
I finally found the answer to my problem. I used to create foundation projects using the command above. Although, I realized it is preferable to create the project using foundation new PROJECT_NAME (NodeJS and Bower are needed). Like this, everything comes along, including the foundation.accordion.js and the foundation.tab.js.
Actually, it is the last version of Foundation that is downloaded and everything works perfectly like this.

Meteor and Bootstrap admin

I would like to use meteor with a bootstrap admin, i.e. a bundle including several bootstrap plugins, script and everything typically made as a kind of framework for developing a web application.
Usually those bundles comes with a lot of dependencies, such as external links for fonts, IE hacks as well as their own shipped file of bootstrap, jQuery and other stuff. If we were in a regular php-like framework it would have been fine.
But in order to make such a template be "native" on meteor, I thought to refactor it in such a way that local dependencies (script and css basically) are stored into folders and not loaded via a <script src="…"></script> tag (otherwise the local path would not be found) but I doubt it is really the best practice, this is why I do consider 3 options:
To use the project/public folder in order to store all the bundle's dependencies (as if it would have been in php for example)
I might refactor the bundle's code by removing any script or style tag aimed to import the js or css into the page and add the corresponding js file aside so that meteor will dynamically load it during at runtime
Like in option 2 but instead of using the bundle's jQuery source files I would install the official jQuery's package for meteor (if existing).
The first (1) option should be the quickest one to get something running but it would not be very meteor native. The advantage however would be to keep the code near to the original one and being able to upgrade once a new version of the bundle would be released.
The 2 other options would be much more elegant (especially the third one) but it would involve a lot of refactoring and induce the risk of introducing bugs I did not expected.
My preference for now is the first option one but I'm afraid of not seing the drawbacks of this approach. Does someone have any experience in importing manually the CSS and JS files the "old fashion way" in meteor ? What is the risk of such an approach compared to using the "place in folder to include" way of meteor ?

Categories