forked from xpack/xpm-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
44 lines (36 loc) · 1.31 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* This file is part of the xPack project (http://xpack.github.io).
* Copyright (c) 2017 Liviu Ionescu. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software
* for any purpose is hereby granted, under the terms of the MIT license.
*
* If a copy of the license was not distributed with this file, it can
* be obtained from https://opensource.org/licenses/MIT/.
*/
'use strict'
/**
* This is the module entry point, the file that is processed when
* `require('<module>')` is called.
*
* For this to work, it must be linked from `package.json` as
* `"main": "./index.js",`, which is, BTW, the default behaviour.
*
* To import classes from this module into Node.js applications, use:
*
* ```javascript
* const { Main } = require('<module>')
* ```
*/
// ES6: `import { Main } from './lib/main.js'
const { Main } = require('./lib/main.js')
// ----------------------------------------------------------------------------
// Node.js specific export definitions.
// By default, `module.exports = {}`.
// The Main class is added as a property with the same name to this object.
module.exports.Main = Main
// In ES6, it would be:
// export class Main { ... }
// ...
// import { Main } from 'module.js'
// ----------------------------------------------------------------------------