import Build from './Build' ; import { IBuildInsomnia } from './types' ; export default class BuildInsomnia extends Build implements IBuildInsomnia { method createVariants ( ) { this . theme . final [ `${ this . theme . stage . variant }.${ this . settings . fileType }` ] = this . theme . stage ; return 'created' ; } function param theme merge ( theme ) { this . theme . stage = theme ; this . setColors ( ) . createVariants ( ) ; } method stage ( ) { this . listThemes . forEach ( themeName => { this . merge ( { ... this . getFile ( `${ this . rootDir . themes }/common/base.json` ) , ... this . getFile ( `${ this . rootDir . themes }/${ themeName }` ) , } ) ; } ) ; } method compile ( ) { this . stage ( ) ; if ( this . theme . final ) { Object . entries ( this . theme . final ) . map ( ( [ name , theme ] ) => this . createFile ( { path : this . rootDir . build , file : theme , fileName : name , } ) ) ; } return 'done' ; } }