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

Does diez support less? #144

Closed
arvinxx opened this issue Nov 17, 2020 · 1 comment
Closed

Does diez support less? #144

arvinxx opened this issue Nov 17, 2020 · 1 comment

Comments

@arvinxx
Copy link

arvinxx commented Nov 17, 2020

I use less mostly.If diez support less ,it will be super great.

@roperzh
Copy link
Member

roperzh commented Dec 1, 2020

Hey @arvinxx, it does not currently but indeed would be great to have. If anyone is interested it should be trivial to support, take a look at:

  1. The Web compiler
    private writeStyleSdk (lang: 'scss' | 'css', tokens: StyleTokens) {
    const template = readFileSync(join(coreWeb, `styles.${lang}.handlebars`)).toString();
    const staticRoot = this.parser.hot ? this.hotStaticRoot : this.staticRoot;
    ensureDirSync(staticRoot);
    writeFileSync(join(staticRoot, `styles.${lang}`), compile(template)(tokens));
    }
    private writeJsonSdk (tokens: any) {
    const staticRoot = this.parser.hot ? this.hotStaticRoot : this.staticRoot;
    ensureDirSync(staticRoot);
    writeJsonSync(join(staticRoot, 'tree.json'), tokens, {spaces: 2});
    }
    writeAssets () {
    super.writeAssets();
    const styleTokens = this.getStyleTokens();
    this.writeStyleSdk('css', styleTokens);
    this.writeStyleSdk('scss', styleTokens);
    this.writeJsonSdk(this.output.serializedTree);
    }
  2. The CSS and SCSS templates.

@arvinxx arvinxx closed this as completed Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants