“Make” command for Windows - possible options?

前端 未结 5 567
小蘑菇
小蘑菇 2021-01-02 02:53

I am trying to setup Derby.js for Node on my Windows Machine. According to the Derby.js setup instructions, in order to use coffescript, I must do the following:

<         


        
5条回答
  •  迷失自我
    2021-01-02 03:19

    If you are looking for possible options, I actually have one which will utilize PowerShell. “Make” executes commands in the makefile so that is why I used PowerShell to accomplish similar tasks. However, be warned that I only did this for my Django project. Read below if this interests you and here is the sample:

    1. Created a PowerShell file something like initial.ps1.
    2. Insert contents that you see or expect in the makefile. Here is the example I used for my Django project:

    # Bypass the execution policy (do this if needed)
    Set-ExecutionPolicy RemoteSigned
    
    # Setup variables
    $proj = "proj"
    $app = "app"
    
    # Starting Virtual Environment
    virtualenv $proj
    cd .\$proj
    .\Scripts\activate
    
    # Install project
    pip install --upgrade pip
    pip install django
    
    # Starting app
    django-admin startproject $app
    cd .\$app
    
    # Build the project and the app
    python .\manage.py makemigrations
    python .\manage.py migrate
    python .\manage.py createsuperuser
    
    1. Open CMD and run the ps1.

    This is very handy at least for me so I don’t need to type all those commands over and over when creating new projects. Hope this helps.

提交回复
热议问题