HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Stuck in the build process

I am new to vanilla.

I am trying to install this software and I wanted to create a new theme but I think I'm stuck in the build process.

This what I did based on the instructions I read on Vanilla CLI page:


Installing Vanilla

1. Download: "composer"

2. run in COMMAND LINE: composer global require 'vanilla/vanilla-cli

3. Download and install: Node.js

4. Download and install: yarn.

5. run in COMMAND LINE: yarn add @vanillaforums/theme-boilerplate

6. create your theme folder

7. cd <your theme>

8. run in COMMAND LINE: yarn run boilerplate-install my-custom-theme "My Custom Theme" 

9. run in COMMAND LINE: vanilla build (This is not working in my part because I can't see how to add/fix the vanillacli_vanilla_src_dir)

Can someone help me in fixing this last part?

Comments

  • R_JR_J Ex-Fanboy Munich Admin

    Add the vanilla installation folder to the commandline like that: vanilla built --vanillasrc=...

  • R_JR_J Ex-Fanboy Munich Admin

    You certainly have to replace the "..." with the absolute path you have installed your forum in

  • charrondevcharrondev Developer Lead (PHP, JS) Montreal Vanilla Staff

    Another alternative is to set a VANILLA_CLI_SRC_DIRECTORY as an environmental variable.

    At this point I think the need for that variable is not necessary for the vanilla build command to function properly, although it is necessary for the rest of the CLI. Development of the tool was mostly frozen right now, as we've been starting work on a new base theme that builds with vanilla itself. That's taking longer than expected though, so I'll take a look this weekend and see if I can clean this up a bit. Ideally it would just come down along with theme-boilerplate .

  • I installed it under xamp/htdocs/vanilla directory. Should I add the absolute path?

  • I see.

    How/where can I add the VANILLACLISRC_DIRECTORY? What file should I edit? Sorry about my question I really have no idea on this. I’ve been trying to fix this for 2 days now and I cant find any solutions.

  • R_JR_J Ex-Fanboy Munich Admin

    I have created the file /etc/profile.d/90_vanilla.sh with the following content:

    export VANILLACLI_VANILLA_SRC_DIR=/usr/share/nginx/html/vanilla
    

    The environment variable name charrondev gave might be for some other of the official tools or for another version than mine. The above environment variable name works for me.

    You certainly have to use /xamp/htdocs/vanilla as the path

  • charrondevcharrondev Developer Lead (PHP, JS) Montreal Vanilla Staff
    edited August 2019

    Sorry you guys. This rich editor bug busting up the the underscore got me on this. The proper invocations

    # In bash profile or script before calling calling vanilla build
    export VANILLACLI_VANILLA_SRC_DIR=/some/path/to/vanilla
    
    vanilla build # Usage doesn't require anything else if the ENV var is properly exported in the current shell session.
    
    # Inline 
    VANILLACLI_VANILLA_SRC_DIR=/some/path/to/vanilla vanilla build
    
    # As a param
    vanilla build --vanillasrc=/some/path/to/vanilla
    
  • Hi @charrondev,

    I tried running the following in the command line but it gives same error.

    vanilla build --vanillasrc=c:/xampp/htdocs/vanilla

    vanilla build --vanillasrc=/c:/xampp/htdocs/vanilla

    vanilla build --vanillasrc=/xampp/htdocs/vanilla


    Also, I tried editing the file: environment.php and added this line but it gives me error.

    Can you show me wha specific file should I edit?

    export VANILLACLI_VANILLA_SRC_DIR=C:\xampp\htdocs\vanilla;

  • charrondevcharrondev Developer Lead (PHP, JS) Montreal Vanilla Staff

    Oh, you're on windows. My apologies. I'm not really sure as I haven't used it much myself. I've only ever worked with unix/unix-like systems. Eg. Linux, MacOS, windows subsystem for linux.

  • R_JR_J Ex-Fanboy Munich Admin

    Use set instead of export in the same shell. Exchange the slash with a backslash

  • Thanks for the help guys. I really appreciate it. Though I still can't do it right, I've decided to just use the other way of compiling sass files using Compass.

    Cheers and more power vanilla team!

Sign In or Register to comment.