Giter Club home page Giter Club logo

alurkerja-tools's Introduction

alurkerja-tools

Alurkerjatools

cli command yang di gunakan untuk membuat scaffonding sebuah aplikasi dengan command npx alurkerja-tools crud --template {{template yang di gunakan / ada di fol}} apabila terdapat parameter di param npx alurkerja-tools crud --template {{template yang di gunakan / ada di fol}} --param1=valueparam1

untuk parameter dengan key specPath contoh value nya api/bpmn/cuti, jika menggunakan /api/bpmn/cuti hasilnya akan error

Cara Pembuatan template

Pada folder bin/template terdapat beberapa folder template yang bisa di gunakan bisa di lihat di bawah ini: image

menjalankan command dilocal akan mengambil template dari C:\Users\ASUS\alurkerja-tools\bin\template (windows)

Untuk membuat template baru silahkan tambahkan folder baru dengan context yang sesuai dengan template yang akan kita gunakan setelah itu buatlah file conf.json dengan isi kurang lebih seperti di bawah ini

{
  "parameter": ["Crud", "module"],
  "method": "copyMethod",
  "scaffond_config": {
    "controller": {
      "from": "controller",
      "to": "./resources/js/components/Crud/Api/controller"
    },
    "service": {
      "from": "service",
      "to": "./resources/js/components/Crud/Api/service"
    }
  },
  "after_generate_message": "Oke siap ,  wes ta generatein crudne {{Crud}} di module {{module}}"
}

Penjelasan

pada file conf.json terdapat beberapa object yaitu

  1. Parameter Parameter yang di gunakan untuk mengeksekusi command dari template yang sudah di definisikan sehingga user akan diberikan informasi terkait dengan parameter required yang sudah di definisikan di parameter

  2. method method/ metode yang di gunakan method ini di daftarkan pada folder method yang berisi file js

  3. scaffold_config

Parameter config berisi object dari operasi yang di buat , contoh controller akan mengeksekusi copy dari field from ke field to

6.after_generate_message

Message yang akan dimunculkan ketika command selesai di exsekusi bertujuan untuk memberikan informasi

alurkerja-tools's People

Contributors

flashdin avatar purwadarozatun avatar shaddamalbz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.