Giter Site home page Giter Site logo

wscats / compile-hero Goto Github PK

View Code? Open in Web Editor NEW
253.0 26.0 59.0 36.59 MB

🔰Visual Studio Code Extension For Compiling Language

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

License: MIT License

TypeScript 49.70% Shell 0.12% JavaScript 45.59% HTML 0.91% Vue 0.17% Less 1.08% Sass 0.22% SCSS 1.09% Pug 0.14% Stylus 0.98%
automatic evaluation gulp compile sass less jade typescript javascript jsx

compile-hero's Introduction

Github Page Eno Yao badge version badge install

English | 中文

Features

1.Open the less, sass, scss, styl, ts, tsx, jade, pug or js file.

2.Compile Hero: On/Off will appear in the status bar at the bottom right corner, please turn on the Compile Hero: On switch when using ↓

11

3.Compile on save (ctrl+s)

Or select Compile Files on right-click menu item, it will automatically compile the files to the dist directory.

1 3

You can also select part of the code and use the Compile Selected menu item or shortcut key (ctrl+shift+s) to perform partial compilation of the code block.

10

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

8

  • Compile less, sass, scss, stylus, typescript, typescriptreact, jade, pug and javascript 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
.styl .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.

5

  • 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

7

Switch to control the notification Default Value
notification-toggle true
Switch to control compilation and formatting of specific files Default Value
ignore null
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
stylus-output-directory ./dist stylus-output-toggle true
generate-minified-html false generate-minified-html-only false
generate-minified-css false generate-minified-css-only false
generate-minified-javascript false generate-minified-javascript-only 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.
  • Prohibit partial compilation and formatting of specific files compile-hero.ignore.
  • Use compile-hero.watch to monitor partial files - You can turn this on -> Compile Hero: On when using.

Here Example settings.json file:

{
  "compile-hero": {
    "disable-compile-files-on-did-save-code": false,
    "notification-toggle": false,
    "javascript-output-directory": "./out",
    "javascript-output-toggle": false,
    "sass-output-directory": "./out",
    "sass-output-toggle": true,
    "ignore": ["src/test.js", "*/test.scss", "**/spec/*", "**/src/**/*"],
    "watch": ["sass/test.sass", "**/less/**/*"]
  }
}

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.

2

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.

6

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.

4

Thanks

👪 Tencent Alloyteam Team And Qian Feng Team:


Eno Yao

Aaron Xie

DK Lan

Yong

Li Ting

Xin

Lemon

Jing

Lin

Tian Fly

If you think it's useful, hope 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

cssho avatar dependabot[bot] avatar hakantr avatar wscats avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

compile-hero's Issues

Extension issue

  • Issue Type: Bug
  • Extension Name: eno
  • Extension Version: 2.3.10
  • OS Version: Windows_NT x64 10.0.18363
  • VSCode version: 1.48.2

⚠️ We have written the needed data into your clipboard. Please paste! ⚠️

settings option to change generated Pug file extension from .html to .tpl or something else

Unfortunately, compiling a pug file always becomes file.html

I need it to become file.tpl and in another project: file.php (that is because the pug contains php and ideally needs the correct file ext)

Would be great to have this option (changing the extension).
https://github.com/Wscats/compile-hero/blob/master/vscode-extension/src/extension.ts#L183

Like using: https://github.com/pugjs/pug-cli
option: -E, --extension <ext> specify the output file extension

Using SASS syntax doesn't work but SCSS works

I have this sample SASS code

// my_file.sass

.container
    color: white

When I save it, the extension returns this error message:

Invalid CSS after ".": expected 1 selector or at-rule was ".container"

However, when I use SCSS syntax in a SASS file, it compiles:

// my_file.sass

.container {
    color: white;
}

Here's my setting:

    "compile-hero.pug-output-directory": "./html",
    "compile-hero.sass-output-directory": "./css",
    "compile-hero.less-output-toggle": false,
    "compile-hero.jade-output-toggle": false,
    "compile-hero.typescript-output-toggle": false,
    "compile-hero.scss-output-toggle": false,
    "compile-hero.javascript-output-toggle": false,

