Skip to content

Commit a1b4990

Browse files
authored
Merge pull request #33 from atom-ide-community/update
2 parents 8b0eb2e + 58a520f commit a1b4990

16 files changed

+5390
-14410
lines changed

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
* text=auto
2+
3+
# don't diff machine generated files
4+
dist/ -diff
5+
package-lock.json -diff

.github/workflows/CI.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: CI
2+
on:
3+
- pull_request
4+
- push
5+
6+
jobs:
7+
Test:
8+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
9+
name: ${{ matrix.os }} - Atom ${{ matrix.atom_channel }}
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os:
15+
- ubuntu-latest
16+
- macos-latest
17+
- windows-latest
18+
atom_channel: [stable, beta]
19+
steps:
20+
- uses: actions/checkout@v2
21+
- uses: UziTech/action-setup-atom@v1
22+
with:
23+
channel: ${{ matrix.atom_channel }}
24+
- name: Versions
25+
run: apm -v
26+
- name: Install APM dependencies
27+
run: |
28+
apm install
29+
# - name: Atom Package dependencies
30+
# run: node ./script/install-package-deps.js
31+
# - name: Run tests 👩🏾‍💻
32+
# run: npm run test
33+
34+
Lint:
35+
if: "!contains(github.event.head_commit.message, '[skip ci]')"
36+
runs-on: ubuntu-latest
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
steps:
40+
- uses: actions/checkout@v2
41+
with:
42+
fetch-depth: 0
43+
- name: Commit lint ✨
44+
uses: wagoid/commitlint-github-action@v1
45+
- uses: actions/setup-node@v1
46+
with:
47+
node-version: "12.x"
48+
# - name: Install NPM dependencies
49+
# run: |
50+
# npm install
51+
# - name: Lint ✨
52+
# run: npm run lint
53+
54+
Release:
55+
needs: [Test, Lint]
56+
if: github.ref == 'refs/heads/master' &&
57+
github.event.repository.fork == false
58+
runs-on: ubuntu-latest
59+
steps:
60+
- uses: actions/checkout@v2
61+
- uses: UziTech/action-setup-atom@v1
62+
- uses: actions/setup-node@v1
63+
with:
64+
node-version: "12.x"
65+
- name: NPM install
66+
run: npm install
67+
# - name: Build and Commit
68+
# run: npm run build-commit
69+
# NOTE: uncomment when ready
70+
- name: Release 🎉
71+
uses: cycjimmy/semantic-release-action@v2
72+
with:
73+
extends: |
74+
@semantic-release/apm-config
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
ATOM_ACCESS_TOKEN: ${{ secrets.ATOM_ACCESS_TOKEN }}
78+
79+
Skip:
80+
if: contains(github.event.head_commit.message, '[skip ci]')
81+
runs-on: ubuntu-latest
82+
steps:
83+
- name: Skip CI 🚫
84+
run: echo skip ci

.github/workflows/bump_deps.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Bump_Dependencies
2+
3+
on:
4+
schedule:
5+
- cron: "0 0 * * *"
6+
7+
jobs:
8+
Bump_Dependencies:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-node@v2-beta
13+
with:
14+
node-version: "14"
15+
- name: Setup PNPM
16+
uses: pnpm/[email protected]
17+
with:
18+
version: latest
19+
- run: |
20+
pnpm install
21+
pnpm bump
22+
pnpm install
23+
- uses: peter-evans/create-pull-request@v2
24+
with:
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
commit-message: Update dependencies
27+
title: "[AUTO] Update dependencies"
28+
labels: Dependencies
29+
branch: "Bump"

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# OS metadata
12
.DS_Store
2-
npm-debug.log
3+
Thumbs.db
4+
5+
# Node
36
node_modules
7+
package-lock.json
8+
9+
# TypeScript
10+
*.tsbuildinfo
11+
12+
# Build directories
13+
dist

.prettierignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
node_modules
2+
package.json
3+
package-lock.json
4+
pnpm-lock.yaml
5+
changelog.md
6+
coverage
7+
build
8+
dist

.travis.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Contributing
22

