poalrom / grunt-prettier-example Goto Github PK
View Code? Open in Web Editor NEWExample of using grunt-prettier package in new project
Example of using grunt-prettier package in new project
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
If I use grunt-prettier for real HTML files:
task not ended + big CPU usage.
grunt-prettier works (for types of the files):
Normally and quickly:
Slow:
Very slow:
Operating system:
Node.js 12.12.0
grunt-cli 1.2.0, grunt 1.0.4
Prettier 1.18.2
grunt-prettier 1.3.0
You can see data on KiraPrettierHTML
branch of my demo GitHub repository.
Gruntfile.coffee
:module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-prettier'
grunt.initConfig
prettier:
files:
src: ["KiraArchitecture.html"]
return
KiraArchitecture.html
:.travis.yml
:git:
depth: 1
language: node_js
node_js:
- node
install:
- npm install -g grunt-cli prettier
before_script:
- npm install
script:
- prettier --write --loglevel debug KiraArchitecture.html
- grunt prettier --verbose
CLI Prettier:
prettier --write --loglevel debug KiraArchitecture.html
grunt-prettier:
grunt prettier --verbose
If Prettier CLI:
$ prettier --write --loglevel debug KiraArchitecture.html
[debug] normalized argv: {"_":["KiraArchitecture.html"],"color":true,"editorconfig":true,"write":true,"loglevel":"debug","plugin-search-dir":[],"plugin":[],"ignore-path":".prettierignore","debug-repeat":0,"config-precedence":"cli-override"}
[debug] resolve config from 'KiraArchitecture.html'
[debug] loaded options `{"useTabs":true,"tabWidth":4,"endOfLine":"lf"}`
[debug] applied config-precedence (cli-override): {"endOfLine":"lf","tabWidth":4,"useTabs":true}
KiraArchitecture.html 1658ms
The command "prettier --write --loglevel debug KiraArchitecture.html" exited with 0.
Else grunt-prettier:
No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.
Check the details on how to adjust your build configuration on: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received
The build has been terminated
Big CPU usage, PC hangs:
Thanks.
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.