Skip to content

Commit

Permalink
Added linux scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
soyrochus committed Aug 12, 2016
1 parent ed0f202 commit 60b5875
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 12 deletions.
46 changes: 36 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
# OASP/Devonfw Atom editor ("IDE") settings & packages

## Introduction

npm install -g babel-cli typescript jshint
Web development in general, not just development with OASP4JS & Devon4Sencha, is typically done with other editors / IDE's than the default Eclipse which comes with the OASP IDE / Devonfw Distribution. Front-end developers are typically not very content with the features and user-experience of Eclipse for web development. This small project is intended to provide a default configuration for the Atom editor, so we can provision an alternative environment more suitable to the needs, tastes and whims of the wevbdev.

Currently the
This config can be used stand-alone or, alternatively, could be used in next versions of the OASP IDE / Devonfw Dist alongside Eclipse.

- linter / jshint
- typescript
- babel
- minimap
- atom-beautify
- Git Plus
- asciidoc preview
- language-asciidoc
## Prerequisites

You can use either the [different platform specific installers](https://github.com/atom/atom/releases/tag/v1.9.8) or the compressed binaries which can be used without "installing". Take a look at the [Linux version (_tar.gz_ file)](https://github.com/atom/atom/releases/download/v1.9.8/atom-amd64.tar.gz) or the
[Windows version (_zip_ file)](https://github.com/atom/atom/releases/download/v1.9.8/atom-windows.zip).


See the file [_config/packages.lst_ for the list of included packages](https://raw.githubusercontent.com/ivanderk/oasp-atom-ide/master/config/packages.lst). If you want to add a package, install it in your own installation, run the script _backuppackages.(bat|sh)_ and commit / push the resulting file _config/packages.lst_.


## Configure Atom

Make a clone of this repository to you local hard drive. Modify the file _env.bat_ or _env.sh_ according to your needs. There are two environment variables which need to be assigned a value:

- `ATOM_HOME`: needs to point to the _config_ directory in the cloned repository.
- `ATOM_BIN`: needs to point to the directory containing the Atom binary files.

After this you can install the required packages by running the command:

restorepackages.(bat|sh)

after which Atom will be ready to run. You can start it by running the command:

runatom.(bat|sh)


## Install node packages

In order to use the packages in Atom you need the corresponding tool chain installed: tools like Typescript etc. All relevant tools can be installed with the following command (note that Node.js must be installed; a version of node is avaiable in the OASP IDE / Devonfw Dist).

npm install -g babel-cli typescript jshint

Note that this installs the node modules _globally_ on the system, a practice which is recommended against by some projects (Babel in particular). Install the packages _locally_ in a project directory if that is more to your liking.
9 changes: 9 additions & 0 deletions backuppackages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@echo off

pushd %~dp0

call env.bat

%ATOM_BIN%\resources\app\apm\bin\apm list --installed --bare %ATOM_HOME%\packages.lst

popd
5 changes: 3 additions & 2 deletions config/packages.lst
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ [email protected]
[email protected]
[email protected]
[email protected]


[email protected]
[email protected]
[email protected]
4 changes: 4 additions & 0 deletions env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@


export ATOM_HOME=/home/iwk/src/oasp-atom-ide/config
export ATOM_BIN=/home/iwk/tmp/atom-1.9.8-amd64
10 changes: 10 additions & 0 deletions restorepackages.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

pushd $DIR
source env.sh

$ATOM_BIN/resources/app/apm/bin/apm install --packages-file $ATOM_HOME/packages.lst

popd
12 changes: 12 additions & 0 deletions runatom.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

pushd $DIR
source env.sh

echo $ATOM_HOME

$ATOM_BIN/atom &!

popd

0 comments on commit 60b5875

Please sign in to comment.