Skip to content

Instantly share code, notes, and snippets.

View kuccello's full-sized avatar

Kristan Krispy Uccello kuccello

View GitHub Profile
@kuccello
kuccello / workspace.json
Created February 18, 2021 01:40
Edit your build styles list
...
build": {
"executor": "@nrwl/web:build",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/apps/my-app",
"index": "apps/my-app/src/index.html",
"main": "apps/my-app/src/main.tsx",
"polyfills": "apps/my-app/src/polyfills.ts",
"tsConfig": "apps/my-app/tsconfig.app.json",
@kuccello
kuccello / styles.css
Created February 18, 2021 01:36
React styles.css for generating the tailwindcss
/* For base styles (check out normalize.css) */
@tailwind base;
/* Simple reusable components provided by tailwind */
@tailwind components;
/* utility classes generated based on our tailwind.config.js */
@tailwind utilities;
@kuccello
kuccello / workspace.json
Created February 18, 2021 01:31
Partial fragment to add to your workspace.json under your appname
...
"build-tailwind-css": {
"builder": "@nrwl/workspace:run-commands",
"outputs": [],
"options": {
"command": "npx tailwindcss-cli@latest build ./src/styles.css -o src/app/tailwind.css",
"cwd": "apps/my-app"
}
}
...
module.exports = {
purge: [],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
import { Injectable } from '@nestjs/common';
import { GqlOptionsFactory, GqlModuleOptions } from '@nestjs/graphql';
import { nexusPrisma } from 'nexus-plugin-prisma'
import {
asNexusMethod,
makeSchema,
mutationType,
objectType,
queryType,
} from '@nexus/schema'
import { Module } from '@nestjs/common';
import { GraphQLModule } from '@nestjs/graphql';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { GraphqlConfigService } from './gql.config'
@Module({
imports: [
GraphQLModule.forRootAsync({
useClass: GraphqlConfigService,
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
generator client {
provider = "prisma-client-js"
{
"version": 2,
"projects": {
"my-api": {
"root": "apps/my-api",
"sourceRoot": "apps/my-api/src",
"projectType": "application",
"prefix": "my-api",
"targets": {
"build": {
"migrate-save": {
"builder": "@nrwl/workspace:run-commands",
"outputs": [],
"options": {
"command": "npx prisma migrate save --experimental --schema ./src/prisma/prisma.schema",
"cwd": "libs/models"
}
},
"migrate-up": {
"builder": "@nrwl/workspace:run-commands",
@kuccello
kuccello / nx-setup-steps-gql-prisma.sh
Last active December 15, 2020 00:51
Steps to create our workspace in Nx
mkdir -p ~/Development/Workspaces
cd ~/Development/Workspaces
npx create-nx-workspace
# Follow steps in CLI menu
# enter a name: eg. my-project
# create a nest app and name it eg. my-app
cd my-project
nx generate @nrwl/node:library data-model