33
Everyone is welcome to contribute, in whatever form they are comfortable with. For example:
4+
45
- improve documentation,
56
- test features,
67
- fix bugs,
@@ -38,7 +39,7 @@ For general information regarding debugging in Atom, take a look at [debugging][
3839

3940
### Language Server Protocol (LSP)
4041

41-
Atom IDE packages revolve around [language server protocol], for which integration base is provided by [atom-languageclient].
42+
Atom IDE packages revolve around [language server protocol], for which integration base is provided by [atom-languageclient].
4243

4344
To log communication between Atom and a language server, dedicated debugging option needs to be set in Atom's configuration, `atom.config.set('core.debugLSP', true)` - e.g. through [init file]. Log entries should be visible in the console, in Developer Tools (`ctrl+shift+i`), e.g.:
4445

@@ -47,12 +48,13 @@ TypeScript (Theia) [Started] Starting Theia for some-project
4748
rpc.sendRequest textDocument/definition sending {textDocument: {…}, position: {…}}
4849
rpc.sendRequest textDocument/definition received (27ms) [{…}]
4950
```
50-
*Note: "Verbose" log level is required for some entries*
51+
52+
_Note: "Verbose" log level is required for some entries_
5153

5254
[semantic-release]: https://github.com/semantic-release/semantic-release
5355
[conventional commits]: https://www.conventionalcommits.org/en/v1.0.0
5456
[commitlint]: https://commitlint.js.org
55-
[Husky]: https://github.com/typicode/husky
57+
[husky]: https://github.com/typicode/husky
5658
[atom-debugging]: https://flight-manual.atom.io/hacking-atom/sections/debugging/
5759
[atom-languageclient]: https://github.com/atom/atom-languageclient
5860
[language server protocol]: https://microsoft.github.io/language-server-protocol/

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ Vue language support for [Atom IDE][]
88

99
1. Install `atom-ide-vue` from Atom's packages repository
1010

11-
Note: Since Atom comes with [autocomplete+](https://atom.io/packages/autocomplete-plus) package preinstalled, basic suggestions should be available immediately.
11+
Note: Since Atom comes with [autocomplete+](https://atom.io/packages/autocomplete-plus) package preinstalled, basic suggestions should be available immediately.
1212

13-
2. [Optional] Install [language-vue](https://atom.io/packages/language-vue)
13+
2. Install [language-vue](https://atom.io/packages/language-vue)
1414

15-
3. [Optional] Install [Atom IDE][] packages
15+
3. Install [Atom IDE][https://atom.io/packages/atom-ide-base] packages
1616

1717
## Contributing
1818

lib/config.js

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,39 @@
1-
const extensionConfig = atom.config.get("atom-ide-vue");
1+
const extensionConfig = atom.config.get("atom-ide-vue")
22

33
const initializationOptions = {
44
config: {
55
vetur: {
66
validation: {
77
template: extensionConfig.validation.template,
88
style: extensionConfig.validation.style,
9-
script: extensionConfig.validation.script
9+
script: extensionConfig.validation.script,
1010
},
1111
completion: {},
1212
format: {
1313
defaultFormatterOptions: {},
14-
options: {}
14+
options: {},
1515
},
1616
dev: {},
1717
trace: {},
1818
experimental: {
19-
templateInterpolationService:
20-
extensionConfig.experimental.templateInterpolationService
21-
}
19+
templateInterpolationService: extensionConfig.experimental.templateInterpolationService,
20+
},
2221
},
2322
css: {},
2423
html: {
25-
suggest: {}
24+
suggest: {},
2625
},
2726
javascript: {
28-
format: {}
27+
format: {},
2928
},
3029
typescript: {
31-
format: {}
30+
format: {},
3231
},
3332
emmet: {},
34-
stylusSupremacy: {}
35-
}
36-
};
33+
stylusSupremacy: {},
34+
},
35+
}
3736

3837
module.exports = {
39-
initializationOptions
40-
};
38+
initializationOptions,
39+
}

lib/grammar.js

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,37 @@
11
function updateOpenEditors(oldGrammar, newGrammar) {
2-
const openEditors = atom.workspace.getTextEditors();
3-
openEditors.forEach(editor => {
4-
const editorGrammar = editor.getGrammar();
2+
const openEditors = atom.workspace.getTextEditors()
3+
openEditors.forEach((editor) => {
4+
const editorGrammar = editor.getGrammar()
55

6-
const hasOldGrammar = editorGrammar.name === oldGrammar.name;
6+
const hasOldGrammar = editorGrammar.name === oldGrammar.name
77
if (hasOldGrammar) {
8-
editor.setGrammar(newGrammar);
8+
editor.setGrammar(newGrammar)
99
}
10-
});
10+
})
1111
}
1212

1313
function renameGrammarForScopeName(scopeName, newName) {
14-
const currentGrammar = atom.grammars.grammarForScopeName(scopeName);
14+
const currentGrammar = atom.grammars.grammarForScopeName(scopeName)
1515

1616
if (currentGrammar) {
1717
atom.grammars.readGrammar(currentGrammar.path, (error, grammarRenamed) => {
1818
if (error) {
19-
console.error("Failed to read grammar to rename", error);
20-
return;
19+
console.error("Failed to read grammar to rename", error)
20+
return
2121
}
2222

23-
grammarRenamed.name = newName;
23+
grammarRenamed.name = newName
2424

25-
atom.grammars.removeGrammarForScopeName(scopeName);
26-
atom.grammars.addGrammar(grammarRenamed);
25+
atom.grammars.removeGrammarForScopeName(scopeName)
26+
atom.grammars.addGrammar(grammarRenamed)
2727

28-
updateOpenEditors(currentGrammar, grammarRenamed);
28+
updateOpenEditors(currentGrammar, grammarRenamed)
2929

30-
console.log(
31-
`Grammar for scope ${scopeName} renamed from "${currentGrammar.name}" to "${grammarRenamed.name}"`
32-
);
33-
});
30+
console.log(`Grammar for scope ${scopeName} renamed from "${currentGrammar.name}" to "${grammarRenamed.name}"`)
31+
})
3432
}
3533
}
3634

3735
module.exports = {
38-
renameGrammarForScopeName
39-
};
36+
renameGrammarForScopeName,
37+
}

0 commit comments

Comments
 (0)