Skip to content

Commit

Permalink
Merge pull request #13 from coldenate/less-rewrite
Browse files Browse the repository at this point in the history
Rewrite Repo to conform to a lesscss file; hyper dynamic build steps
  • Loading branch information
coldenate authored Apr 9, 2023
2 parents 01115c0 + 8308ba0 commit 79900b8
Show file tree
Hide file tree
Showing 21 changed files with 771 additions and 1,363 deletions.
71 changes: 32 additions & 39 deletions .github/workflows/archive.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,58 @@
# This is a basic workflow to help you get started with Actions
name: Build and publish release

name: Prepare ZIP Archives

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

# # Allows you to run this workflow manually from the Actions tab
tags:
- 'v*'
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel

jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
build-themes:
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3

# Runs a single command using the runners shell
- name: install zip
run: sudo apt-get install zip

# delete dist folder
- name: delete dist folder
run: rm -rf dist
run: rm -rf themes/dist

- name: fetch latest palette_values.css
run: |
curl -L -o assets/palette_values.css https://unpkg.com/@catppuccin/palette/css/catppuccin.css
cat assets/palette_values.css
- name: install node js 19
uses: actions/setup-node@v1
with:
node-version: '19'

- name: place the palette_values.css (assets) into each theme.css
- name: install dependencies after cd into themes
run: |
for f in frappe latte macchiato mocha; do
sed -i '/\/\* colors \*\//{
r assets/palette_values.css
d
}' $f/theme.css
done
cd themes
npm install
# Runs a set of commands using the runners shell
- name: run the build.js script in the root
run: |
cd themes
node build.js
# Runs a set of commands using the runners shell
# zip -r frappe.zip frappe
# zips each folder in built directly so there is no ghost directory then move it to themes/dist
- name: zip each theme (frappe, latte, macchiato, mocha)
run: |
cd themes
mkdir dist
for f in frappe latte macchiato mocha; do
cp README.md $f
cd $f
zip -r -j ../dist/$f.zip ./*
cd ..
cd built
for theme in frappe latte macchiato mocha; do
zip -r $theme.zip $theme
mv $theme.zip ../dist/
done
- name: upload dist as artifact
uses: actions/upload-artifact@v2
# draft a release then publish the dist as the files
- name: release
uses: softprops/action-gh-release@v1
with:
name: themes
path: dist
draft: true
files: themes/dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
dist
mocha/palette_values.css
assets/palette.css
node_modules
.DS_Store
built
22 changes: 22 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
// create a task that takes in a less css file, and outputs a css file
{
"label": "less",
"type": "shell",
"command": "lessc",
"args": [
"${file}",
"${fileDirname}/${fileBasenameNoExtension}.css"
],
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": []
}
]
}
22 changes: 0 additions & 22 deletions frappe/manifest.json

This file was deleted.

Loading

0 comments on commit 79900b8

Please sign in to comment.