Skip to content

Instantly share code, notes, and snippets.

View Dragod's full-sized avatar
🎲
Ma le spegnene?

Fabio Dragod

🎲
Ma le spegnene?
View GitHub Profile
@Dragod
Dragod / clean&build.bat
Last active July 24, 2019 09:48
Clean and Build unity with msbuild tools 2019, run IISExpress and open localhost on firefox. If it doesn't work please check folders path inside the batch. Visual Studio is not required to run this.
@ECHO OFF
CD /D "C:\gitrepos\sd-unity-4-0"
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\Common7\Tools\VsDevCmd.bat"
msbuild htmlUnity.sln /t:clean
call "msbuild"
start firefox -devTools http://localhost:49797/index.aspx
CD /D "C:\Program Files (x86)\IIS Express"
iisexpress /path:C:\gitrepos\sd-unity-4-0\ /port:49797 /clr:v4.0
CMD
@Dragod
Dragod / npmvsbuild.js
Created August 20, 2019 11:16
Run vsbuild trough npm using msbuild package
var _msbuild = require('msbuild');
var msbuild = new _msbuild();
msbuild.sourcePath = 'c:/gitrepos/sd-unity-4-0/htmlUnity.sln';
msbuild.config('version','16.0')
msbuild.build();
@Dragod
Dragod / core-colors-variant.sh
Created February 21, 2020 15:52
Add a check to build default skin
#!/usr/bin/env bash
# Sass build only skin colors
# Use: type "colors" in bash console, or npm run colors,
# make sure eithe .bashrc or npm scripts are set up for this to work
# No Color
white='\e[1;37m'
@Dragod
Dragod / Windows terminal assets folder.txt
Last active December 4, 2020 09:32
Windows terminal assets folder
C:\Users\fabio\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\RoamingState
@Dragod
Dragod / build-skin.js
Last active December 4, 2020 09:30
node build unity skin
// Script to build unity skins via node
const execSync = require('child_process').execSync;
// Default value `amazon-site-lite` if no args provided via CLI.
const skin = process.argv[2] || 'amazon-site-lite';
// Run the node-sass
execSync('node-sass sass/skins/' + skin + '/' + skin + '.scss > assets/' + skin + '/css/' + skin + '.css', { stdio: [0, 1, 2] });
@Dragod
Dragod / package.json
Created December 4, 2020 09:35
package.json settings for npm build
"sass": "node-sass sass/app.scss --source-map-root --source-map-embed true",
"css:core": "npm run sass -s | exorcist css/app.css.map > css/app.css && npx postcss css/app.css -r",
"css:skin": "node build-skin"
@Dragod
Dragod / build-skin.js
Created January 7, 2021 10:11
build-skin with node
// Script to build unity skins via nodejs and override main.css with current skin.
// Need execSync to execute command in nodejs.
const execSync = require('child_process').execSync;
// Default value `amazon-site-lite` if no args provided via CLI.
const skin = process.argv[2] || 'amazon-site-lite';
// Work with file system.
const fs = require('fs');
@Dragod
Dragod / build.js
Last active January 7, 2021 10:13
Node build
const execSync = require('child_process').execSync;
let prompt = require('prompt'),
optimist = require('optimist')
sass = "node-sass --source-map true"
function getBuild(type) {
let map =
{
"core": `${sass} sass/app.scss css/app.css && npx postcss css/app.css -r`,
"admin": `${sass} sass/skins/admin/admin.scss admin/css/admin.css && npx postcss admin/css/admin.css -r`,
@Dragod
Dragod / linters-command.md
Last active January 11, 2021 16:40
Linters commands
npx stylelint "sass/**/*.{css,scss,sass}"
npx html-linter --config ./html-linter.json templates/**/*.htm
@Dragod
Dragod / .bashrc
Created February 2, 2021 07:47
.bashrc to run node build on unity
green='\e[32m'
blue='\e[34m'
clear='\e[0m'
#Green
GREEN=`tput setaf 2`
# Red