Skip to content

Instantly share code, notes, and snippets.

@lmartim
lmartim / index.js
Created October 1, 2021 02:23
The export file for rollup
export { default as Button } from './components/Button/Button.vue'
@lmartim
lmartim / lerna.json
Created October 1, 2021 02:45
Lerna config file
{
"packages": [
"dist"
],
"version": "independent"
}
@lmartim
lmartim / vite.config.js
Last active October 1, 2021 03:21
Vite config file on new project
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
css: {
preprocessorOptions: {
scss: {
additionalData: `
@lmartim
lmartim / HelloWorld.vue
Last active October 1, 2021 03:21
File example with component from library
<template>
<section>
<h1>Hello World in New Project</h1>
<Button label="Button Label in New Project" type="primary" size="lg" />
</section>
</template>
<script>
import { defineComponent } from "vue";
@lmartim
lmartim / ScrollRectAutoScroll.cs
Last active March 26, 2025 22:52
Auto scroll vertically a ScrollRect when selecting a component outside the viewport
// https://www.reddit.com/r/Unity3D/comments/1epw3u6/need_some_help_with_scroll_view_auto_scroll/
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class ScrollRectAutoScroll : MonoBehaviour