I want to change just a single line in an installed cordova plugin.
However, as the plugin is installed via package.json, any edit I do
on the source file does not get saved as the plugin is freshly
installed every time I make a new build of my app.
Is there some way to:
Copy-paste the whole plugin somewhere outside the plugins folder so I can edit without it getting overwritten.
Remove the plugin name from package.json and
Be able to reference the plugin inside my app so I can use the methods provided by the plugin.
Thank You.
You can clone the plugin and make the changes you want locally. Then you can add the plugin using corodova plugin add /path/to/plugin/folder.
Related
I have a `js` file that will use a third party library installed with `npm`. This file will be downloaded to the project when we go to a certain page.
Since the third-party library is used only on this page, I do not want to include it in the project, that is, I want to download it along with the js package. What I need to use for creating a js package which will contain all dependencies? I've been looking all day, but I can't find the solution.
I solved the situation like this: I copied the content of a third-party library and pasted it into a JS file before my code.
It can also be done using a webPacker by this guide
I am making a Cordova app using Framework7 for iOS/Android. I'm trying to add the social sharing plugin and the barcode scanner plugin but the plugin functions can not be called. However when I made a Cordova app with plain HTML and JS (without Framework7) the plugins would work. Is there anything I have to modify on the Framework7 side to enable these Cordova plugins to work?
cordova.js file need not be there in your project root directory. Everytime you do a particular platform build, it gets automatically created in the platform build's project root directory.
For instance, if you build android platform using 'cordova build android' command, the cordova.js file will be generated under 'platforms\android\assets\www' folder. This js file is very much required to use any of the cordova plugins as it is the one which is responsible for triggering 'onDeviceReady' event once the cordova is ready and all plugins are loaded. You can also have a look at the generated file once to get more info on the same. Hope it helps.
I've got an idea folder in my Webstorm project. This is a node app. What do I need to share and why from this folder in source control? What settings should I share and why?
Also, how do I retain all my preferences from project to project? I find that if I create a new project (which I do by simply opening webstorm then opening the folder of code I just cloned down from a repo), I have to reset stuff like the JS version, and a bunch of other stuff in Preferences.
1) You just need to add the source folder to source control.
2) The easiest way to share Webstorm code style setting is using the .editorconfig plugin and adding the file to source control:
https://www.jetbrains.com/webstorm/help/configuring-code-style.html#d649738e184
I am using the accounts-ui package and I have edited:
Meteor._def_template("_loginButtonsLoggedOutSingleLoginButton"
but every time I save my CSS this file regenerates and is overridden. Does anyone know why?
This is the hot code file editing feature. When you edit a file i think (not sure) meteor copies over the raw meteor files back into your project.
To get passed this you need to copy accounts-ui into a a directory called /packages in your project to override the default meteor package.
I have 2 projects. They use same js/img files. When I change js content in first project I should also change it in second project. I wanna make it as dependency. So I deploy changes to my local repository, then goto project1/project2, call update and changes are loaded.
I have tried to use bower but it doesn't satisfy me because of some strange behaviour (it copies whole folder content and ignores main section in component.json)
How can I implement normal dependency managment in my project? note: I need to manage my local dependencies
The main property in component.json is currently only used for other tools using Bower. There is currently a discussion going if Bower should have a .bowerignore file for ignoring files it doesn't need.
You might be better of just using a git submodule or symlinking the files.
Alternatively you could check out if any of the other JS package managers fills your need: npm, Ender, volo, component, jam
Another option (if you just want to fetch single files) might be: pulldown.
Configuration is extremely simple and you can easily add your own files/urls to the list.