Skip to content

Commit

Permalink
Convert project to new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
wyze committed Jul 27, 2019
1 parent 2b2567c commit b5cca6c
Show file tree
Hide file tree
Showing 11 changed files with 1,340 additions and 2,389 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
* text=auto
*.js text eol=lf
*.ts text eol=lf
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.*DS_Store

# Build
themes/*.tmTheme
themes/*.json
*.vsix

# Dependencies
Expand Down
1 change: 0 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ yarn.lock
node_modules/**

# Build
scripts/**
src/**
*.vsix
32 changes: 21 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,37 @@
"themes": [
{
"label": "Hybrid Next",
"path": "./themes/hybrid-next.tmTheme",
"path": "./themes/hybrid-next.json",
"uiTheme": "vs-dark"
},
{
"label": "Hybrid Next (Gray Background)",
"path": "./themes/hybrid-next-graybg.tmTheme",
"path": "./themes/hybrid-next-graybg.json",
"uiTheme": "vs-dark"
}
]
},
"scripts": {
"build": "node scripts/build.js",
"build:watch": "sane 'npm run build' --glob='src/**' --glob='**/build.js'",
"postversion": "vsce publish && vsce package",
"publish": "np --yolo --no-publish",
"version": "write-changelog",
"vscode:prepublish": "npm run build"
"build": "ts-node src/create.ts",
"prebuild": "rm -rf themes/*.json",
"prettier": "prettier --write \"src/*.ts\"",
"postversion": "github-release && vsce publish && vsce package",
"release": "np --yolo --no-publish --no-release-draft",
"version": "changelog",
"vscode:prepublish": "yarn build"
},
"devDependencies": {
"pupa": "^1.0.0",
"sane": "^4.0.1",
"write-changelog": "^1.2.0"
"@types/node": "^12.6.8",
"@wyze/changelog": "^1.0.0",
"@wyze/github-release": "^1.0.0",
"prettier": "^1.18.2",
"ts-node": "^8.3.0",
"typescript": "^3.5.3"
},
"prettier": {
"arrowParens": "always",
"semi": false,
"singleQuote": true,
"trailingComma": "es5"
}
}
79 changes: 0 additions & 79 deletions scripts/build.js

This file was deleted.

20 changes: 20 additions & 0 deletions src/create.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { base, grayBackground } from './themes'
import { writeFileSync } from 'fs'
import createColors from './createColors'
import createTokenColors from './createTokenColors'

const create = (name: string, filename: string, theme: typeof base) => {
const colors = createColors(theme)
const tokenColors = createTokenColors(theme)
const output = {
name,
type: 'dark',
colors,
tokenColors,
}

writeFileSync(`themes/${filename}.json`, JSON.stringify(output, null, 2))
}

create('Hybrid Next', 'hybrid-next', base)
create('Hybrid Next (Gray Background)', 'hybrid-next-graybg', grayBackground)
Loading

0 comments on commit b5cca6c

Please sign in to comment.