GrapesJS / grapesjs

Free and Open source Web Builder Framework. Next generation tool for building templates without coding
https://grapesjs.com
BSD 3-Clause "New" or "Revised" License
22.38k stars 4.06k forks source link

Add Grapejs to Packagist #97

Closed dedanirungu closed 7 years ago

dedanirungu commented 7 years ago

I am a php developer and I use composer to update my components. I can not find this project on packagist (www.packagist.org)

artf commented 7 years ago

Hi @dedanirungu, GrapesJS is just a front-end library so there is no reason to have it in Packagist if not for some kind of wrappers

dedanirungu commented 7 years ago

Hi @artf We usually use a number of javascript and css files that are hosted on packagist for easy distribution and update. some of this scripts are tinymce, fontawesome, bootstrap etc.

I am about to start working on a project that will use grapejs. How can I receive update files every time you release an update.

chrisbbreuer commented 7 years ago

Why don't you use GitHub? Just pull whatever or all the changes you need. It's super easy and every modern PHP framework I have worked with lets you create a post update script (for example) in which you can pull the changes. There are tons of ways haha

dedanirungu commented 7 years ago

The best thing with packagist is version control. Take the following example.

I have a project that uses grapejs version 0.5. and I want to only pull that version until such a time when I will be able to upgrade to a new version. Let assume grapejs upgrades to version 1.0. and in the process some features and functions are deprecated. With packagist all applications that use 0.5.* will not be affect by the changes and they will have enough time to migrate and update their code to the newer version.

I prefer packagist due to it version control within my application for all dependencies.

To add this project to packagist is an easy process

  1. Open packagist.org
  2. Copy the link https://github.com/artf/grapesjs and past it in submit input box in https://packagist.org/packages/submit
  3. Open the page https://github.com/artf/grapesjs/settings, click the tab "Integration and Service" and and look for button "Add Service"
  4. In "Add Service" List select packagist
  5. Deploy
chrisbbreuer commented 7 years ago

Sure, I know what packagist is and pulling components from there is pretty easy, even though I never would never use packagist to pull components. What you just described can be done just as easily without being on packagist though for the time being it isn't.

dedanirungu commented 7 years ago

Would you please add it for me or anyone who would prefer to control dependency version in similiar way. For example with bootstrap I am able to control the version to be used for the project without worrying about future changes. Currently in all projects I am using version 3 and will only move to version 4 once I complete updating my code.

artf commented 7 years ago

@dedanirungu nothing personal, but Packagist is the "PHP Package Repository" so I just see it somehow wrong. Anyway, I think you can use custom repositories with composer to get what you want:

"require": {
        "php": ">=5.6.4",
        "artf/grapesjs": "dev-master"
    },
"repositories": [{
            "type"    : "package",
            "package" : {
                "name"    : "artf/grapesjs",
                "version" : "dev-master",
                "type"    : "js-library",
                "source"  : {
                    "url"       : "https://github.com/artf/grapesjs.git",
                    "type"      : "git",
                    "reference" : "origin/dev"
                }
     }
}],
dedanirungu commented 7 years ago

Is ok then. but just know even none php project are on packagist and it helps alot. eg bootstrap, fontawesome, jquery, tinymce etc.

You can close the issue.

chrisbbreuer commented 7 years ago

Anything front-end related you should try yarn and webpack. 👍

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.