mirror of
https://github.com/atom/atom.git
synced 2026-02-14 08:35:11 -05:00
19 lines
350 B
CoffeeScript
19 lines
350 B
CoffeeScript
fs = require 'fs'
|
|
|
|
module.exports =
|
|
class Package
|
|
@build: (path) ->
|
|
TextMatePackage = require 'text-mate-package'
|
|
AtomPackage = require 'atom-package'
|
|
|
|
if TextMatePackage.testName(path)
|
|
new TextMatePackage(path)
|
|
else
|
|
new AtomPackage(path)
|
|
|
|
name: null
|
|
path: null
|
|
|
|
constructor: (@path) ->
|
|
@name = fs.base(@path)
|