├── .coffeelintignore ├── .editorconfig ├── .gitignore ├── .travis.yml ├── .travis ├── publish.sh └── travis_rsa.enc ├── LICENSE.md ├── appveyor.yml ├── coffeelint.json ├── lib └── main.coffee ├── package-lock.json ├── package.json ├── readme.md └── spec └── main-spec.coffee /.coffeelintignore: -------------------------------------------------------------------------------- 1 | spec/fixtures/ 2 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | npm-debug.log 3 | node_modules 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | ### Project specific config ### 2 | language: generic 3 | 4 | env: 5 | global: 6 | - APM_TEST_PACKAGES="language-asciidoc autocomplete-asciidoc asciidoc-preview" 7 | - AUTHORIZED_BRANCH="master" 8 | - ATOM_LINT_WITH_BUNDLED_NODE="true" 9 | 10 | matrix: 11 | - ATOM_CHANNEL=stable 12 | - ATOM_CHANNEL=beta 13 | 14 | os: 15 | - linux 16 | - osx 17 | 18 | after_success: 19 | - ./.travis/publish.sh 20 | 21 | ### Generic setup follows ### 22 | script: 23 | - curl -s -O https://raw.githubusercontent.com/atom/ci/master/build-package.sh 24 | - chmod u+x build-package.sh 25 | - ./build-package.sh 26 | 27 | notifications: 28 | email: 29 | on_success: never 30 | on_failure: change 31 | 32 | branches: 33 | only: 34 | - master 35 | 36 | git: 37 | depth: 10 38 | 39 | sudo: false 40 | 41 | addons: 42 | apt: 43 | packages: 44 | - build-essential 45 | - git 46 | - libgnome-keyring-dev 47 | - fakeroot 48 | -------------------------------------------------------------------------------- /.travis/publish.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | ## Custom variables 5 | USER_EMAIL="docbot@asciidoctor.org" 6 | USER_NAME="Asciidoctor DocBot" 7 | PUBLISH_TYPE=${PUBLISH_TYPE:="patch"} 8 | SSH_KEY_NAME="travis_rsa" 9 | 10 | ## Fix apm path to the Atom stable channel 11 | APM_SCRIPT_PATH=${APM_SCRIPT_PATH:="$HOME/atom/usr/bin/apm"} 12 | 13 | cd "$TRAVIS_BUILD_DIR" 14 | 15 | ## Prevent publish on tags 16 | CURRENT_TAG=$(git tag --contains HEAD) 17 | 18 | if [ -z "${STOP_PUBLISH}" ] && [ "$TRAVIS_OS_NAME" = "linux" ] && [ "$ATOM_CHANNEL" = "stable" ] && [ "$TRAVIS_BRANCH" = "$AUTHORIZED_BRANCH" ] && [ -z "$CURRENT_TAG" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] 19 | then 20 | echo 'Publishing...' 21 | else 22 | echo 'Skipping publishing' 23 | exit 0 24 | fi 25 | 26 | ## Git configuration 27 | git config --global user.email "${USER_EMAIL}" 28 | git config --global user.name "${USER_NAME}" 29 | 30 | ## Repository URL 31 | GIT_REPOSITORY=$(git config remote.origin.url) 32 | GIT_REPOSITORY=${GIT_REPOSITORY/git:\/\/github.com\//git@github.com:} 33 | GIT_REPOSITORY=${GIT_REPOSITORY/https:\/\/github.com\//git@github.com:} 34 | 35 | ## Loading SSH key 36 | echo 'Loading key...' 37 | openssl aes-256-cbc -K "$encrypted_d3298c7a84e8_key" -iv "$encrypted_d3298c7a84e8_iv" -in .travis/${SSH_KEY_NAME}.enc -out ~/.ssh/${SSH_KEY_NAME} -d 38 | eval "$(ssh-agent -s)" 39 | chmod 600 ~/.ssh/${SSH_KEY_NAME} 40 | ssh-add ~/.ssh/${SSH_KEY_NAME} 41 | 42 | ## Change origin url to use SSH 43 | git remote set-url origin ${GIT_REPOSITORY} 44 | 45 | ## Force checkout master branch (because Travis uses a detached head) 46 | git checkout ${AUTHORIZED_BRANCH} 47 | 48 | ## Publish 49 | "$APM_SCRIPT_PATH" login --token "${ATOM_ACCESS_TOKEN}" 50 | "$APM_SCRIPT_PATH" publish "${PUBLISH_TYPE}" 51 | -------------------------------------------------------------------------------- /.travis/travis_rsa.enc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/asciidoctor/atom-asciidoc-assistant/4f0c3b43f4399f9efb05d7dd65370336d5b3cf4f/.travis/travis_rsa.enc -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Fernandez Ludovic 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | ### Project specific config ### 2 | environment: 3 | APM_TEST_PACKAGES: language-asciidoc autocomplete-asciidoc asciidoc-preview 4 | ATOM_LINT_WITH_BUNDLED_NODE: "true" 5 | 6 | matrix: 7 | - ATOM_CHANNEL: stable 8 | - ATOM_CHANNEL: beta 9 | 10 | # NOTE: AppVeyor automatically skips the build if the commit contains [ci skip] or [skip ci] or [skip appveyor] 11 | skip_commits: 12 | author: asciidoctor-docbot 13 | 14 | ### Generic setup follows ### 15 | build_script: 16 | - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/atom/ci/master/build-package.ps1')) 17 | 18 | branches: 19 | only: 20 | - master 21 | 22 | version: "{build}" 23 | platform: x64 24 | clone_depth: 10 25 | skip_tags: true 26 | test: off 27 | deploy: off 28 | -------------------------------------------------------------------------------- /coffeelint.json: -------------------------------------------------------------------------------- 1 | { 2 | "max_line_length": { 3 | "level": "ignore" 4 | }, 5 | "no_empty_param_list": { 6 | "level": "error" 7 | }, 8 | "arrow_spacing": { 9 | "level": "error" 10 | }, 11 | "no_interpolation_in_single_quotes": { 12 | "level": "error" 13 | }, 14 | "no_debugger": { 15 | "level": "error" 16 | }, 17 | "prefer_english_operator": { 18 | "level": "error" 19 | }, 20 | "colon_assignment_spacing": { 21 | "spacing": { 22 | "left": 0, 23 | "right": 1 24 | }, 25 | "level": "error" 26 | }, 27 | "braces_spacing": { 28 | "spaces": 0, 29 | "level": "error" 30 | }, 31 | "spacing_after_comma": { 32 | "level": "error" 33 | }, 34 | "no_stand_alone_at": { 35 | "level": "error" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/main.coffee: -------------------------------------------------------------------------------- 1 | module.exports = 2 | 3 | dependenciesInstalled: null 4 | 5 | activate: (state) -> 6 | require('atom-package-deps').install 'asciidoc-assistant' 7 | .then => 8 | @dependenciesInstalled = true 9 | .catch (error) -> 10 | console.error error 11 | 12 | deactivate: -> 13 | @dependenciesInstalled = null 14 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "asciidoc-assistant", 3 | "version": "0.2.3", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "atom-package-deps": { 8 | "version": "5.0.0", 9 | "resolved": "https://registry.npmjs.org/atom-package-deps/-/atom-package-deps-5.0.0.tgz", 10 | "integrity": "sha512-C5Z2V68GuZvuLowrqQ8O8+BE8P4Elhxuc6eZiZ0770CH2e2R/Ausz5VebbDxVOSedFwAaz3CzQJYHayqZ5wKQg==", 11 | "requires": { 12 | "sb-fs": "^3.0.0", 13 | "semver": "^5.6.0" 14 | } 15 | }, 16 | "balanced-match": { 17 | "version": "1.0.0", 18 | "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", 19 | "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", 20 | "dev": true 21 | }, 22 | "brace-expansion": { 23 | "version": "1.1.11", 24 | "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", 25 | "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", 26 | "dev": true, 27 | "requires": { 28 | "balanced-match": "^1.0.0", 29 | "concat-map": "0.0.1" 30 | } 31 | }, 32 | "coffeelint": { 33 | "version": "2.1.0", 34 | "resolved": "https://registry.npmjs.org/coffeelint/-/coffeelint-2.1.0.tgz", 35 | "integrity": "sha1-r2XfNjTpmdmsAUgHNsNtPNL12tg=", 36 | "dev": true, 37 | "requires": { 38 | "coffeescript": "^2.1.0", 39 | "glob": "^7.0.6", 40 | "ignore": "^3.0.9", 41 | "optimist": "^0.6.1", 42 | "resolve": "^0.6.3", 43 | "strip-json-comments": "^1.0.2" 44 | } 45 | }, 46 | "coffeescript": { 47 | "version": "2.3.2", 48 | "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-2.3.2.tgz", 49 | "integrity": "sha512-YObiFDoukx7qPBi/K0kUKyntEZDfBQiqs/DbrR1xzASKOBjGT7auD85/DiPeRr9k++lRj7l3uA9TNMLfyfcD/Q==", 50 | "dev": true 51 | }, 52 | "concat-map": { 53 | "version": "0.0.1", 54 | "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", 55 | "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", 56 | "dev": true 57 | }, 58 | "fs.realpath": { 59 | "version": "1.0.0", 60 | "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", 61 | "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", 62 | "dev": true 63 | }, 64 | "glob": { 65 | "version": "7.1.3", 66 | "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", 67 | "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", 68 | "dev": true, 69 | "requires": { 70 | "fs.realpath": "^1.0.0", 71 | "inflight": "^1.0.4", 72 | "inherits": "2", 73 | "minimatch": "^3.0.4", 74 | "once": "^1.3.0", 75 | "path-is-absolute": "^1.0.0" 76 | } 77 | }, 78 | "ignore": { 79 | "version": "3.3.10", 80 | "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", 81 | "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", 82 | "dev": true 83 | }, 84 | "inflight": { 85 | "version": "1.0.6", 86 | "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", 87 | "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", 88 | "dev": true, 89 | "requires": { 90 | "once": "^1.3.0", 91 | "wrappy": "1" 92 | } 93 | }, 94 | "inherits": { 95 | "version": "2.0.3", 96 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 97 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", 98 | "dev": true 99 | }, 100 | "is-utf8": { 101 | "version": "0.2.1", 102 | "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", 103 | "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" 104 | }, 105 | "minimatch": { 106 | "version": "3.0.4", 107 | "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", 108 | "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", 109 | "dev": true, 110 | "requires": { 111 | "brace-expansion": "^1.1.7" 112 | } 113 | }, 114 | "minimist": { 115 | "version": "0.0.10", 116 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", 117 | "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", 118 | "dev": true 119 | }, 120 | "once": { 121 | "version": "1.4.0", 122 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 123 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 124 | "dev": true, 125 | "requires": { 126 | "wrappy": "1" 127 | } 128 | }, 129 | "optimist": { 130 | "version": "0.6.1", 131 | "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", 132 | "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", 133 | "dev": true, 134 | "requires": { 135 | "minimist": "~0.0.1", 136 | "wordwrap": "~0.0.2" 137 | } 138 | }, 139 | "path-is-absolute": { 140 | "version": "1.0.1", 141 | "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", 142 | "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", 143 | "dev": true 144 | }, 145 | "resolve": { 146 | "version": "0.6.3", 147 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-0.6.3.tgz", 148 | "integrity": "sha1-3ZV5gufnNt699TtYpN2RdUV13UY=", 149 | "dev": true 150 | }, 151 | "sb-fs": { 152 | "version": "3.0.0", 153 | "resolved": "https://registry.npmjs.org/sb-fs/-/sb-fs-3.0.0.tgz", 154 | "integrity": "sha1-+9zdMBDoChuOJ0kM7zNgZJdCA7g=", 155 | "requires": { 156 | "sb-promisify": "^2.0.1", 157 | "strip-bom-buf": "^1.0.0" 158 | } 159 | }, 160 | "sb-promisify": { 161 | "version": "2.0.2", 162 | "resolved": "https://registry.npmjs.org/sb-promisify/-/sb-promisify-2.0.2.tgz", 163 | "integrity": "sha1-QnelR1RIiqlnXYhuNU24lMm9yYE=" 164 | }, 165 | "semver": { 166 | "version": "5.6.0", 167 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", 168 | "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" 169 | }, 170 | "strip-bom-buf": { 171 | "version": "1.0.0", 172 | "resolved": "https://registry.npmjs.org/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz", 173 | "integrity": "sha1-HLRar1dTD0yvhsf3UXnSyaUd1XI=", 174 | "requires": { 175 | "is-utf8": "^0.2.1" 176 | } 177 | }, 178 | "strip-json-comments": { 179 | "version": "1.0.4", 180 | "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", 181 | "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", 182 | "dev": true 183 | }, 184 | "wordwrap": { 185 | "version": "0.0.3", 186 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", 187 | "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", 188 | "dev": true 189 | }, 190 | "wrappy": { 191 | "version": "1.0.2", 192 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 193 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", 194 | "dev": true 195 | } 196 | } 197 | } 198 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "asciidoc-assistant", 3 | "description": "Makes working with AsciiDoc in Atom awesome.", 4 | "version": "0.2.3", 5 | "main": "./lib/main", 6 | "keywords": [ 7 | "asciidoctor", 8 | "asciidoc", 9 | "assistant", 10 | "writer" 11 | ], 12 | "repository": "https://github.com/asciidoctor/atom-asciidoc-assistant", 13 | "license": "MIT", 14 | "engines": { 15 | "atom": ">=1.5.3 <2.0.0" 16 | }, 17 | "dependencies": { 18 | "atom-package-deps": "~5.0.0" 19 | }, 20 | "devDependencies": { 21 | "coffeelint": "^2.1.0" 22 | }, 23 | "package-deps": [ 24 | "language-asciidoc", 25 | "asciidoc-preview", 26 | "autocomplete-asciidoc", 27 | "asciidoc-image-helper" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ### :information_source: **Information** :information_source: 2 | 3 | [GitHub is sunsetting Atom on December 15, 2022](https://github.blog/2022-06-08-sunsetting-atom/). 4 | As a result, we recommend migrating to an alternative solution. The Asciidoctor community is now focusing on providing the best writing experience using the [IntelliJ platform](https://github.com/asciidoctor/asciidoctor-intellij-plugin) or [Visual Studio Code](https://github.com/asciidoctor/asciidoctor-vscode). 5 | 6 | On December 15, 2022, this repository will be archived. 7 | 8 | --- 9 | 10 | # AsciiDoc Assistant Package 11 | 12 | [![Atom Package](https://img.shields.io/apm/v/asciidoc-assistant.svg)](https://atom.io/packages/asciidoc-assistant) 13 | [![Atom Package Downloads](https://img.shields.io/apm/dm/asciidoc-assistant.svg)](https://atom.io/packages/asciidoc-assistant) 14 | [![Build Status (Linux)](https://travis-ci.org/asciidoctor/atom-asciidoc-assistant.svg?branch=master)](https://travis-ci.org/asciidoctor/atom-asciidoc-assistant) 15 | [![Build status (Windows)](https://ci.appveyor.com/api/projects/status/gf8m9jl2rij7u9jh?svg=true)](https://ci.appveyor.com/project/asciidoctor/atom-asciidoc-assistant) 16 | [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/asciidoctor/atom-asciidoc-assistant/blob/master/LICENSE.md) 17 | 18 | This package adds extra functionality to Atom for the AsciiDoc(octor) language by installing the following packages: 19 | 20 | - [language-asciidoc](https://github.com/asciidoctor/atom-language-asciidoc) 21 | - [asciidoc-preview](https://github.com/asciidoctor/atom-asciidoc-preview) 22 | - [autocomplete-asciidoc](https://github.com/asciidoctor/atom-autocomplete-asciidoc) 23 | - [asciidoc-image-helper](https://github.com/asciidoctor/atom-asciidoc-image-helper) 24 | -------------------------------------------------------------------------------- /spec/main-spec.coffee: -------------------------------------------------------------------------------- 1 | 2 | describe 'asciidoc-assistant', -> 3 | 4 | mainModule = null 5 | 6 | beforeEach -> 7 | 8 | waitsForPromise -> 9 | atom.packages.activatePackage 'asciidoc-assistant' 10 | .then (pack) -> 11 | mainModule = pack.mainModule 12 | return 13 | 14 | describe 'when the asciidoc-assistant package is activated', -> 15 | it 'activates successfully', -> 16 | expect(mainModule).toBeDefined() 17 | expect(mainModule).toBeTruthy() 18 | expect(mainModule.activate).toBeDefined() 19 | expect(mainModule.deactivate).toBeDefined() 20 | --------------------------------------------------------------------------------