Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typescript part 2: electric boogaloo #338

Merged
merged 4 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 0 additions & 11 deletions build/props.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import MaskCornerCuts from '../src/props.masks.corner-cuts.js'
import {buildPropsStylesheet} from './to-stylesheet.js'
import {toTokens} from './to-tokens.js'
import {toObject} from './to-object.js'
import {toTypes, preparedTypes} from './to-types.js'
import {toFigmaTokens} from './to-figmatokens.js'

const [,,prefix='',useWhere,customSubject='',filePrefix=''] = process.argv
Expand Down Expand Up @@ -99,16 +98,6 @@ CJS.end(`module.exports = ${JSON.stringify(toObject(), null, 2)}`)
// const UMD = fs.createWriteStream('../dist/open-props.umd.js')
// UMD.end(`module.exports = ${JSON.stringify(toObject(), null, 2)}`)

const TS = fs.createWriteStream('../src/open-props.ts')
TS.end(`export default ${JSON.stringify(toObject(), null, 2)}`)

const TSD = fs.createWriteStream('../dist/open-props.d.ts')
TSD.end(`declare const OpenProps: ${JSON.stringify(toTypes(), null, 2).replaceAll(',',';')};\nexport default OpenProps;`)

preparedTypes().forEach(({filename, json}) => {
let bundle = fs.createWriteStream('../src/props.'+filename+'.d.ts');
bundle.end(`declare const _default: ${JSON.stringify(json, null, 2).replaceAll(',',';')};\nexport default _default;`)
})

// gen prop variants
Object.entries({
Expand Down
66 changes: 0 additions & 66 deletions build/to-types.js

This file was deleted.