Merge branch 'master' into remark-by-default
This commit is contained in:
commit
1163b93123
168
.travis.yml
168
.travis.yml
|
@ -11,53 +11,24 @@ notifications:
|
||||||
|
|
||||||
script: sh build-package.sh
|
script: sh build-package.sh
|
||||||
|
|
||||||
|
language: generic
|
||||||
|
|
||||||
|
cache:
|
||||||
|
timeout: 1000
|
||||||
|
|
||||||
git:
|
git:
|
||||||
depth: 10
|
depth: 1
|
||||||
|
|
||||||
php:
|
os:
|
||||||
- '5.6'
|
- linux
|
||||||
python:
|
- osx
|
||||||
- '2.7'
|
sudo: required
|
||||||
go:
|
|
||||||
- release
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- os: linux
|
|
||||||
dist: trusty
|
|
||||||
sudo: required
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
env:
|
|
||||||
- ATOM_CHANNEL=stable
|
|
||||||
- os: linux
|
|
||||||
dist: trusty
|
|
||||||
sudo: required
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
env:
|
|
||||||
- ATOM_CHANNEL=beta
|
|
||||||
# - os: linux
|
|
||||||
# dist: trusty
|
|
||||||
# sudo: require
|
|
||||||
# env:
|
|
||||||
# - ATOM_CHANNEL=stable
|
|
||||||
# - os: linux
|
|
||||||
# dist: trusty
|
|
||||||
# sudo: require
|
|
||||||
# env:
|
|
||||||
# - ATOM_CHANNEL=beta
|
|
||||||
- os: osx
|
|
||||||
env:
|
|
||||||
- ATOM_CHANNEL=stable
|
|
||||||
# - os: osx
|
|
||||||
# env:
|
|
||||||
# - ATOM_CHANNEL=beta
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- APM_TEST_PACKAGES="language-marko language-html-swig language-svg language-d mavensmate-atom language-lua language-puppet fuse"
|
matrix:
|
||||||
- PATH="/home/travis/gopath/bin:$HOME/.linuxbrew/bin:$PATH"
|
- ATOM_SCRIPT_NAME=atom-beta APM_SCRIPT_NAME=apm-beta
|
||||||
|
- ATOM_SCRIPT_NAME=atom APM_SCRIPT_NAME=apm
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
|
@ -71,9 +42,7 @@ addons:
|
||||||
- libgnome-keyring-dev
|
- libgnome-keyring-dev
|
||||||
- fakeroot
|
- fakeroot
|
||||||
- crystal
|
- crystal
|
||||||
- ocaml
|
|
||||||
- camlp4
|
- camlp4
|
||||||
- opam
|
|
||||||
- php5-cli
|
- php5-cli
|
||||||
- golang
|
- golang
|
||||||
|
|
||||||
|
@ -84,111 +53,38 @@ cache:
|
||||||
- vendor/bundle # gems are installed here, https://docs.travis-ci.com/user/languages/ruby/#Dependency-Management
|
- vendor/bundle # gems are installed here, https://docs.travis-ci.com/user/languages/ruby/#Dependency-Management
|
||||||
- node_modules
|
- node_modules
|
||||||
- $HOME/.atom
|
- $HOME/.atom
|
||||||
- $HOME/.stack
|
- $HOME/.opam
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
# Install Homebrew on Linux
|
# linux: Install Nix, Nix packages, upgrade pip, and install python packages
|
||||||
|
# osx: Update Homebrew, remove conflicting cask, brew bundle, symlink elm-format,
|
||||||
|
# upgrade pip, and install python packages
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
||||||
git clone --depth=1 https://github.com/Linuxbrew/brew.git ~/.linuxbrew || true;
|
curl https://nixos.org/nix/install | sh &&
|
||||||
|
. ~/.nix-profile/etc/profile.d/nix.sh &&
|
||||||
|
nix-env -i uncrustify R elm-format terraform atom atom-beta opam &&
|
||||||
|
pip install --upgrade pip &&
|
||||||
|
pip install --user -r requirements.txt;
|
||||||
|
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||||
|
brew update && brew cask zap oclint && brew bundle &&
|
||||||
|
ln -s /usr/local/bin/elm-format-0.17 /usr/local/bin/elm-format &&
|
||||||
|
pip2 install --upgrade pip &&
|
||||||
|
pip2 install -r requirements.txt;
|
||||||
|
else
|
||||||
|
echo Error:TRAVIS_OS_NAME && exit 1;
|
||||||
fi
|
fi
|
||||||
# Update Homebrew
|
|
||||||
- brew update
|
|
||||||
- brew tap homebrew/dupes
|
|
||||||
- brew tap homebrew/versions
|
|
||||||
# Ruby language support
|
# Ruby language support
|
||||||
# - gem install ruby-beautify --verbose
|
- bundle install
|
||||||
# - gem install rubocop
|
|
||||||
- gem install htmlbeautifier
|
|
||||||
- gem install puppet-lint
|
|
||||||
# Sass language support
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
||||||
gem install sass;
|
|
||||||
else
|
|
||||||
docker pull unibeautify/sass-convert;
|
|
||||||
fi
|
|
||||||
# Python language support
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
||||||
sudo chmod 777 -R /opt/python;
|
|
||||||
pip install --upgrade pip;
|
|
||||||
pip install --user --upgrade autopep8;
|
|
||||||
pip install --user --upgrade isort;
|
|
||||||
else
|
|
||||||
pip2 install --upgrade pip2;
|
|
||||||
pip2 install --upgrade autopep8;
|
|
||||||
pip2 install --upgrade isort;
|
|
||||||
fi
|
|
||||||
# SQL language support
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
||||||
pip install --user --upgrade sqlparse;
|
|
||||||
else
|
|
||||||
pip2 install --upgrade sqlparse;
|
|
||||||
fi
|
|
||||||
# Java, C, C++, C#, Objective-C, D, Pawn, Vala
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
||||||
brew install uncrustify;
|
|
||||||
else
|
|
||||||
docker pull unibeautify/uncrustify;
|
|
||||||
fi
|
|
||||||
# R
|
# R
|
||||||
- brew tap homebrew/science
|
- Rscript --version
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
||||||
brew install r;
|
|
||||||
rscript --version;
|
|
||||||
else
|
|
||||||
docker pull unibeautify/rscript;
|
|
||||||
fi
|
|
||||||
# PHP
|
# PHP
|
||||||
- brew tap homebrew/homebrew-php
|
- composer install
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
||||||
brew install php56 || true;
|
|
||||||
brew gist-logs php56 || true;
|
|
||||||
echo -e "\n[Phar]\nphar.readonly = Off\n" >> /usr/local/etc/php/5.6/php.ini;
|
|
||||||
brew install php-cs-fixer || true;
|
|
||||||
brew gist-logs php-cs-fixer || true;
|
|
||||||
fi
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
||||||
wget http://get.sensiolabs.org/php-cs-fixer.phar -O php-cs-fixer;
|
|
||||||
chmod a+x php-cs-fixer;
|
|
||||||
mv php-cs-fixer $HOME/.linuxbrew/bin/php-cs-fixer;
|
|
||||||
fi
|
|
||||||
# CoffeeScript
|
# CoffeeScript
|
||||||
- npm install coffee-formatter
|
- npm install coffee-formatter
|
||||||
# Haskell
|
|
||||||
# - brew install haskell-stack
|
|
||||||
# - stack setup
|
|
||||||
# - stack install stylish-haskell
|
|
||||||
# Elm
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
||||||
curl -L -o /tmp/elm-format.tgz
|
|
||||||
https://github.com/avh4/elm-format/releases/download/0.7.0-exp/elm-format-0.17-0.7.0-exp-mac-x64.tgz;
|
|
||||||
tar xvzf /tmp/elm-format.tgz -C /usr/local/bin;
|
|
||||||
fi
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
||||||
curl -L -o /tmp/elm-format.tgz https://github.com/avh4/elm-format/releases/download/0.7.0-exp/elm-format-0.17-0.7.0-exp-linux-x64.tgz;
|
|
||||||
tar xvzf /tmp/elm-format.tgz -C $HOME/.linuxbrew/bin;
|
|
||||||
fi
|
|
||||||
# OCaml
|
# OCaml
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
||||||
brew install ocaml;
|
|
||||||
brew install opam;
|
|
||||||
fi
|
|
||||||
- opam init --auto-setup
|
- opam init --auto-setup
|
||||||
# Init environment variables for opam
|
# Init environment variables for opam
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||||
eval `opam config env`;
|
eval `opam config env`;
|
||||||
fi
|
fi
|
||||||
- opam install --yes ocp-indent
|
- opam install --yes ocp-indent
|
||||||
# Crystal
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install crystal-lang; fi
|
|
||||||
# Bash
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
|
||||||
pip install --user beautysh;
|
|
||||||
else
|
|
||||||
pip2 install beautysh;
|
|
||||||
fi
|
|
||||||
# terraform
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
||||||
brew install terraform;
|
|
||||||
else
|
|
||||||
docker pull hashicorp/terraform;
|
|
||||||
fi
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
tap 'homebrew/science'
|
||||||
|
tap 'homebrew/php'
|
||||||
|
tap 'caskroom/versions'
|
||||||
|
brew 'uncrustify'
|
||||||
|
brew 'r'
|
||||||
|
brew 'composer'
|
||||||
|
brew 'opam'
|
||||||
|
brew 'crystal-lang'
|
||||||
|
brew 'terraform'
|
||||||
|
brew 'elm-format'
|
||||||
|
cask 'atom'
|
||||||
|
cask 'atom-beta'
|
|
@ -1,5 +1,6 @@
|
||||||
# Next
|
# Next
|
||||||
- Fix [#1862](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for ocp-indent as an executable
|
- Fix [#1862](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for ocp-indent as an executable
|
||||||
|
- See [#601](https://github.com/Glavin001/atom-beautify/issues/1862) Add support for tsx files
|
||||||
- Switch to Remark as a default markdown beautifier due to a more active state of its community compared to Tidy Markdown
|
- Switch to Remark as a default markdown beautifier due to a more active state of its community compared to Tidy Markdown
|
||||||
|
|
||||||
# v0.30.9 (2017-11-22)
|
# v0.30.9 (2017-11-22)
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
source "https://rubygems.org"
|
||||||
|
|
||||||
|
gem "rubocop"
|
||||||
|
gem "htmlbeautifier"
|
||||||
|
gem "puppet-lint"
|
||||||
|
gem "sass"
|
|
@ -6,8 +6,11 @@
|
||||||
[![Gitter](https://img.shields.io/gitter/room/Glavin001/atom-beautify.svg?style=flat-square)](https://gitter.im/Glavin001/atom-beautify)
|
[![Gitter](https://img.shields.io/gitter/room/Glavin001/atom-beautify.svg?style=flat-square)](https://gitter.im/Glavin001/atom-beautify)
|
||||||
[![Bountysource](https://img.shields.io/bountysource/team/atom-beautify/activity.svg?style=flat-square)](https://www.bountysource.com/teams/atom-beautify)
|
[![Bountysource](https://img.shields.io/bountysource/team/atom-beautify/activity.svg?style=flat-square)](https://www.bountysource.com/teams/atom-beautify)
|
||||||
[![Paypal Donations](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=X2RK5DKN6YXPJ&lc=CA&item_name=Atom%2dBeautify&item_number=atom%2dbeautify¤cy_code=CAD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted)
|
[![Paypal Donations](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=X2RK5DKN6YXPJ&lc=CA&item_name=Atom%2dBeautify&item_number=atom%2dbeautify¤cy_code=CAD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted)
|
||||||
|
[![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/unibeautify)
|
||||||
|
|
||||||
**Help improve Atom-Beautify by completing the questionnaire: [https://goo.gl/iEHBNr](https://goo.gl/iEHBNr)**
|
**Sign up for Unibeautify CI: [https://goo.gl/jmM4QN](https://goo.gl/jmM4QN)**
|
||||||
|
|
||||||
|
**Help improve Atom-Beautify by completing the quick questionnaire: [https://goo.gl/iEHBNr](https://goo.gl/iEHBNr)**
|
||||||
|
|
||||||
| Mac OS <img src="https://cloud.githubusercontent.com/assets/1885333/17059766/2530c9d8-4ffd-11e6-9529-3fa47dbff616.png" width="50px"> and <img src="https://cloud.githubusercontent.com/assets/1885333/17059750/11c4474e-4ffd-11e6-89e1-2486ca5b3234.png" width="100px"> | <img src="https://cloud.githubusercontent.com/assets/1885333/17059763/206a7d4a-4ffd-11e6-859e-7856902fb300.png" width="100px"> |
|
| Mac OS <img src="https://cloud.githubusercontent.com/assets/1885333/17059766/2530c9d8-4ffd-11e6-9529-3fa47dbff616.png" width="50px"> and <img src="https://cloud.githubusercontent.com/assets/1885333/17059750/11c4474e-4ffd-11e6-89e1-2486ca5b3234.png" width="100px"> | <img src="https://cloud.githubusercontent.com/assets/1885333/17059763/206a7d4a-4ffd-11e6-859e-7856902fb300.png" width="100px"> |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
|
|
@ -6,8 +6,11 @@
|
||||||
[![Gitter](https://img.shields.io/gitter/room/Glavin001/atom-beautify.svg?style=flat-square)](https://gitter.im/Glavin001/atom-beautify)
|
[![Gitter](https://img.shields.io/gitter/room/Glavin001/atom-beautify.svg?style=flat-square)](https://gitter.im/Glavin001/atom-beautify)
|
||||||
[![Bountysource](https://img.shields.io/bountysource/team/atom-beautify/activity.svg?style=flat-square)](https://www.bountysource.com/teams/atom-beautify)
|
[![Bountysource](https://img.shields.io/bountysource/team/atom-beautify/activity.svg?style=flat-square)](https://www.bountysource.com/teams/atom-beautify)
|
||||||
[![Paypal Donations](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=X2RK5DKN6YXPJ&lc=CA&item_name=Atom%2dBeautify&item_number=atom%2dbeautify¤cy_code=CAD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted)
|
[![Paypal Donations](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=X2RK5DKN6YXPJ&lc=CA&item_name=Atom%2dBeautify&item_number=atom%2dbeautify¤cy_code=CAD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted)
|
||||||
|
[![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/unibeautify)
|
||||||
|
|
||||||
**Help improve Atom-Beautify by completing the questionnaire: [https://goo.gl/iEHBNr](https://goo.gl/iEHBNr)**
|
**Sign up for Unibeautify CI: [https://goo.gl/jmM4QN](https://goo.gl/jmM4QN)**
|
||||||
|
|
||||||
|
**Help improve Atom-Beautify by completing the quick questionnaire: [https://goo.gl/iEHBNr](https://goo.gl/iEHBNr)**
|
||||||
|
|
||||||
| Mac OS <img src="https://cloud.githubusercontent.com/assets/1885333/17059766/2530c9d8-4ffd-11e6-9529-3fa47dbff616.png" width="50px"> and <img src="https://cloud.githubusercontent.com/assets/1885333/17059750/11c4474e-4ffd-11e6-89e1-2486ca5b3234.png" width="100px"> | <img src="https://cloud.githubusercontent.com/assets/1885333/17059763/206a7d4a-4ffd-11e6-859e-7856902fb300.png" width="100px"> |
|
| Mac OS <img src="https://cloud.githubusercontent.com/assets/1885333/17059766/2530c9d8-4ffd-11e6-9529-3fa47dbff616.png" width="50px"> and <img src="https://cloud.githubusercontent.com/assets/1885333/17059750/11c4474e-4ffd-11e6-89e1-2486ca5b3234.png" width="100px"> | <img src="https://cloud.githubusercontent.com/assets/1885333/17059763/206a7d4a-4ffd-11e6-859e-7856902fb300.png" width="100px"> |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
|
@ -196,6 +199,7 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
|
||||||
| Swig | `HTML (Swig)`, `SWIG` |`.swig` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| Swig | `HTML (Swig)`, `SWIG` |`.swig` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
| Terraform | `Terraform` |`.tf` | **[`terraformfmt`](https://www.terraform.io/docs/commands/fmt.html)** |
|
| Terraform | `Terraform` |`.tf` | **[`terraformfmt`](https://www.terraform.io/docs/commands/fmt.html)** |
|
||||||
| TSS | `TSS` |`.tss` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| TSS | `TSS` |`.tss` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
|
| TSX | `TypeScriptReact` |`.tsx` | **[`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter)** |
|
||||||
| Twig | `HTML (Twig)` |`.twig` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| Twig | `HTML (Twig)` |`.twig` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
| TypeScript | `TypeScript` |`.ts` | **[`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter)** |
|
| TypeScript | `TypeScript` |`.ts` | **[`TypeScript Formatter`](https://github.com/vvakame/typescript-formatter)** |
|
||||||
| UX Markup | `UX` |`.ux` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| UX Markup | `UX` |`.ux` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
|
|
123
appveyor.yml
123
appveyor.yml
|
@ -10,136 +10,35 @@ environment:
|
||||||
# /E:ON and /V:ON options are not enabled in the batch script intepreter
|
# /E:ON and /V:ON options are not enabled in the batch script intepreter
|
||||||
# See: http://stackoverflow.com/a/13751649/163740
|
# See: http://stackoverflow.com/a/13751649/163740
|
||||||
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
|
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\appveyor\\run_with_env.cmd"
|
||||||
|
PATH: C:\Ruby23\bin;C:\Ruby23-x64\DevKit\mingw\bin;C:\Python27;C:\Python27\Scripts;%PATH%
|
||||||
matrix:
|
|
||||||
- PYTHON: "C:\\Python27"
|
|
||||||
PYTHON_VERSION: "2.7.8"
|
|
||||||
PYTHON_ARCH: "32"
|
|
||||||
RUBY_VERSION: 23
|
|
||||||
|
|
||||||
# - PYTHON: "C:\\Python27-x64"
|
|
||||||
# PYTHON_VERSION: "2.7.8"
|
|
||||||
# PYTHON_ARCH: "64"
|
|
||||||
#
|
|
||||||
# - PYTHON: "C:\\Python33"
|
|
||||||
# PYTHON_VERSION: "3.3.5"
|
|
||||||
# PYTHON_ARCH: "32"
|
|
||||||
#
|
|
||||||
# - PYTHON: "C:\\Python33-x64"
|
|
||||||
# PYTHON_VERSION: "3.3.5"
|
|
||||||
# PYTHON_ARCH: "64"
|
|
||||||
#
|
|
||||||
# - PYTHON: "C:\\Python34"
|
|
||||||
# PYTHON_VERSION: "3.4.1"
|
|
||||||
# PYTHON_ARCH: "32"
|
|
||||||
#
|
|
||||||
# - PYTHON: "C:\\Python34-x64"
|
|
||||||
# PYTHON_VERSION: "3.4.1"
|
|
||||||
# PYTHON_ARCH: "64"
|
|
||||||
|
|
||||||
init:
|
init:
|
||||||
- cmd: rd /s /q %CHOCOLATEYINSTALL%
|
- cmd: rd /s /q %CHOCOLATEYINSTALL%
|
||||||
- ps: iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
|
- ps: iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
- cinst packages.config -y
|
||||||
- ECHO "Filesystem root:"
|
- refreshenv
|
||||||
- ps: "ls \"C:/\""
|
|
||||||
|
|
||||||
- cinst atom -y
|
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
|
||||||
# Add Atom's bin (apm, etc) to PATH
|
|
||||||
- SET PATH=%LOCALAPPDATA%\atom\bin;%PATH%
|
|
||||||
- apm install
|
- apm install
|
||||||
|
|
||||||
# Install CLI beautifiers
|
# https://packaging.python.org/guides/supporting-windows-using-appveyor/
|
||||||
|
- pip install -r requirements.txt
|
||||||
|
|
||||||
# Install Python (from the official .msi of http://python.org) and pip when
|
# Gemfile Install
|
||||||
# not already installed.
|
- bundle install
|
||||||
- "powershell ./appveyor/install.ps1"
|
|
||||||
|
|
||||||
# Prepend newly installed Python to the PATH of this build (this cannot be
|
|
||||||
# done from inside the powershell script as it would require to restart
|
|
||||||
# the parent CMD process).
|
|
||||||
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
|
|
||||||
|
|
||||||
# Check that we have the expected version and architecture for Python
|
|
||||||
- "python --version"
|
|
||||||
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
|
|
||||||
|
|
||||||
# Install the build dependencies of the project. If some dependencies contain
|
|
||||||
# compiled extensions and are not provided as pre-built wheel packages,
|
|
||||||
# pip will build them from source using the MSVC compiler matching the
|
|
||||||
# target Python version and architecture
|
|
||||||
- "%CMD_IN_ENV% pip install --upgrade autopep8"
|
|
||||||
- where autopep8
|
|
||||||
|
|
||||||
- "%CMD_IN_ENV% pip install --upgrade isort"
|
|
||||||
- where isort
|
|
||||||
|
|
||||||
- "%CMD_IN_ENV% pip install --upgrade sqlparse"
|
|
||||||
|
|
||||||
# Ruby & Gem
|
|
||||||
- SET PATH=C:\Ruby%RUBY_VERSION%\bin;C:\Ruby23-x64\DevKit\mingw\bin;%PATH%
|
|
||||||
# Rubocop
|
|
||||||
- gem install rubocop
|
|
||||||
- where rubocop
|
|
||||||
# HTMLBeautifier
|
|
||||||
- gem install htmlbeautifier
|
|
||||||
- where htmlbeautifier
|
|
||||||
# Puppet-Lint
|
|
||||||
- gem install puppet-lint
|
|
||||||
- where puppet-lint
|
|
||||||
# Sass
|
|
||||||
- gem install sass
|
|
||||||
- where sass-convert
|
|
||||||
|
|
||||||
# emacs
|
|
||||||
- cinst emacs -y
|
|
||||||
- where emacs
|
|
||||||
|
|
||||||
# terraform
|
|
||||||
- cinst terraform -y
|
|
||||||
- where terraform
|
|
||||||
|
|
||||||
# FIXME: Enable allowEmptyChecksums, until someone fixes the checksum issue of php
|
|
||||||
- choco feature enable -n allowEmptyChecksums
|
|
||||||
# PHP
|
# PHP
|
||||||
- ps: Set-Service wuauserv -StartupType Manual
|
- ps: Set-Service wuauserv -StartupType Manual
|
||||||
- cinst php -y
|
|
||||||
- ps: "ls \"C:\\tools\\php72\""
|
|
||||||
- "SET PATH=C:\\tools\\php72;%PATH%"
|
|
||||||
- where php
|
|
||||||
# PHP-CS-Fixer
|
# PHP-CS-Fixer
|
||||||
- cinst curl -y # Use cURL to download file from URL
|
- composer install
|
||||||
- curl http://get.sensiolabs.org/php-cs-fixer.phar -o php-cs-fixer
|
|
||||||
- "SET PATH=%cd%;%PATH%" # Add current working directory to PATH
|
|
||||||
- where php-cs-fixer
|
|
||||||
|
|
||||||
# Uncrustify
|
|
||||||
- curl -k -L https://sourceforge.net/projects/uncrustify/files/uncrustify/uncrustify-0.65/uncrustify-0.65-win32.zip/download -o uncrustify.zip
|
|
||||||
- cinst 7zip.commandline -y
|
|
||||||
- 7za e uncrustify.zip -ouncrustify-d
|
|
||||||
- "SET PATH=%cd%\\uncrustify-d;%PATH%"
|
|
||||||
- where uncrustify
|
|
||||||
|
|
||||||
# elm-format
|
# elm-format
|
||||||
- curl -k -L https://github.com/avh4/elm-format/releases/download/0.7.0-exp/elm-format-0.18-0.7.0-exp-win-i386.zip -o elm-format.zip
|
- npm install -g elm-format@exp
|
||||||
- 7za e elm-format.zip -oelm-format-d
|
|
||||||
- "SET PATH=%cd%\\elm-format-d;%PATH%"
|
|
||||||
- where elm-format
|
|
||||||
|
|
||||||
# Beautysh
|
|
||||||
- pip install beautysh
|
|
||||||
- where beautysh
|
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
|
|
||||||
- cd %APPVEYOR_BUILD_FOLDER%
|
|
||||||
# Install languages to Atom
|
# Install languages to Atom
|
||||||
- apm install language-marko language-html-swig language-svg language-elm language-d mavensmate-atom language-lua language-puppet fuse
|
- apm install --packages-file atom-packages.txt
|
||||||
# Show current PATH
|
|
||||||
- echo %PATH%
|
|
||||||
# Run tests on package
|
# Run tests on package
|
||||||
#- "%LOCALAPPDATA%\\atom\\bin\\atom.cmd --test spec"
|
#- "%LOCALAPPDATA%\\atom\\bin\\atom.cmd --test spec"
|
||||||
- apm test --path %LOCALAPPDATA%/atom/bin/atom.cmd
|
- apm test --path %LOCALAPPDATA%/atom/bin/atom.cmd
|
||||||
|
|
|
@ -1,180 +0,0 @@
|
||||||
# Sample script to install Python and pip under Windows
|
|
||||||
# Authors: Olivier Grisel, Jonathan Helmus and Kyle Kastner
|
|
||||||
# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
|
|
||||||
|
|
||||||
$MINICONDA_URL = "http://repo.continuum.io/miniconda/"
|
|
||||||
$BASE_URL = "https://www.python.org/ftp/python/"
|
|
||||||
$GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py"
|
|
||||||
$GET_PIP_PATH = "C:\get-pip.py"
|
|
||||||
|
|
||||||
|
|
||||||
function DownloadPython ($python_version, $platform_suffix) {
|
|
||||||
$webclient = New-Object System.Net.WebClient
|
|
||||||
$filename = "python-" + $python_version + $platform_suffix + ".msi"
|
|
||||||
$url = $BASE_URL + $python_version + "/" + $filename
|
|
||||||
|
|
||||||
$basedir = $pwd.Path + "\"
|
|
||||||
$filepath = $basedir + $filename
|
|
||||||
if (Test-Path $filename) {
|
|
||||||
Write-Host "Reusing" $filepath
|
|
||||||
return $filepath
|
|
||||||
}
|
|
||||||
|
|
||||||
# Download and retry up to 3 times in case of network transient errors.
|
|
||||||
Write-Host "Downloading" $filename "from" $url
|
|
||||||
$retry_attempts = 2
|
|
||||||
for($i=0; $i -lt $retry_attempts; $i++){
|
|
||||||
try {
|
|
||||||
$webclient.DownloadFile($url, $filepath)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
Catch [Exception]{
|
|
||||||
Start-Sleep 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Test-Path $filepath) {
|
|
||||||
Write-Host "File saved at" $filepath
|
|
||||||
} else {
|
|
||||||
# Retry once to get the error message if any at the last try
|
|
||||||
$webclient.DownloadFile($url, $filepath)
|
|
||||||
}
|
|
||||||
return $filepath
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function InstallPython ($python_version, $architecture, $python_home) {
|
|
||||||
Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home
|
|
||||||
if (Test-Path $python_home) {
|
|
||||||
Write-Host $python_home "already exists, skipping."
|
|
||||||
return $false
|
|
||||||
}
|
|
||||||
if ($architecture -eq "32") {
|
|
||||||
$platform_suffix = ""
|
|
||||||
} else {
|
|
||||||
$platform_suffix = ".amd64"
|
|
||||||
}
|
|
||||||
$msipath = DownloadPython $python_version $platform_suffix
|
|
||||||
Write-Host "Installing" $msipath "to" $python_home
|
|
||||||
$install_log = $python_home + ".log"
|
|
||||||
$install_args = "/qn /log $install_log /i $msipath TARGETDIR=$python_home"
|
|
||||||
$uninstall_args = "/qn /x $msipath"
|
|
||||||
RunCommand "msiexec.exe" $install_args
|
|
||||||
if (-not(Test-Path $python_home)) {
|
|
||||||
Write-Host "Python seems to be installed else-where, reinstalling."
|
|
||||||
RunCommand "msiexec.exe" $uninstall_args
|
|
||||||
RunCommand "msiexec.exe" $install_args
|
|
||||||
}
|
|
||||||
if (Test-Path $python_home) {
|
|
||||||
Write-Host "Python $python_version ($architecture) installation complete"
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to install Python in $python_home"
|
|
||||||
Get-Content -Path $install_log
|
|
||||||
Exit 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function RunCommand ($command, $command_args) {
|
|
||||||
Write-Host $command $command_args
|
|
||||||
Start-Process -FilePath $command -ArgumentList $command_args -Wait -Passthru
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function InstallPip ($python_home) {
|
|
||||||
$pip_path = $python_home + "\Scripts\pip.exe"
|
|
||||||
$python_path = $python_home + "\python.exe"
|
|
||||||
if (-not(Test-Path $pip_path)) {
|
|
||||||
Write-Host "Installing pip..."
|
|
||||||
$webclient = New-Object System.Net.WebClient
|
|
||||||
$webclient.DownloadFile($GET_PIP_URL, $GET_PIP_PATH)
|
|
||||||
Write-Host "Executing:" $python_path $GET_PIP_PATH
|
|
||||||
Start-Process -FilePath "$python_path" -ArgumentList "$GET_PIP_PATH" -Wait -Passthru
|
|
||||||
} else {
|
|
||||||
Write-Host "pip already installed."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function DownloadMiniconda ($python_version, $platform_suffix) {
|
|
||||||
$webclient = New-Object System.Net.WebClient
|
|
||||||
if ($python_version -eq "3.4") {
|
|
||||||
$filename = "Miniconda3-3.5.5-Windows-" + $platform_suffix + ".exe"
|
|
||||||
} else {
|
|
||||||
$filename = "Miniconda-3.5.5-Windows-" + $platform_suffix + ".exe"
|
|
||||||
}
|
|
||||||
$url = $MINICONDA_URL + $filename
|
|
||||||
|
|
||||||
$basedir = $pwd.Path + "\"
|
|
||||||
$filepath = $basedir + $filename
|
|
||||||
if (Test-Path $filename) {
|
|
||||||
Write-Host "Reusing" $filepath
|
|
||||||
return $filepath
|
|
||||||
}
|
|
||||||
|
|
||||||
# Download and retry up to 3 times in case of network transient errors.
|
|
||||||
Write-Host "Downloading" $filename "from" $url
|
|
||||||
$retry_attempts = 2
|
|
||||||
for($i=0; $i -lt $retry_attempts; $i++){
|
|
||||||
try {
|
|
||||||
$webclient.DownloadFile($url, $filepath)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
Catch [Exception]{
|
|
||||||
Start-Sleep 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (Test-Path $filepath) {
|
|
||||||
Write-Host "File saved at" $filepath
|
|
||||||
} else {
|
|
||||||
# Retry once to get the error message if any at the last try
|
|
||||||
$webclient.DownloadFile($url, $filepath)
|
|
||||||
}
|
|
||||||
return $filepath
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function InstallMiniconda ($python_version, $architecture, $python_home) {
|
|
||||||
Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home
|
|
||||||
if (Test-Path $python_home) {
|
|
||||||
Write-Host $python_home "already exists, skipping."
|
|
||||||
return $false
|
|
||||||
}
|
|
||||||
if ($architecture -eq "32") {
|
|
||||||
$platform_suffix = "x86"
|
|
||||||
} else {
|
|
||||||
$platform_suffix = "x86_64"
|
|
||||||
}
|
|
||||||
$filepath = DownloadMiniconda $python_version $platform_suffix
|
|
||||||
Write-Host "Installing" $filepath "to" $python_home
|
|
||||||
$install_log = $python_home + ".log"
|
|
||||||
$args = "/S /D=$python_home"
|
|
||||||
Write-Host $filepath $args
|
|
||||||
Start-Process -FilePath $filepath -ArgumentList $args -Wait -Passthru
|
|
||||||
if (Test-Path $python_home) {
|
|
||||||
Write-Host "Python $python_version ($architecture) installation complete"
|
|
||||||
} else {
|
|
||||||
Write-Host "Failed to install Python in $python_home"
|
|
||||||
Get-Content -Path $install_log
|
|
||||||
Exit 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function InstallMinicondaPip ($python_home) {
|
|
||||||
$pip_path = $python_home + "\Scripts\pip.exe"
|
|
||||||
$conda_path = $python_home + "\Scripts\conda.exe"
|
|
||||||
if (-not(Test-Path $pip_path)) {
|
|
||||||
Write-Host "Installing pip..."
|
|
||||||
$args = "install --yes pip"
|
|
||||||
Write-Host $conda_path $args
|
|
||||||
Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru
|
|
||||||
} else {
|
|
||||||
Write-Host "pip already installed."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function main () {
|
|
||||||
InstallPython $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON
|
|
||||||
InstallPip $env:PYTHON
|
|
||||||
}
|
|
||||||
|
|
||||||
main
|
|
|
@ -1,47 +0,0 @@
|
||||||
:: To build extensions for 64 bit Python 3, we need to configure environment
|
|
||||||
:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of:
|
|
||||||
:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1)
|
|
||||||
::
|
|
||||||
:: To build extensions for 64 bit Python 2, we need to configure environment
|
|
||||||
:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of:
|
|
||||||
:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0)
|
|
||||||
::
|
|
||||||
:: 32 bit builds do not require specific environment configurations.
|
|
||||||
::
|
|
||||||
:: Note: this script needs to be run with the /E:ON and /V:ON flags for the
|
|
||||||
:: cmd interpreter, at least for (SDK v7.0)
|
|
||||||
::
|
|
||||||
:: More details at:
|
|
||||||
:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows
|
|
||||||
:: http://stackoverflow.com/a/13751649/163740
|
|
||||||
::
|
|
||||||
:: Author: Olivier Grisel
|
|
||||||
:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/
|
|
||||||
@ECHO OFF
|
|
||||||
|
|
||||||
SET COMMAND_TO_RUN=%*
|
|
||||||
SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows
|
|
||||||
|
|
||||||
SET MAJOR_PYTHON_VERSION="%PYTHON_VERSION:~0,1%"
|
|
||||||
IF %MAJOR_PYTHON_VERSION% == "2" (
|
|
||||||
SET WINDOWS_SDK_VERSION="v7.0"
|
|
||||||
) ELSE IF %MAJOR_PYTHON_VERSION% == "3" (
|
|
||||||
SET WINDOWS_SDK_VERSION="v7.1"
|
|
||||||
) ELSE (
|
|
||||||
ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%"
|
|
||||||
EXIT 1
|
|
||||||
)
|
|
||||||
|
|
||||||
IF "%PYTHON_ARCH%"=="64" (
|
|
||||||
ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture
|
|
||||||
SET DISTUTILS_USE_SDK=1
|
|
||||||
SET MSSdk=1
|
|
||||||
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION%
|
|
||||||
"%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release
|
|
||||||
ECHO Executing: %COMMAND_TO_RUN%
|
|
||||||
call %COMMAND_TO_RUN% || EXIT 1
|
|
||||||
) ELSE (
|
|
||||||
ECHO Using default MSVC build environment for 32 bit architecture
|
|
||||||
ECHO Executing: %COMMAND_TO_RUN%
|
|
||||||
call %COMMAND_TO_RUN% || EXIT 1
|
|
||||||
)
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
language-marko
|
||||||
|
language-html-swig
|
||||||
|
language-svg
|
||||||
|
language-d
|
||||||
|
mavensmate-atom
|
||||||
|
language-lua
|
||||||
|
language-elm
|
||||||
|
language-puppet
|
||||||
|
fuse
|
|
@ -1,63 +1,21 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
echo "Downloading latest Atom release..."
|
if [ "$TRAVIS_OS_NAME" != "osx" ]; then
|
||||||
ATOM_CHANNEL="${ATOM_CHANNEL:=stable}"
|
|
||||||
|
|
||||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
|
||||||
curl -s -L "https://atom.io/download/mac?channel=$ATOM_CHANNEL" \
|
|
||||||
-H 'Accept: application/octet-stream' \
|
|
||||||
-o "atom.zip"
|
|
||||||
mkdir atom
|
|
||||||
unzip -q atom.zip -d atom
|
|
||||||
if [ "$ATOM_CHANNEL" = "stable" ]; then
|
|
||||||
export ATOM_APP_NAME="Atom.app"
|
|
||||||
export ATOM_SCRIPT_NAME="atom.sh"
|
|
||||||
export ATOM_SCRIPT_PATH="./atom/${ATOM_APP_NAME}/Contents/Resources/app/atom.sh"
|
|
||||||
else
|
|
||||||
export ATOM_APP_NAME="Atom ${ATOM_CHANNEL}.app"
|
|
||||||
export ATOM_SCRIPT_NAME="atom-${ATOM_CHANNEL}"
|
|
||||||
export ATOM_SCRIPT_PATH="./atom-${ATOM_CHANNEL}"
|
|
||||||
ln -s "./atom/${ATOM_APP_NAME}/Contents/Resources/app/atom.sh" "${ATOM_SCRIPT_PATH}"
|
|
||||||
fi
|
|
||||||
export PATH="$PWD/atom/${ATOM_APP_NAME}/Contents/Resources/app/apm/bin:$PATH"
|
|
||||||
export ATOM_PATH="./atom"
|
|
||||||
export APM_SCRIPT_PATH="./atom/${ATOM_APP_NAME}/Contents/Resources/app/apm/node_modules/.bin/apm"
|
|
||||||
else
|
|
||||||
curl -s -L "https://atom.io/download/deb?channel=$ATOM_CHANNEL" \
|
|
||||||
-H 'Accept: application/octet-stream' \
|
|
||||||
-o "atom.deb"
|
|
||||||
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
|
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16
|
||||||
export DISPLAY=":99"
|
export DISPLAY=":99"
|
||||||
dpkg-deb -x atom.deb "$HOME/atom"
|
|
||||||
if [ "$ATOM_CHANNEL" = "stable" ]; then
|
|
||||||
export ATOM_SCRIPT_NAME="atom"
|
|
||||||
export APM_SCRIPT_NAME="apm"
|
|
||||||
else
|
|
||||||
export ATOM_SCRIPT_NAME="atom-$ATOM_CHANNEL"
|
|
||||||
export APM_SCRIPT_NAME="apm-$ATOM_CHANNEL"
|
|
||||||
fi
|
|
||||||
export ATOM_SCRIPT_PATH="$HOME/atom/usr/bin/$ATOM_SCRIPT_NAME"
|
|
||||||
export APM_SCRIPT_PATH="$HOME/atom/usr/bin/$APM_SCRIPT_NAME"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "Using Atom version:"
|
echo "Using Atom version:"
|
||||||
"$ATOM_SCRIPT_PATH" -v
|
"$ATOM_SCRIPT_NAME" -v
|
||||||
echo "Using APM version:"
|
echo "Using APM version:"
|
||||||
"$APM_SCRIPT_PATH" -v
|
"$APM_SCRIPT_NAME" -v
|
||||||
|
|
||||||
echo "Downloading package dependencies..."
|
echo "Downloading package dependencies..."
|
||||||
"$APM_SCRIPT_PATH" clean
|
"$APM_SCRIPT_NAME" clean
|
||||||
"$APM_SCRIPT_PATH" install
|
"$APM_SCRIPT_NAME" install
|
||||||
|
|
||||||
TEST_PACKAGES="${APM_TEST_PACKAGES:=none}"
|
echo "Installing atom package dependencies..."
|
||||||
|
"$APM_SCRIPT_NAME" install --packages-file atom-packages.txt
|
||||||
if [ "$TEST_PACKAGES" != "none" ]; then
|
|
||||||
echo "Installing atom package dependencies..."
|
|
||||||
for pack in $TEST_PACKAGES ; do
|
|
||||||
"$APM_SCRIPT_PATH" install $pack
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -f ./node_modules/.bin/coffeelint ]; then
|
if [ -f ./node_modules/.bin/coffeelint ]; then
|
||||||
if [ -d ./src ]; then
|
if [ -d ./src ]; then
|
||||||
|
@ -100,9 +58,9 @@ fi
|
||||||
|
|
||||||
if [ -d ./spec ]; then
|
if [ -d ./spec ]; then
|
||||||
echo "Running specs..."
|
echo "Running specs..."
|
||||||
"$ATOM_SCRIPT_PATH" --test spec
|
"$ATOM_SCRIPT_NAME" --test spec
|
||||||
else
|
else
|
||||||
echo "Missing spec folder! Please consider adding a test suite in `./spec`"
|
echo "Missing spec folder! Please consider adding a test suite in `./spec`"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"require": {
|
||||||
|
"friendsofphp/php-cs-fixer": ">0"
|
||||||
|
}
|
||||||
|
}
|
|
@ -12622,6 +12622,75 @@ Maximum amount of characters per line (0 = disable) (Supported by Pretty Diff)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### [TSX](#tsx)
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`TypeScript Formatter`](#typescript-formatter)
|
||||||
|
|
||||||
|
| Option | TypeScript Formatter |
|
||||||
|
| --- | --- |
|
||||||
|
| `disabled` | :white_check_mark: |
|
||||||
|
| `default_beautifier` | :white_check_mark: |
|
||||||
|
| `beautify_on_save` | :white_check_mark: |
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Options for language TSX
|
||||||
|
|
||||||
|
##### [Disable Beautifying Language](#disable-beautifying-language)
|
||||||
|
|
||||||
|
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Disable TSX Beautification
|
||||||
|
|
||||||
|
**How to Configure**
|
||||||
|
|
||||||
|
1. You can open the [Settings View](https://github.com/atom/settings-view) by navigating to
|
||||||
|
*Edit > Preferences (Linux)*, *Atom > Preferences (OS X)*, or *File > Preferences (Windows)*.
|
||||||
|
2. Go into *Packages* and search for "*Atom Beautify*" package.
|
||||||
|
3. Find the option "*Disable Beautifying Language*" and change it to your desired configuration.
|
||||||
|
|
||||||
|
##### [Default Beautifier](#default-beautifier)
|
||||||
|
|
||||||
|
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||||
|
|
||||||
|
**Default**: `TypeScript Formatter`
|
||||||
|
|
||||||
|
**Type**: `string`
|
||||||
|
|
||||||
|
**Enum**: `TypeScript Formatter`
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Default Beautifier to be used for TSX
|
||||||
|
|
||||||
|
**How to Configure**
|
||||||
|
|
||||||
|
1. You can open the [Settings View](https://github.com/atom/settings-view) by navigating to
|
||||||
|
*Edit > Preferences (Linux)*, *Atom > Preferences (OS X)*, or *File > Preferences (Windows)*.
|
||||||
|
2. Go into *Packages* and search for "*Atom Beautify*" package.
|
||||||
|
3. Find the option "*Default Beautifier*" and change it to your desired configuration.
|
||||||
|
|
||||||
|
##### [Beautify On Save](#beautify-on-save)
|
||||||
|
|
||||||
|
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Automatically beautify TSX files on save
|
||||||
|
|
||||||
|
**How to Configure**
|
||||||
|
|
||||||
|
1. You can open the [Settings View](https://github.com/atom/settings-view) by navigating to
|
||||||
|
*Edit > Preferences (Linux)*, *Atom > Preferences (OS X)*, or *File > Preferences (Windows)*.
|
||||||
|
2. Go into *Packages* and search for "*Atom Beautify*" package.
|
||||||
|
3. Find the option "*Beautify On Save*" and change it to your desired configuration.
|
||||||
|
|
||||||
#### [Twig](#twig)
|
#### [Twig](#twig)
|
||||||
|
|
||||||
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff)
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
class Test extends React.Component<Foo> {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div className="class" >
|
||||||
|
<h2 className="anotherClass" >
|
||||||
|
{ this.foo.bar }
|
||||||
|
< /h2>
|
||||||
|
{ this.foo.bar.children }
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
class Test extends React.Component<Foo> {
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div className="class">
|
||||||
|
<h2 className="anotherClass">
|
||||||
|
{this.foo.bar}
|
||||||
|
</h2>
|
||||||
|
{this.foo.bar.children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
10
package.json
10
package.json
|
@ -194,7 +194,7 @@
|
||||||
"temp": "^0.8.3",
|
"temp": "^0.8.3",
|
||||||
"tidy-markdown": "2.0.3",
|
"tidy-markdown": "2.0.3",
|
||||||
"typescript": "2.4.1",
|
"typescript": "2.4.1",
|
||||||
"typescript-formatter": "5.2.0",
|
"typescript-formatter": "^7.0.0",
|
||||||
"underscore-plus": "^1.6.6",
|
"underscore-plus": "^1.6.6",
|
||||||
"universal-analytics": "0.4.13",
|
"universal-analytics": "0.4.13",
|
||||||
"which": "1.2.14",
|
"which": "1.2.14",
|
||||||
|
@ -277,7 +277,8 @@
|
||||||
"atom-beautify:beautify-language-xml",
|
"atom-beautify:beautify-language-xml",
|
||||||
"atom-beautify:beautify-language-xtemplate",
|
"atom-beautify:beautify-language-xtemplate",
|
||||||
"atom-beautify:beautify-language-yaml",
|
"atom-beautify:beautify-language-yaml",
|
||||||
"atom-beautify:beautify-language-terraform"
|
"atom-beautify:beautify-language-terraform",
|
||||||
|
"atom-beautify:beautify-language-tsx"
|
||||||
],
|
],
|
||||||
".tree-view .file .name": [
|
".tree-view .file .name": [
|
||||||
"atom-beautify:beautify-file"
|
"atom-beautify:beautify-file"
|
||||||
|
@ -412,7 +413,8 @@
|
||||||
"align-yaml",
|
"align-yaml",
|
||||||
"goimports",
|
"goimports",
|
||||||
"terraform",
|
"terraform",
|
||||||
"terraformfmt"
|
"terraformfmt",
|
||||||
|
"tsx"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"coffeelint": "1.16.0"
|
"coffeelint": "1.16.0"
|
||||||
|
@ -449,4 +451,4 @@
|
||||||
"prettydiff2"
|
"prettydiff2"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<packages>
|
||||||
|
<package id="atom" />
|
||||||
|
<package id="emacs" />
|
||||||
|
<package id="terraform" />
|
||||||
|
<package id="composer" />
|
||||||
|
<!--package id="uncrustify" /-->
|
||||||
|
</packages>
|
||||||
|
</xml>
|
|
@ -0,0 +1,4 @@
|
||||||
|
autopep8
|
||||||
|
isort
|
||||||
|
sqlparse
|
||||||
|
beautysh
|
|
@ -6,13 +6,14 @@ module.exports = class TypeScriptFormatter extends Beautifier
|
||||||
link: "https://github.com/vvakame/typescript-formatter"
|
link: "https://github.com/vvakame/typescript-formatter"
|
||||||
options: {
|
options: {
|
||||||
TypeScript: true
|
TypeScript: true
|
||||||
|
TSX: true
|
||||||
}
|
}
|
||||||
|
|
||||||
beautify: (text, language, options) ->
|
beautify: (text, language, options) ->
|
||||||
return new @Promise((resolve, reject) =>
|
return new @Promise((resolve, reject) =>
|
||||||
|
|
||||||
try
|
try
|
||||||
format = require("typescript-formatter/lib/formatter").default
|
format = require("typescript-formatter/lib/formatter").format
|
||||||
formatterUtils = require("typescript-formatter/lib/utils")
|
formatterUtils = require("typescript-formatter/lib/utils")
|
||||||
# @verbose('format', format, formatterUtils)
|
# @verbose('format', format, formatterUtils)
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,7 @@ module.exports = class Languages
|
||||||
"svg"
|
"svg"
|
||||||
"swig"
|
"swig"
|
||||||
"tss"
|
"tss"
|
||||||
|
"tsx"
|
||||||
"twig"
|
"twig"
|
||||||
"typescript"
|
"typescript"
|
||||||
"ux_markup"
|
"ux_markup"
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
module.exports = {
|
||||||
|
|
||||||
|
name: "TSX"
|
||||||
|
namespace: "tsx"
|
||||||
|
fallback: ['ts']
|
||||||
|
|
||||||
|
###
|
||||||
|
Supported Grammars
|
||||||
|
###
|
||||||
|
grammars: [
|
||||||
|
"TypeScriptReact"
|
||||||
|
]
|
||||||
|
|
||||||
|
###
|
||||||
|
Supported extensions
|
||||||
|
###
|
||||||
|
extensions: [
|
||||||
|
"tsx"
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
|
@ -7365,6 +7365,47 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"tsx": {
|
||||||
|
"title": "TSX",
|
||||||
|
"type": "object",
|
||||||
|
"description": "Options for language TSX",
|
||||||
|
"collapsed": true,
|
||||||
|
"beautifiers": [
|
||||||
|
"TypeScript Formatter"
|
||||||
|
],
|
||||||
|
"grammars": [
|
||||||
|
"TypeScriptReact"
|
||||||
|
],
|
||||||
|
"extensions": [
|
||||||
|
"tsx"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"disabled": {
|
||||||
|
"title": "Disable Beautifying Language",
|
||||||
|
"order": -3,
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Disable TSX Beautification"
|
||||||
|
},
|
||||||
|
"default_beautifier": {
|
||||||
|
"title": "Default Beautifier",
|
||||||
|
"order": -2,
|
||||||
|
"type": "string",
|
||||||
|
"default": "TypeScript Formatter",
|
||||||
|
"description": "Default Beautifier to be used for TSX",
|
||||||
|
"enum": [
|
||||||
|
"TypeScript Formatter"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"beautify_on_save": {
|
||||||
|
"title": "Beautify On Save",
|
||||||
|
"order": -1,
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Automatically beautify TSX files on save"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"twig": {
|
"twig": {
|
||||||
"title": "Twig",
|
"title": "Twig",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
|
|
Loading…
Reference in New Issue