How to test composer package in developpement, like for symfony packages - symfony

i am wondering how the contributions on framework like symfony or laravel works.
For example if i clone the symfony repository i'll have the src folder that create the package. And when this package is used there is other folder like in the symfony skeleton.
So how is it possible to develop and test the code without publishing the package ?

You can write tests for the package code and also install the package from your local directory to kind of do the integration testing. Also you can run composer require symfony/package:dev-master#<commit hash> to install specific commit package version.
This is answer would be helpful: https://stackoverflow.com/a/29995226/4620016

Related

How to Disable download missing package each time in meteor?

I tried to create meteor web application, but meteor download missing package each time when I change my code, and it was unnecessary.
So, can I config it only runs at the first time?
Thanks!
Could you add the actual message on the package it tries to download? Anyway, there are two potential locations where meteor looks for packages that need to be installed.
This is which each Meteor application and it's using Meteor Atmosphere packages. You can find these at .meteor folder in your project root file called packages path ./meteor/packages
Other potential place is packages.json in project root. It exists if you have used npm install or meteor npm install within the project.
Deleting unnecessary packages from these files should do the trick.

WP-CLI installation over composer

I'm working on a wordpress skeleton for practice. I've got a Composer project and installed the wp-cli/wp-cli dependency.
I want to create and run custom tasks with this wp-cli, for example to download the core of WordPress into this project. This because I'm not putting the core of wordpress into my git repository.
Because I have installed the wp-cli/wp-cli dependency only in my project and not globally over my local machine, I can't run the wp ... commands a normal terminal.
For my own research, I found out that I can use the Command Line Tool Support plugin in my IntelliJ IDE. With this plugin I can use the composer dependency to run commands with the wp-cli. I don't think this is the right solution, because everyone might have a different IDE and/or operating system.
How can I run wp-cli commands over the installation over Composer?
Instead of running commands with /vendor/bin/wp ..... I found out I have to replace the / with a \.
To run commands from this binary, this syntax should be used like:
vendor\bin\wp ...

Customizing Meteor Package useraccounts:materialize

I'm currently trying to use the useraccounts:materialize package from Atmosphere; however, I do not know how to customize the HTML and CSS of it.
Is there any way of doing this?
Follow these steps :
Fork/Clone this repo
Make the required changes to the html and css files in the directory /lib
Publish your package to atmosphere and use that if you want to make it public OR use this as a local package.
Read about publishing to atmospherejs here and about using it as a local package by placing the package under packages folder in root and running the command meteor add usrname:packagename

Meteor packages -- how does it work?

I downloaded a Meteor Starter project called MeteorAdmin.
In the root of its directory tree, you find a packages directory that contains few packages (boostrap, comments, few others) and also, in the .meteor directory there's a file called packages that defines the dependencies of this project.
What is the difference between them? What I found interesting is that .meteor/packages contains bootstrap as well. In theory shouldn't that be enough so that bootstrap would get downloaded to the project?
The meteor packages file simply lists all of the apps dependencies as well as the load order of each (top to bottom). You can edit this file if you know what you are doing, but it's probably better to leave it alone until you are more familiar with Meteor.
The way you add packages is by typing meteor add <package-name> in your terminal and then it will be added to your project. Additionally, the name of the package will be added to the bottom of your packages file.
A meteor app can have local packages that are defined in the packages folder of the root directory. This project likely is implementing it's own bootstrap package and then added it with the meteor command I listed above. Once a local package is added to your project with the meteor add command it's package name will appear in the packages file just like packages from Atmosphere. I hope that answers your question... Let me know if you were looking for something more specific.

How to re-use an already installed package in Meteor?

I installed couple of packages for 'Project A' (e.g bootstrap) assuming that it will be available for all subsequent projects. But when a new meteor project 'Project B' was created, meteor list showed only default packages. So my assumption that meteor packages are like ruby gems available globally is incorrect. As I work offline every now and then, Is there a way I can manually copy/re-use installed packages?
Yes they are similar to gems. Packages are installed in ~/.meteor/packages, in precompiled form. They can be installed globally this way.
When you add a package to your project it will essentially copy the package from there into your build-cache directory hidden in the .meteor directory of your project.
To install a package locally where you can easily re-use it you would have to clone the github repository of the package and place the output in the /packages directory of your Meteor app.
For example for bootstrap, twbs:bootstrap you would clone this reposistory: https://github.com/twbs/bootstrap, into a directory like /packages/twbs:bootstrap (name doesn't matter if its defined in the package.js file on the repository.
In general you can easily re-use a package without the hassle of adding it in manually like so. It's better to use the global packages which are kept up to date.
The trouble comes with being offline. If you use a local package its nearly guaranteed to always work. Whereas the global ones can give a bit of trouble once in a while when you try to add a package in as meteor tries to check the package is up to date, especially where npm packages are involved with the package.
To keep it short if you added a package in using meteor add twbs:bootstrap you should most likely be able to add it to another project using the same command. Only if you keep your packages & meteor up to date.

Resources