wscats / compile-hero Goto Github PK
View Code? Open in Web Editor NEW🔰Visual Studio Code Extension For Compiling Language
Home Page: https://marketplace.visualstudio.com/items?itemName=Wscats.qf
License: MIT License
🔰Visual Studio Code Extension For Compiling Language
Home Page: https://marketplace.visualstudio.com/items?itemName=Wscats.qf
License: MIT License
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.
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).
Performance
qf
6.8.44
Windows_NT x64 10.0.18363
1.41.0
Bug
eno
2.3.15
Windows_NT x64 6.1.7601
1.48.2
What does it do? Why does a connect to http://www.umei.cc/p/gaoqing/cn/
? It will at least make my Windows Firewall open up for that remote URL, and make that site register my IP.
Does not seem to be needed for the plugin. Better to remove it, or document its purpose.
Found at
https://github.com/Wscats/compile-hero/blob/master/vscode-extension/src/extension.ts#L234
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
Bug
eno
2.3.2
Darwin x64 17.7.0
1.47.3
{
"messages": [],
"activationTimes": {
"codeLoadingTime": 9279,
"activateCallTime": 1,
"activateResolvedTime": 0,
"activationReason": {
"startup": true,
"extensionId": {
"value": "Wscats.eno",
"_lower": "wscats.eno"
},
"activationEvent": "*"
}
},
"runtimeErrors": []
}
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...
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.
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
}
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.
... as it says.
e.g. include style.css fails
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
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.
Bug
eno
2.3.2
Windows_NT x64 10.0.19041
1.48.0
Bug
eno
2.3.2
Windows_NT x64 10.0.19042
1.48.0
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
}
Performance
qf
6.8.63
Windows_NT x64 10.0.18363
1.46.1
C:\Users\mrt\Wscats.qf-unresponsive.cpuprofile.txt
Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load
this issue is repeatedly occurring guys
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. *****************************/
Bug
eno
2.3.2
Windows_NT ia32 6.1.7601
1.48.0
{
"messages": [],
"activationTimes": {
"codeLoadingTime": 23939,
"activateCallTime": 1,
"activateResolvedTime": 7,
"activationReason": {
"startup": true,
"extensionId": {
"value": "Wscats.eno",
"_lower": "wscats.eno"
},
"activationEvent": "*"
}
},
"runtimeErrors": []
}
Update: I found a good alternative for this extension, it called Live Sass Compiler.
Bug
eno
2.3.10
Windows_NT x64 10.0.18363
1.48.2
Performance
qf
6.8.51
Windows_NT x64 10.0.18363
1.44.2
C:\Users\karma\Wscats.qf-unresponsive.cpuprofile.txt
Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load
.sass
files do not compile. (.scss
does.)
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
Bug
eno
2.3.2
Darwin x64 19.5.0
1.47.2
Refering to vscode-extension/src/extension.ts#L226 -> this does not work on windows.
Something like [this] could work.
Bug
eno
2.3.2
Linux x64 5.4.0-42-generic
1.47.2
{
"messages": [],
"activationTimes": {
"codeLoadingTime": 21120,
"activateCallTime": 1,
"activateResolvedTime": 269,
"activationReason": {
"startup": true,
"extensionId": {
"value": "Wscats.eno",
"_lower": "wscats.eno"
},
"activationEvent": "*"
}
},
"runtimeErrors": []
}
Bug
eno
2.3.2
Windows_NT x64 10.0.17763
1.47.3
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 👍
not init ext v2.3.2 in vscode 1.46.1 macos 10.5.5
When clicked from the context menu "CompileFiles" get errors:
[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
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?
Bug
eno
2.3.2
Windows_NT x64 6.1.7601
1.47.3
When I trying saving scss on ftp, I get an error "extension host terminated unexpectedly"
.scss 文件编译后 无法生成 .css 文件 , 这是什么情况
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
Bug
eno
2.3.2
Windows_NT x64 10.0.18363
1.47.3
{
"messages": [],
"activationTimes": {
"codeLoadingTime": 61122,
"activateCallTime": 1,
"activateResolvedTime": 29,
"activationReason": {
"startup": true,
"extensionId": {
"value": "Wscats.eno",
"_lower": "wscats.eno"
},
"activationEvent": "*"
}
},
"runtimeErrors": []
}
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.
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.
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?
Bug
eno
2.3.2
Windows_NT x64 10.0.20161
1.46.1
After saving .scss files I do not see any -webkit- or auto prefixing in the compiled .css or min.css
Am I missing something or ?
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;
}
Bug
eno
2.3.2
Windows_NT x64 10.0.19041
1.46.1
{
"messages": [],
"activationTimes": {
"codeLoadingTime": 14450,
"activateCallTime": 0,
"activateResolvedTime": 53,
"activationReason": {
"startup": true,
"extensionId": {
"value": "Wscats.eno",
"_lower": "wscats.eno"
},
"activationEvent": "*"
}
},
"runtimeErrors": []
}
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.