Comments (7)
I'm thinking of adding a dependencies
property to the Beautifier
.
Modelled after VSCode's launch.json
: https://code.visualstudio.com/docs/editor/debugging#_launch-configurations
{
"dependencies": [
{
"type": "node",
"name": "Prettier",
"package": "prettier"
},
{
"type": "exec",
"name": "PHP-CS-Fixer",
"program": "php-cs-fixer",
"version": {
"parse": (text: string) => {
try {
return text.match(/version (.*) by/)[1] + ".0";
} catch (error) {
return text.match(/PHP CS Fixer (\d+\.\d+\.\d+)/)[1];
}
}
},
"docker": {
"image": "unibeautify/php-cs-fixer"
}
},
]
}
from unibeautify.
Dependency types
node
Node.js package. Can be require
d from various sources, in order:
- local (in
node_modules
) - global (
requireg
) - builtin (such as editor extension)
exec
Execute a non-Node.js module from command-line.
Test installation by checking version.
docker
Fallback to using Docker.
from unibeautify.
Another idea is:
{
"dependencies": {
"Prettier": {
"type": "node",
"package": "prettier"
},
"PHP-CS-Fixer": {
"type": "exec",
"program": "php-cs-fixer",
"version": {
"parse": (text: string) => {
try {
return text.match(/version (.*) by/)[1] + ".0";
} catch (error) {
return text.match(/PHP CS Fixer (\d+\.\d+\.\d+)/)[1];
}
}
},
"docker": {
"image": "unibeautify/php-cs-fixer"
}
}
}
}
from unibeautify.
I would vote for the first example.
from unibeautify.
@szeck87 : Feel free to use the 👍 reaction 😉.
I do as well and am implementing it as such now.
from unibeautify.
Pull Request in progress! #63
from unibeautify.
Published to v0.12.0
from unibeautify.
Related Issues (20)
- Support local installations of beautifiers HOT 3
- Add documentation to README for using Unibeautify as Node.js API HOT 7
- Option 'align_assignment' is not working in VSCode with TypeScript HOT 2
- unibeautify beautifies only in root director HOT 3
- Allow user to specify path to configuration file for a beautifier
- CTP file formatting HOT 6
- `@unibeautify/cli` ? `unibeautify-cli` ?
- Unformatted style and script tags in html HOT 2
- HTML properties incorrectly have there capitalization changed HOT 5
- Add Uncrustify beautifier support HOT 1
- Yaml definitions on Handlebars files HOT 1
- HCL HOT 1
- Liquid files with 2 Extensions handled differently HOT 1
- Nunjucks support HOT 1
- Laravel Blade Beautifier HOT 2
- Atom support HOT 1
- Action Required: Fix Renovate Configuration
- Add SystemVerilog support using Google's Verible project
- Dependency Dashboard
- Distribution Request: for VSCodium via Open VSX
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unibeautify.