npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

v-form-constructor

v4.1.17

Published

Form Builder

Downloads

640

Readme

Form Constructor

Questo repository serve per modificare, compilare e pubblicare la libreria che si occupa, su MyCity, di gestire il Form Constructor, ossia quel componente per creare le Istanze Online (da backoffice) e compilarle (lato cittadino).

Usare il Form Constructor

Clonare il repository Form-Constructor-PHP nella stessa cartella dove è clonato il repository MyCity-Laravel

Modificare il Form COnstructor

Nella cartella del repository Form-Constructor-PHP, installare le dipendenze con il comando

npm i

Per ricompilare in tempo reale il progetto, usare il comando

npm run dev

Testare il Form Constructor in locale su MyCity

Fuori dalla cartella Form-Constructor-PHP, lanciare il seguente comando

sudo mv MyCity-Laravel/node_modules/v-form-constructor MyCity-Laravel/node_modules/v-form-constructor-old && sudo mkdir MyCity-Laravel/node_modules/v-form-constructor && sudo mount --bind FormConstructor-PHP MyCity-Laravel/node_modules/v-form-constructor

Questo monterà la cartella del Form Constructor nella cartella node_modules/v-form-constructor di MyCity. Se si usano nomi diversi per le cartelle, vanno modificate nel comando!

Ogni volta che si fa una modifica al Form Constructor, bisogna ricompilare anche MyCity (npm run dev o make npm run dev, solito).

Una volta completate le modifiche, si può smontare la cartella e ritornare alla situazione originale con il comando

sudo umount MyCity-Laravel/node_modules/v-form-constructor && sudo rmdir MyCity-Laravel/node_modules/v-form-constructor && sudo mv MyCity-Laravel/node_modules/v-form-constructor-old MyCity-Laravel/node_modules/v-form-constructor

Sempre modificando i nomi delle cartelle con le proprie.

Questo rimuoverà da MyCity le modifiche fatte al Form Constructor, in modo da poterlo testare con le modifiche definitive.

Pubblicare e testare le modifiche

Ritorando al repository del Form Constructor, è importantissimo, prima di compilare e pubblicare le modifiche, cambiare la versione del progetto. Per farlo bisogna

  • Andare sul file package.json
  • Modificare il valore di "version" alle riga 4, aumentando l'ultimo numero (es. 4.1.2 -> 4.1.3)

A questo punto si può compilare la libreria con il comando

npm run build

e pubblicare, infine, le modifiche su npm con il comando

npm publish

La prima volta probabilmente chiederà di effettuare il login a npm per verificare se si hanno i permessi di modificare il repository su npm.

In questo momento si può anche fare il commit delle modifiche su GitHub.

Su MyCity

A questo punto, nel progetto locale di MyCity si può aggiornare il v-form-constructor all'ultima versione appena modificata usando il comando

npm install v-form-constructor

oppure

make npm install v-form-constructor

E verificare che il file package.json abbia la nuova versione del v-form-constructor.

Ricompilare MyCity (npm run dev o make npm run dev) e verificare se funziona tutto correttamente. Pubblicare le modifiche su GitHub.

Verificare le modifiche in staging e mettere in produzione

Per farlo, basta usare gli stessi comandi usati in locale, quindi andare sul server di staging o di produzione e usare i comandi

npm install v-form-constructor

e, infine

npm run prod