-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
701 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"env": { | ||
"test-build": { | ||
"import": { | ||
"replacement": { | ||
"from": "^((../)+)src", | ||
"to": "$1build" | ||
} | ||
} | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "artdeco" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Zoroaster", | ||
"program": "${workspaceFolder}/node_modules/.bin/zoroaster", | ||
"env": { | ||
"NODE_DEBUG": "depack", | ||
}, | ||
"console": "integratedTerminal", | ||
"args": [ | ||
"test/spec", | ||
"test/mask", | ||
"-a", | ||
"-w", | ||
"-t", | ||
"9999999" | ||
], | ||
"skipFiles": [ | ||
"<node_internals>/**/*.js" | ||
] | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Example", | ||
"program": "${workspaceFolder}/example/index.js", | ||
"env": { | ||
"NODE_DEBUG": "depack", | ||
}, | ||
"console": "integratedTerminal", | ||
"args": [ | ||
"example/example.js" | ||
], | ||
"skipFiles": [ | ||
"<node_internals>/**/*.js" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## 1 November 2018 | ||
|
||
### 1.0.0 | ||
|
||
- Create `depack` with [`mnp`][https://mnpjs.org] | ||
- [repository]: `src`, `test` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,65 @@ | ||
# depack | ||
Unpackager Of Dependencies To Create "Zero-Dependency Build" With Closure. | ||
|
||
[](https://npmjs.org/package/depack) | ||
|
||
`depack` is Unpackager Of Dependencies To Create "Zero-Dependency Build" With Closure. | ||
|
||
```sh | ||
yarn add -E depack | ||
``` | ||
|
||
## Table Of Contents | ||
|
||
- [Table Of Contents](#table-of-contents) | ||
- [API](#api) | ||
- [`depack(arg1: string, arg2?: boolean)`](#mynewpackagearg1-stringarg2-boolean-void) | ||
* [`Config`](#type-config) | ||
- [Copyright](#copyright) | ||
|
||
<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/0.svg?sanitize=true"></a></p> | ||
|
||
## API | ||
|
||
The package is available by importing its default function: | ||
|
||
```js | ||
import depack from 'depack' | ||
``` | ||
|
||
<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/1.svg?sanitize=true"></a></p> | ||
|
||
## `depack(`<br/> `arg1: string,`<br/> `arg2?: boolean,`<br/>`): void` | ||
|
||
Call this function to get the result you want. | ||
|
||
__<a name="type-config">`Config`</a>__: Options for the program. | ||
|
||
| Name | Type | Description | Default | | ||
| --------- | --------- | ----------------- | ------- | | ||
| shouldRun | _boolean_ | A boolean option. | `true` | | ||
| __text*__ | _string_ | A text to return. | - | | ||
|
||
```js | ||
/* yarn example/ */ | ||
import depack from 'depack' | ||
|
||
(async () => { | ||
const res = await depack({ | ||
text: 'example', | ||
}) | ||
console.log(res) | ||
})() | ||
``` | ||
``` | ||
example | ||
``` | ||
|
||
<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/2.svg?sanitize=true"></a></p> | ||
|
||
## Copyright | ||
|
||
(c) [Art Deco][1] 2018 | ||
|
||
[1]: https://artdeco.bz | ||
|
||
<p align="center"><a href="#table-of-contents"><img src=".documentary/section-breaks/-1.svg?sanitize=true"></a></p> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
## API | ||
|
||
The package is available by importing its default function: | ||
|
||
```js | ||
import depack from 'depack' | ||
``` | ||
|
||
%~% | ||
|
||
```## depack | ||
[ | ||
["arg1", "string"], | ||
["arg2?", "boolean"] | ||
] | ||
``` | ||
|
||
Call this function to get the result you want. | ||
|
||
%TYPEDEF types/index.xml% | ||
|
||
%EXAMPLE: example/example.js, ../src => depack% | ||
%FORK example example/example% | ||
|
||
%~% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- ## TODO | ||
- [ ] Add a new item to the todo list. --> | ||
|
||
## Copyright | ||
|
||
(c) [Art Deco][1] 2018 | ||
|
||
[1]: https://artdeco.bz | ||
|
||
%~ -1% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# depack | ||
|
||
%NPM: depack% | ||
|
||
`depack` is Unpackager Of Dependencies To Create "Zero-Dependency Build" With Closure. | ||
|
||
```sh | ||
yarn add -E depack | ||
``` | ||
|
||
## Table Of Contents | ||
|
||
%TOC% | ||
|
||
%~% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/* yarn example/ */ | ||
import depack from '../src' | ||
|
||
(async () => { | ||
const res = await depack({ | ||
text: 'example', | ||
}) | ||
console.log(res) | ||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
require('alamode')() | ||
require(`../${process.argv[2]}`) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "depack", | ||
"version": "0.0.0", | ||
"description": "Unpackager Of Dependencies To Create "Zero-Dependency Build" With Closure.", | ||
"main": "build", | ||
"scripts": { | ||
"t": "zoroaster -a", | ||
"test": "yarn t test/spec test/mask", | ||
"spec": "yarn t test/spec", | ||
"mask": "yarn t test/mask", | ||
"test-build": "ALAMODE_ENV=test-build yarn test", | ||
"lint": "eslint .", | ||
"doc": "NODE_DEBUG=doc doc documentary -o README.md", | ||
"b": "alamode src -o build", | ||
"d": "yarn-s d1", | ||
"d1": "NODE_DEBUG=doc doc src/index.js -g", | ||
"build": "yarn-s d b doc", | ||
"rec": "NODE_DEBUG=appshot appshot -T 23 -a Terminal -y 150 -f", | ||
"e": "node example", | ||
"example/": "yarn e example/example.js" | ||
}, | ||
"files": [ | ||
"build" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/artdecocode/depack.git" | ||
}, | ||
"keywords": [ | ||
"depack" | ||
], | ||
"author": "Anton <anton@adc.sh>", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/artdecocode/depack/issues" | ||
}, | ||
"homepage": "https://github.com/artdecocode/depack#readme", | ||
"devDependencies": { | ||
"alamode": "1.5.1", | ||
"documentary": "1.20.1", | ||
"eslint-config-artdeco": "1.0.1", | ||
"yarn-s": "1.1.0", | ||
"zoroaster": "3.5.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { debuglog } from 'util' | ||
|
||
const LOG = debuglog('depack') | ||
|
||
/** | ||
* Unpackager Of Dependencies To Create "Zero-Dependency Build" With Closure. | ||
* @param {Config} [config] Options for the program. | ||
* @param {boolean} [config.shouldRun=true] A boolean option. Default `true`. | ||
* @param {string} config.text A text to return. | ||
*/ | ||
export default async function depack(config = {}) { | ||
const { | ||
shouldRun = true, | ||
text, | ||
} = config | ||
if (!shouldRun) return | ||
LOG('depack called with %s', text) | ||
return text | ||
} | ||
|
||
/* documentary types/index.xml */ | ||
/** | ||
* @typedef {Object} Config Options for the program. | ||
* @prop {boolean} [shouldRun=true] A boolean option. Default `true`. | ||
* @prop {string} text A text to return. | ||
*/ |
Oops, something went wrong.