Giter Site home page Giter Site logo

hansuxdev / compile-hero Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wscats/compile-hero

0.0 1.0 0.0 35.83 MB

🔰Visual Studio Code Extension For Compiling Language

Home Page: https://marketplace.visualstudio.com/items?itemName=Wscats.qf

License: MIT License

TypeScript 33.18% Shell 0.18% CSS 1.24% JavaScript 64.58% HTML 0.56% Vue 0.26%

compile-hero's Introduction

Download Macketplace Github Page Eno Yao

English | 中文

Features

Easily work with less, sass, scss, typescript, jade, pug and jsx files in Visual Studio Code.

1.Please turn on the Compile Hero: On switch when using ↓

Demo

2.Compile on save (ctrl+s) or select Compile File(s) on right-click menu item for less, sass, scss, typescript, jade, pug and jsx files without using a build task.

Demo Demo

3.Beautify on save (alt+shift+f) or select Format Document on right-click menu item for javascript, json, css, sass and html.

Demo

  • Compile less, sass, scss, typescript, jade, pug and jsx on save.
  • Support autoprefixer for less, scss, scss.
  • Support to open html files to preview in browser.
  • minify javascript and css files.
  • Beautify javascript, json, css, sass, and html.
Before Compile After Compile
.pug .html
.jade .html
.scss(sass) .css
.less .css
.ts/.tsx .js(JSX)
.js(ES6) .js(ES5)

Easy to use. When you writing a file, press save ctrl+s to generate the compiled file in the same directory. I hope you can get rid of the constraint of gulp or webpack😁

Extension Settings

Click to open the extension management interface Configure Extension Settings.

Demo

  • You can change the output path of the project compilation directory.
  • Toggle the compile switch of different language.
  • Or disable automatic compilation on save (ctrl+s).
Whether the configuration is automatically compiled after saving(ctrl+s) Default Value
disable-compile-files-on-did-save-code false

Demo

Output Path Configuration Default Value Compile Switch Status Default Value
javascript-output-directory ./dist javascript-output-toggle true
sass-output-directory ./dist sass-output-toggle true
scss-output-directory ./dist scss-output-toggle true
less-output-directory ./dist less-output-toggle true
jade-output-directory ./dist jade-output-toggle true
typescript-output-directory ./dist typescript-output-toggle true
typescriptx-output-directory ./dist typescriptx-output-toggle true
pug-output-directory ./dist pug-output-toggle true
generate-minified-html false
generate-minified-css false
generate-minified-javascript false

Using settings.json

Advanced Extension Settings:

  • Project-wide settings are configured using the standard settings.json file (i.e. Workspace Settings).
  • settings.json must exist in the .vscode directory at the root level of your project.
  • Alternatively, settings can go in User Settings for global defaults.
  • Use the compile-hero key.

Here Example settings.json file:

{
  "compile-hero": {
    "disable-compile-files-on-did-save-code": false,
    "javascript-output-directory": "./out",
    "javascript-output-toggle": false,
    "sass-output-directory": "./out",
    "sass-output-toggle": true
  }
}

Using tsconfig.json

If you want to add or overwrite certain settings in the tsconfig.json file, you can create a new tsconfig.json in the same directory of your .ts file.

Here Example tsconfig.json file:

{
  "compilerOptions": {
    "alwaysStrict": true,
    "importHelpers": false
  }
}

Open In Browser

Right click the html file in the directory menu, and the open in browser option will appear. You can preview the page in the browser.

Demo

Compile File Menu Item

Sometimes you may not need to automatically compile the file every time you save the file, at this time you can disable the automatic compilation. And use the Compile File(s) menu item to replace.

Demo

Close Port Command(MAC)

At some point, you may be using ports for some services. You can use the Close Port command to close, but now only supported on mac.

Demo

Thanks


Eno Yao

Aaron Xie

DK Lan

Yong

Li Ting

Xin

Lemon

Jing

Lin

Tian Fly

If you enjoy front end, you should have it! Xie, Yao, Yong, Ting, Jing, Lin, Tian, Xin, Xia, DK and Lemon, thanks to my team for their efforts ~ Waiting for you in our heart!

If you think it's useful, you can leave us a message and like it, Your support is our driving force😀

License

Compile Hero is released under the MIT.

compile-hero's People

Contributors

dependabot[bot] avatar wscats avatar yaoone avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.