Can you please check? Thank you...

Sass @use rule doesn't compile with additional Scss files

Hello Compile-Hero

When using the SASS / SCSS compile feature, it doesn't compile the added files when using the @use rule.

theme.scss

/*************************** Import Bootstrap  *****************************/
@use '../lib/bootstrap/scss/bootstrap.scss';

/*************************** Theme Styles Section ****************************/
@use 'theme/styles.scss';

/*************************** Theme Colours****************************/
// Define theme colour scheme
$theme-color-primary: #f65f34;
$theme-color-secondary: #E06167;

$theme-text-color-primary: #252930;
$theme-text-color-secondary: lighten($theme-text-color-primary, 25%);
$theme-text-color-light: lighten($theme-text-color-primary, 50%);
...

Compiles To

theme.css

/*************************** Import Bootstrap  *****************************/
@use '../lib/bootstrap/scss/bootstrap.scss';
/*************************** Theme Styles Section ****************************/
@use 'theme/styles.scss';
/*************************** Theme Colours****************************/
/*************************** Variables Section. *****************************/

Hero does not seem to use all options of tsconfig.json

The compilation of *.ts files always inserts the following block in the resulting JavaScript files:

var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();

Using the tsc command in the same folder respects the tsconfig.json and is not inserting this block. How can I stop Hero from doing so?

I'm concatenating my files later by my own. I don't want to install tsc on a production system to solve this. The software is modular, so I'll only ship the precompiled files and combine them later (depending on what is really needed).

Extension issue

  • Issue Type: Bug
  • Extension Name: eno
  • Extension Version: 2.3.2
  • OS Version: Windows_NT x64 10.0.19042
  • VSCode version: 1.48.0

⚠️ We have written the needed data into your clipboard. Please paste! ⚠️

documentation on a per project config

Configure Extension Settings on a User seems to be globally.

Means: Turning the options off in he User settings, and trying to enable them for a specific project, won't work - it stays off. But in my case, it should generally be turned off and enabled on a per project basis.

Could you add to the documentation a way to activate the plugin and setting the config for a project only?

a workaround is to manually create the .vscode/settings.json
the toggle keys would not show up if set to enable - thus would be missing and be turned off by the user settings.

{
    "compile-hero.jade-output-directory": "../../www",
    "compile-hero.less-output-directory": "../../www/css",
    "compile-hero.pug-output-directory": "../../www",
    "compile-hero.sass-output-directory": "../../www/css",
    "compile-hero.typescript-output-directory": "../../www/js",
    "compile-hero.typescriptx-output-directory": "../../www/js",
    "compile-hero.javascript-output-directory": "../../www/js",
    "compile-hero.jade-output-toggle": true,
    "compile-hero.javascript-output-toggle": true,
    "compile-hero.less-output-toggle": true,
    "compile-hero.pug-output-toggle": true,
    "compile-hero.sass-output-toggle": true,
    "compile-hero.typescript-output-toggle": true,
    "compile-hero.typescriptx-output-toggle": true
}

Extension issue

  • Issue Type: Bug
  • Extension Name: eno
  • Extension Version: 2.3.2
  • OS Version: Linux x64 5.4.0-42-generic
  • VSCode version: 1.47.2
{
	"messages": [],
	"activationTimes": {
		"codeLoadingTime": 21120,
		"activateCallTime": 1,
		"activateResolvedTime": 269,
		"activationReason": {
			"startup": true,
			"extensionId": {
				"value": "Wscats.eno",
				"_lower": "wscats.eno"
			},
			"activationEvent": "*"
		}
	},
	"runtimeErrors": []
}

Can't save files on ftp

When I trying saving scss on ftp, I get an error "extension host terminated unexpectedly"

Indentation in PHP/HTML

I use Formatters Hero only for indenting HTML and PHP. Any way to change formatting preferences?

Current formatting style:

Image

My preferred way (with 2 point indentation):

Image

Tips?

Breaking bug: extension host closed unexpected due to *.less syntax error

A syntax error and alike in my main.less is never shown to any VSCode console, but crashes the extension host. The vscode's internal developer console shows a lot of red.

