first commit
This commit is contained in:
commit
beb4696b23
5 changed files with 55 additions and 0 deletions
5
npm/.gitignore
vendored
Normal file
5
npm/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
node_modules
|
||||||
|
*.zip
|
||||||
|
darwin/
|
||||||
|
win32/
|
||||||
|
linux/
|
8
npm/README.md
Normal file
8
npm/README.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# atom-shell
|
||||||
|
|
||||||
|
Install [atom-shell](https://github.com/atom/atom-shell) prebuilts using npm
|
||||||
|
|
||||||
|
```
|
||||||
|
npm install -g atom-shell
|
||||||
|
atom-shell # will open atom shell
|
||||||
|
```
|
2
npm/darwin.sh
Executable file
2
npm/darwin.sh
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/bash
|
||||||
|
./darwin/Atom.app/Contents/MacOS/Atom
|
21
npm/install.js
Executable file
21
npm/install.js
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
var os = require('os')
|
||||||
|
var path = require('path')
|
||||||
|
var nugget = require('nugget')
|
||||||
|
var extract = require('extract-zip')
|
||||||
|
|
||||||
|
var version = '0.18.0'
|
||||||
|
var name = version+'-atom-shell.zip'
|
||||||
|
var url = 'https://github.com/atom/atom-shell/releases/download/v'+version+'/atom-shell-v'+version+'-'+os.platform()+'-'+os.arch()+'.zip'
|
||||||
|
|
||||||
|
var onerror = function(err) {
|
||||||
|
throw err
|
||||||
|
}
|
||||||
|
|
||||||
|
nugget(url, {target:name, dir:__dirname, resume:true}, function(err) {
|
||||||
|
if (err) return onerror(err)
|
||||||
|
extract(path.join(__dirname, name), {dir:path.join(__dirname, os.platform())}, function(err) {
|
||||||
|
if (err) return onerror(err)
|
||||||
|
})
|
||||||
|
})
|
19
npm/package.json
Normal file
19
npm/package.json
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"name": "atom-shell",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Install atom-shell prebuilts using npm",
|
||||||
|
"scripts": {
|
||||||
|
"install": "./install.js"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"atom-shell": "./darwin.sh"
|
||||||
|
},
|
||||||
|
"main": "install.js",
|
||||||
|
"dependencies": {
|
||||||
|
"extract-zip": "^1.0.3",
|
||||||
|
"nugget": "^1.1.2"
|
||||||
|
},
|
||||||
|
"devDependencies": {},
|
||||||
|
"author": "Mathias Buus",
|
||||||
|
"license": "MIT"
|
||||||
|
}
|
Loading…
Reference in a new issue