VSCode v.1.43.2
Sass/Less/Typescript/Jade/Pug Compile Hero wscats.qf: v6.8.47

settings.json: disabled everything except for less + pug. (the toggle options set to false)

    "compile-hero.jade-output-toggle": false,
    "compile-hero.javascript-output-toggle": true,
    "compile-hero.less-output-toggle": true,
    "compile-hero.pug-output-toggle": true,
    "compile-hero.sass-output-toggle": false,
    "compile-hero.typescript-output-toggle": false,
    "compile-hero.typescriptx-output-toggle": false,

complete error info:

Extension host terminated unexpectedly. Code:  7  Signal:  null
_onExtensionHostCrashed @ abstractExtensionService.ts:155
_onExtensionHostCrashed @ extensionService.ts:379
_onExtensionHostCrashOrExit @ abstractExtensionService.ts:147
(anonymous) @ abstractExtensionService.ts:137
fire @ event.ts:587
_onExtHostProcessExit @ extensionHost.ts:482
(anonymous) @ extensionHost.ts:227
emit @ events.js:203
ChildProcess._handle.onexit @ internal/child_process.js:272


Extension Host >
extensionHost.ts:212 c:\Users\nabil\.vscode\extensions\wscats.qf-6.8.47\out\sass\sass.sync.js:61
var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=false;var ENVIRONMENT_IS_WORKER=false;var ENVIRONMENT_IS_NODE=false;var ENVIRONMENT_IS_SHELL=false;if(Module["ENVIRONMENT"]){if(Module["ENVIRONMENT"]==="WEB"){ENVIRONMENT_IS_WEB=true}else if(Module["ENVIRONMENT"]==="WORKER"){ENVIRONMENT_IS_WORKER=true}else if(Module["ENVIRONMENT"]==="NODE"){ENVIRONMENT_IS_NODE=true}else if(Module["ENVIRONMENT"]==="SHELL"){ENVIRONMENT_IS_SHELL=true}else{throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.")}}else{ENVIRONMENT_IS_WEB=typeof window==="object";ENVIRONMENT_IS_WORKER=typeof importScripts==="function";ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;ENVIRO

[TypeError: Cannot read property '0' of undefined
	at hackType (c:\Users\nabil\.vscode\extensions\wscats.qf-6.8.47\node_modules\clean-css\lib\properties\wrap-for-optimizing.js:44:26)
	at wrapSingle (c:\Users\nabil\.vscode\extensions\wscats.qf-6.8.47\node_modules\clean-css\lib\properties\wrap-for-optimizing.js:91:19)
	at wrapAll (c:\Users\nabil\.vscode\extensions\wscats.qf-6.8.47\node_modules\clean-css\lib\properties\wrap-for-optimizing.js:17:18)
	at optimizeBody (c:\Users\nabil\.vscode\extensions\wscats.qf-6.8.47\node_modules\clean-css\lib\selectors\simple.js:297:21)
	at optimize (c:\Users\nabil\.vscode\extensions\wscats.qf-6.8.47\node_modules\clean-css\lib\selectors\simple.js:420:9)
	at optimize (c:\Users\nabil\.vscode\extensions\wscats.qf-6.8.47\node_modules\clean-css\lib\selectors\simple.js:425:9)
	at minify (c:\Users\nabil\.vscode\extensions\wscats.qf-6.8.47\node_modules\clean-css\lib\clean.js:225:3)
	at whenSourceMapReady (c:\Users\nabil\.vscode\extensions\wscats.qf-6.8.47\node_modules\clean-css\lib\clean.js:135:7)
	at Object.whenDone (c:\Users\nabil\.vscode\extensions\wscats.qf-6.8.47\node_modules\clean-css\lib\clean.js:155:14)
	at processNext (c:\Users\nabil\.vscode\extensions\wscats.qf-6.8.47\node_modules\clean-css\lib\imports\inliner.js:105:13)
	at importFrom (c:\Users\nabil\.vscode\extensions\wscats.qf-6.8.47\node_modules\clean-css\lib\imports\inliner.js:79:10)
	at ImportInliner.process (c:\Users\nabil\.vscode\extensions\wscats.qf-6.8.47\node_modules\clean-css\lib\imports\inliner.js:38:10)
	at c:\Users\nabil\.vscode\extensions\wscats.qf-6.8.47\node_modules\clean-css\lib\clean.js:120:41
	at processTicksAndRejections (internal/process/task_queues.js:75:11)]

TEST IT:
test.less

div {
  font-size: 1.em; // 1.0em would be correct
}

Puts new line after < and {

Today after updating my Mac OS and VSCode, my VSCode starts adding newline after open < and {. After disabling/enabling all the extensions I have. I found it's related to compile-hero.

<
    div className = "event-form" >
<
    div className = "event-form-header" >
<
    h4 > {
            userName
        }
        's event</h4> <
        hr className = "event-form__hr" / >
<
    /div> 

I am not sure what happened. I did not change any setting at all. Is there anyway to disable it?

Extension issue

  • Issue Type: Bug
  • Extension Name: eno
  • Extension Version: 2.3.15
  • OS Version: Windows_NT x64 6.1.7601
  • VSCode version: 1.48.2

⚠️ We have written the needed data into your clipboard. Please paste! ⚠️

Extension issue

  • Issue Type: Bug
  • Extension Name: eno
  • Extension Version: 2.3.2
  • OS Version: Windows_NT x64 10.0.20161
  • VSCode version: 1.46.1

⚠️ We have written the needed data into your clipboard. Please paste! ⚠️

Press Ctrl+s and no css file is generated

visual studio code:

Version: 1.47.2 (system setup)
Commit: 17299e413d5590b14ab0340ea477cdd86ff13daf
Date: 2020-07-15T18:22:06.216Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.17763

Feature: Output errors/Success

I do like having having the complete ✔in the status bar, we need a error ❌ too.

Ideally I would like a OUTPUT on error that gives a report would be sweat feature

Do Sass partials (_variables.scss) work?

I created a Sass partial file called '_variables.scss' that holds the variables.

In my main scss file at the top I use

@import "variables";

When I save the _variables.scss file, Compile Hero creates a new css file called "_variables.css". When I save the main css file, I get this error:

 File to import not found or unreadable: variables.
 Parent style sheet: stdin

It should transpile the variables within the main. It should result in one main file.

I thought the underscore partial syntax was general to all sass compilers. Is it not?

Extension issue

  • Issue Type: Bug
  • Extension Name: eno
  • Extension Version: 2.3.2
  • OS Version: Darwin x64 17.7.0
  • VSCode version: 1.47.3
{
	"messages": [],
	"activationTimes": {
		"codeLoadingTime": 9279,
		"activateCallTime": 1,
		"activateResolvedTime": 0,
		"activationReason": {
			"startup": true,
			"extensionId": {
				"value": "Wscats.eno",
				"_lower": "wscats.eno"
			},
			"activationEvent": "*"
		}
	},
	"runtimeErrors": []
}

Extension Unresponsive issue

  • Issue Type: Bug
  • Extension Name: eno
  • Extension Version: 2.3.2
  • OS Version: Windows_NT x64 10.0.18363
  • VSCode version: 1.47.3

⚠️ We have written the needed data into your clipboard. Please paste! ⚠️ ```json
{
"messages": [],
"activationTimes": {
"codeLoadingTime": 61122,
"activateCallTime": 1,
"activateResolvedTime": 29,
"activationReason": {
"startup": true,
"extensionId": {
"value": "Wscats.eno",
"_lower": "wscats.eno"
},
"activationEvent": "*"
}
},
"runtimeErrors": []
}

use project's tsconfig.json file

It looks like that compile hero is using strict compilation. I have configured my project to do not use it. Is compile hero using some defaults? Can they be changed? Thanks for your help and grate job 👍

Extension issue

  • Issue Type: Bug
  • Extension Name: eno
  • Extension Version: 2.3.2
  • OS Version: Windows_NT x64 10.0.17763
  • VSCode version: 1.47.3

⚠️ We have written the needed data into your clipboard. Please paste! ⚠️

VSCODE 1.4.7 & Version: 2.3.2 Error

Using VSCODE and Express and Pug. I appear to be getting the following error notification on a save of valid PUG code:

c:\Users\Sam\Documents\Sam_tech\VSCode\myExpressApp\views\error.pug:5
3| block content
4| h1= message
5| h2= error.status
6| pre #{error.stack}

Cannot read property 'status' of undefined

This is the entire error.pug file:
extends layout

block content
h1= message
h2= error.status
pre #{error.stack}

VSCODE: Version: 1.47.0 (user setup)
Commit: d5e9aa0227e057a60c82568bf31c04730dc15dcd
Date: 2020-07-09T08:02:06.629Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18362

Name: Sass/Less/Scss/Typescript/Javascript/Jade/Pug Compile Hero Pro
Id: wscats.eno
Description: 🚀Easy to compile ts, tsx, scss, less, jade, pug and es6+ on save without using a build task.
Version: 2.3.2
Publisher: Eno Yao
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=Wscats.eno

Browser in option "Open In Browser"

I wanted to use the option to open a HTML file in browser. It took my chrome Browser by default, but I acutally have another browser set as my default Browser that I want to use. I uninstalled Chrome and now I get an error chat "chrome" cannot be found. In the configuration is no option to configure the Browser of choice and it doesnt respect default browser settings.

Extension issue

  • Issue Type: Bug
  • Extension Name: eno
  • Extension Version: 2.3.2
  • OS Version: Windows_NT x64 6.1.7601
  • VSCode version: 1.47.3

⚠️ We have written the needed data into your clipboard. Please paste! ⚠️

Pug "Include" tag not working

Issue explained on stackoverflow.

I have tried everything, but it appears to be an issue with the compile-hero itself, as when compiling a .pug file manually:

const pug = require('pug'); console.log(pug.renderFile('wallet_ui.pug'));

Everything works perfectly.

Extension issue

  • Issue Type: Bug
  • Extension Name: eno
  • Extension Version: 2.3.2
  • OS Version: Darwin x64 19.5.0
  • VSCode version: 1.47.2

⚠️ We have written the needed data into your clipboard. Please paste! ⚠️

Compiler not working

Ok so i have tried both the Formatter Hero and the Complier Hero and I have the same issue with both.

Below is a screenshot of my settings and directory structure for this project. Other live compilers work but for the life of me i cannot get this one to work.

https://i.imgur.com/B7gpQaC.png

Duplicate Versions in Marketplace

There are two versions, 2.3.2 and 6.8.63, in the Marketplace and showing up in VSCODE Extensions. Are they identical? Is one deprecated? Which is the current version?
LennonFigure

Extension issue, not initialising

  • Issue Type: Bug
  • Extension Name: eno
  • Extension Version: 2.3.2
  • OS Version: Windows_NT x64 10.0.19041
  • VSCode version: 1.46.1

⚠️ We have written the needed data into your clipboard. Please paste! ⚠️

{
	"messages": [],
	"activationTimes": {
		"codeLoadingTime": 14450,
		"activateCallTime": 0,
		"activateResolvedTime": 53,
		"activationReason": {
			"startup": true,
			"extensionId": {
				"value": "Wscats.eno",
				"_lower": "wscats.eno"
			},
			"activationEvent": "*"
		}
	},
	"runtimeErrors": []
}

Feature: Minified options settings

I would like to see support in json settings to choose which compression is used or not used.

To minify or to not minify? This should never be the question... but it is.

Right now I just went an commented out the mini.html code. Would be nice to have a simple if =true check.

basic feature missing: no compile errors are shown for .JS files

if "compile-hero.javascript-output-toggle": true is used, and a script can not be compiled, there is no output to a VSCode terminal = it is missing. (Preferably output it to the 'problems' terminal/plane).

It just does nothing. It would make sense to get the compilers message shown somewhere.

CSS does not compile correctly from SCSS

When I write in SCSS like this

.category-item {
    border: 1px solid #d0d0d0;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);

    :hover {
        border: 1px solid #797979;
    }
}

in CSS I will have this

.category-item {
    border: 1px solid #d0d0d0;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}
.category-item :hover {
    border: 1px solid #797979;
}

but it's not what I want to see. I won't see

.category-item {
    border: 1px solid #d0d0d0;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}
.category-item:hover {
    border: 1px solid #797979;
}

Compile error init mac

not init ext v2.3.2 in vscode 1.46.1 macos 10.5.5
When clicked from the context menu "CompileFiles" get errors:

log
[2020-07-01 16:36:09.103] [exthost] [error] Error: ENOTDIR: not a directory, scandir '/Volumes/dev/src/ts/index.ts'
  at Object.readdirSync (fs.js:795:3)
  at Object.fs.readdirSync (electron/js2c/asar.js:605:39)
  at Object.fs.readdirSync (electron/js2c/asar.js:605:39)
  at /Users/admin/.vscode/extensions/wscats.eno-2.3.2/out/extension.js:313:16
  at e._executeContributedCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:639:863)
  at e.$executeContributedCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:640:217)
  at e._doInvokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:804:1013)
  at e._invokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:804:705)
  at e._receiveRequest (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:803:344)
  at e._receiveOneMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:802:156)
  at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:800:416
  at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46:242)
  at v.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:239:274)
  at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:975:649
  at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46:242)
  at v.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:239:274)
  at t.PersistentProtocol._receiveMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:243:629)
  at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:240:824
  at e.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:46:242)
  at p.acceptChunk (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:236:737)
  at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:236:89
  at Socket.t (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/services/extensions/node/extensionHostProcess.js:245:185)
  at Socket.emit (events.js:203:13)
  at Socket.EventEmitter.emit (domain.js:476:20)
  at addChunk (_stream_readable.js:295:12)
  at readableAddChunk (_stream_readable.js:276:11)
  at Socket.Readable.push (_stream_readable.js:210:10)
  at Pipe.onStreamRead (internal/stream_base_commons.js:166:17) extension.compileFile

PUG does not compile

SCSS is working as expected but PUG does not compile. With my setup the are both compiling to the same directory. No errors are reported and I believe it is simply not compiling at all.

Cannot read property length of undefined

I'm having this error whenever I try to render a JSON along my html file. The compiler says that property of undefined cannot be read but the curious thing is that the JSON I'm passing outputs well in the page so I don't know what's going on. This is my code:

extends partials/header.pug

block content
  body
    form(method="post", action="/todo/add")
      .form-group
      label Name  
      input.form-control(type="text", name="name", placeholder="name")
      .form-group
      label Email 
      textarea.form-control(type="text", name="description", placeholder="What do you have to do?")
      button.btn.btn-primary(type="submit") Submit
    h3 Added ToDo's 
    each todo in todos
      span #{todo.name} 
      a.deleteToDo(href="#" data-id=todo._id) delete todo
      p #{todo.description}

Server

app.get("/", function (req, res) {
  Todos.find({}).toArray((err, todos) => {
    if (err) {
      console.log(err);
    }
    res.render("index", {
      todos: todos,
    });
  });
});

The compiler is populating only index.min.html but no index.html. The Todos are on a Mongodb collection.

Thanks in advance.

Extension issue

  • Issue Type: Bug
  • Extension Name: eno
  • Extension Version: 2.3.2
  • OS Version: Windows_NT x64 10.0.19041
  • VSCode version: 1.48.0

⚠️ We have written the needed data into your clipboard. Please paste! ⚠️

Extension issue

  • Issue Type: Bug
  • Extension Name: eno
  • Extension Version: 2.3.2
  • OS Version: Windows_NT ia32 6.1.7601
  • VSCode version: 1.48.0

⚠️ We have written the needed data into your clipboard. Please paste! ⚠️

{
	"messages": [],
	"activationTimes": {
		"codeLoadingTime": 23939,
		"activateCallTime": 1,
		"activateResolvedTime": 7,
		"activationReason": {
			"startup": true,
			"extensionId": {
				"value": "Wscats.eno",
				"_lower": "wscats.eno"
			},
			"activationEvent": "*"
		}
	},
	"runtimeErrors": []
}

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.