@putout/bundler 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +87 -0
- package/bundle.js +26 -0
- package/example/entry.js +2 -0
- package/example/one.js +1 -0
- package/lib/bundle-files/index.js +95 -0
- package/lib/bundler.js +86 -0
- package/lib/parse-filenames/index.js +57 -0
- package/lib/parse-filenames/parse-require/index.js +23 -0
- package/lib/resolve-filenames/index.js +36 -0
- package/lib/resolve-filenames/resolve-require/index.js +39 -0
- package/package.json +82 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) coderaiser
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Bundle [![License][LicenseIMGURL]][LicenseURL] [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]
|
|
2
|
+
|
|
3
|
+
[NPMURL]: https://npmjs.org/package/@putout/bundler "npm"
|
|
4
|
+
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/bundler.svg?style=flat&longCache=true
|
|
5
|
+
[BuildStatusURL]: https://github.com/putoutjs/printer/actions/workflows/nodejs.yml "Build Status"
|
|
6
|
+
[BuildStatusIMGURL]: https://github.com/putoutjs/printer/actions/workflows/nodejs.yml/badge.svg
|
|
7
|
+
[LicenseURL]: https://tldrlegal.com/license/mit-license "MIT License"
|
|
8
|
+
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
|
|
9
|
+
[CoverageURL]: https://coveralls.io/github/putoutjs/printer?branch=master
|
|
10
|
+
[CoverageIMGURL]: https://coveralls.io/repos/putoutjs/printer/badge.svg?branch=master&service=github
|
|
11
|
+
|
|
12
|
+
## Install
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
npm i @putout/bundle
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Convert ESM to CommonJS
|
|
19
|
+
|
|
20
|
+
To Simplify things up all files converted to CommonJS first.
|
|
21
|
+
Let's suppose none of them use top-level await to get things simpler.
|
|
22
|
+
|
|
23
|
+
## Parse filenames
|
|
24
|
+
|
|
25
|
+
Traverse all files starting from `entry` and get all filenames.
|
|
26
|
+
|
|
27
|
+
- [`parse-require`](https://putout.cloudcmd.io/#/gist/d973366be6b07ab705b5c9d793369904/ca8b6b15fa953d95f57b42e07136c65791f38ca1);
|
|
28
|
+
- [`parse-filenames`](https://putout.cloudcmd.io/#/gist/d973366be6b07ab705b5c9d793369904/3067150ad161029e75b95e9bfff290e03953ef41);
|
|
29
|
+
- [`resolve-filenames`](https://putout.cloudcmd.io/#/gist/8ca1ac9b5fb4d1a47d185836c3f0b393/edf99b8064fe0faf4545aa0cc66138a7fa34c557);
|
|
30
|
+
- [`resolve-require`](https://putout.cloudcmd.io/#/gist/833539f66cb238fcc3b6ca6cee61ef9e/79a068c96b686bb0eacdf3f570d532981499b114);
|
|
31
|
+
- [`bundle-files`](https://putout.cloudcmd.io/#/gist/7dd3bffa8e88f7542c84065f622b63d7/3b1e68e0babc3a72af947076ed9801c0034a096e);
|
|
32
|
+
|
|
33
|
+
## Bundle all files to object
|
|
34
|
+
|
|
35
|
+
Traverse filesystem and create object that contains filename and file content:
|
|
36
|
+
|
|
37
|
+
```js
|
|
38
|
+
const __filesystem = {
|
|
39
|
+
'/entry.js': () => {
|
|
40
|
+
const client = require('/client.js');
|
|
41
|
+
console.log(client);
|
|
42
|
+
},
|
|
43
|
+
'/client.js': (exports, require, module) => {
|
|
44
|
+
module.exports = 'hello';
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## IIFE
|
|
50
|
+
|
|
51
|
+
Most likely we need IIFE so couple bundles can be loaded on page simultaneously.
|
|
52
|
+
|
|
53
|
+
## Result Example
|
|
54
|
+
|
|
55
|
+
```js
|
|
56
|
+
const __modules = {};
|
|
57
|
+
const __filesystem = {
|
|
58
|
+
'/entry.js': () => {
|
|
59
|
+
const client = require('/client.js');
|
|
60
|
+
console.log(client);
|
|
61
|
+
},
|
|
62
|
+
'/client.js': (exports, require, module) => {
|
|
63
|
+
module.exports = 'hello';
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const require = (name) => {
|
|
68
|
+
const exports = {};
|
|
69
|
+
const module = {
|
|
70
|
+
exports,
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
if (__modules[name])
|
|
74
|
+
return __modules[name];
|
|
75
|
+
|
|
76
|
+
__filesystem[name](exports, require, module);
|
|
77
|
+
__modules[name] = module.exports;
|
|
78
|
+
|
|
79
|
+
return module.exports;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
require('/entry.js');
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
MIT
|
package/bundle.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
const __filesystem = {
|
|
3
|
+
'/example/one.js': (exports, require, module) => {
|
|
4
|
+
module.exports = 'hello';
|
|
5
|
+
},
|
|
6
|
+
'/example/entry.js': (exports, require, module) => {
|
|
7
|
+
const one = require('/example/one.js');
|
|
8
|
+
console.log(one);
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
const __modules = {};
|
|
12
|
+
const require = (name) => {
|
|
13
|
+
const exports = {};
|
|
14
|
+
const module = {
|
|
15
|
+
exports,
|
|
16
|
+
};
|
|
17
|
+
if (__modules[name])
|
|
18
|
+
return __modules[name];
|
|
19
|
+
|
|
20
|
+
__filesystem[name](exports, require, module);
|
|
21
|
+
__modules[name] = module.exports;
|
|
22
|
+
return module.exports;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
require('/example/entry.js');
|
|
26
|
+
})();
|
package/example/entry.js
ADDED
package/example/one.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = "hello";
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
types,
|
|
3
|
+
operator,
|
|
4
|
+
template,
|
|
5
|
+
} from 'putout';
|
|
6
|
+
|
|
7
|
+
const {
|
|
8
|
+
replaceWith,
|
|
9
|
+
getFilename,
|
|
10
|
+
readFileContent,
|
|
11
|
+
} = operator;
|
|
12
|
+
|
|
13
|
+
const {
|
|
14
|
+
Identifier,
|
|
15
|
+
VariableDeclarator,
|
|
16
|
+
VariableDeclaration,
|
|
17
|
+
StringLiteral,
|
|
18
|
+
ObjectProperty,
|
|
19
|
+
ObjectExpression,
|
|
20
|
+
} = types;
|
|
21
|
+
|
|
22
|
+
const createFunction = template('(exports, require, module) => {BODY}');
|
|
23
|
+
|
|
24
|
+
const createIIFEE = template(`
|
|
25
|
+
(() => {
|
|
26
|
+
FILESYSTEM;
|
|
27
|
+
MODULES;
|
|
28
|
+
REQUIRE;
|
|
29
|
+
ENTRY;
|
|
30
|
+
})()
|
|
31
|
+
`);
|
|
32
|
+
|
|
33
|
+
export const report = () => '';
|
|
34
|
+
|
|
35
|
+
export const fix = (root, {entry, filenames, trackFile}) => {
|
|
36
|
+
const object = ObjectExpression([]);
|
|
37
|
+
|
|
38
|
+
for (const file of trackFile(root, filenames)) {
|
|
39
|
+
const content = readFileContent(file);
|
|
40
|
+
const filename = getFilename(file);
|
|
41
|
+
const property = ObjectProperty(StringLiteral(filename), createFunction({
|
|
42
|
+
BODY: template.ast(content),
|
|
43
|
+
}));
|
|
44
|
+
|
|
45
|
+
object.properties.push(property);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const filesystem = VariableDeclaration('const', [VariableDeclarator(Identifier('__filesystem'), object)]);
|
|
49
|
+
|
|
50
|
+
replaceWith(root.parentPath, createIIFEE({
|
|
51
|
+
FILESYSTEM: filesystem,
|
|
52
|
+
MODULES: createModules(),
|
|
53
|
+
REQUIRE: createRequire(),
|
|
54
|
+
ENTRY: requireEntry(entry),
|
|
55
|
+
}));
|
|
56
|
+
};
|
|
57
|
+
export const scan = (root, {push, options, trackFile}) => {
|
|
58
|
+
const {entry, filenames = []} = options;
|
|
59
|
+
|
|
60
|
+
if (!entry || !filenames.length)
|
|
61
|
+
return;
|
|
62
|
+
|
|
63
|
+
push(root, {
|
|
64
|
+
entry,
|
|
65
|
+
filenames,
|
|
66
|
+
trackFile,
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
function createModules() {
|
|
71
|
+
return template.ast(`const __modules = {}`);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function requireEntry(entry) {
|
|
75
|
+
return template.ast(`require("${entry}")`);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function createRequire() {
|
|
79
|
+
return template.ast(`
|
|
80
|
+
const require = (name) => {
|
|
81
|
+
const exports = {};
|
|
82
|
+
const module = {
|
|
83
|
+
exports,
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
if (__modules[name])
|
|
87
|
+
return __modules[name];
|
|
88
|
+
|
|
89
|
+
__filesystem[name](exports, require, module);
|
|
90
|
+
__modules[name] = module.exports;
|
|
91
|
+
|
|
92
|
+
return module.exports;
|
|
93
|
+
};
|
|
94
|
+
`);
|
|
95
|
+
}
|
package/lib/bundler.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import {
|
|
2
|
+
parse,
|
|
3
|
+
transform,
|
|
4
|
+
print,
|
|
5
|
+
findPlaces,
|
|
6
|
+
} from 'putout';
|
|
7
|
+
import {createProgress} from '@putout/engine-runner/progress';
|
|
8
|
+
import * as pluginFilesystem from '@putout/plugin-filesystem';
|
|
9
|
+
import * as pluginParseFilenames from './parse-filenames/index.js';
|
|
10
|
+
import * as pluginResolveFilenames from './resolve-filenames/index.js';
|
|
11
|
+
import * as pluginBundleFiles from './bundle-files/index.js';
|
|
12
|
+
import {
|
|
13
|
+
branch as originalBranch,
|
|
14
|
+
merge as originalMerge,
|
|
15
|
+
} from '@putout/processor-filesystem';
|
|
16
|
+
|
|
17
|
+
const [, replaceCwd] = pluginFilesystem.rules['replace-cwd'];
|
|
18
|
+
const [, readAllFiles] = pluginFilesystem.rules['read-all-files'];
|
|
19
|
+
|
|
20
|
+
const getMessage = (a) => a.message;
|
|
21
|
+
|
|
22
|
+
export const bundler = (from, entry, filesystem, {
|
|
23
|
+
progress = createProgress(),
|
|
24
|
+
branch = originalBranch,
|
|
25
|
+
merge = originalMerge,
|
|
26
|
+
} = {}) => {
|
|
27
|
+
const [{source}] = branch(filesystem);
|
|
28
|
+
const ast = parse(source);
|
|
29
|
+
|
|
30
|
+
transform(ast, filesystem, {
|
|
31
|
+
fix: true,
|
|
32
|
+
fixCount: 1,
|
|
33
|
+
progress,
|
|
34
|
+
rules: {
|
|
35
|
+
'read-all-files': ['on', {
|
|
36
|
+
mask: '*.js',
|
|
37
|
+
}],
|
|
38
|
+
'replace-cwd': ['on', {
|
|
39
|
+
from,
|
|
40
|
+
to: '/',
|
|
41
|
+
}],
|
|
42
|
+
},
|
|
43
|
+
plugins: [
|
|
44
|
+
['read-all-files', readAllFiles],
|
|
45
|
+
['replace-cwd', replaceCwd],
|
|
46
|
+
],
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
debugger;
|
|
50
|
+
const places = findPlaces(ast, filesystem, {
|
|
51
|
+
rules: {
|
|
52
|
+
'parse-filenames': ['on', {
|
|
53
|
+
entry,
|
|
54
|
+
}],
|
|
55
|
+
},
|
|
56
|
+
plugins: [
|
|
57
|
+
['parse-filenames', pluginParseFilenames],
|
|
58
|
+
],
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
debugger;
|
|
62
|
+
|
|
63
|
+
const code = print(ast);
|
|
64
|
+
|
|
65
|
+
merge(filesystem, [code]);
|
|
66
|
+
const filenames = places.map(getMessage);
|
|
67
|
+
|
|
68
|
+
transform(ast, filesystem, {
|
|
69
|
+
progress,
|
|
70
|
+
rules: {
|
|
71
|
+
'resolve-filenames': ['on', {
|
|
72
|
+
filenames,
|
|
73
|
+
}],
|
|
74
|
+
'bundle-files': ['on', {
|
|
75
|
+
entry: filenames[0],
|
|
76
|
+
filenames,
|
|
77
|
+
}],
|
|
78
|
+
},
|
|
79
|
+
plugins: [
|
|
80
|
+
['resolve-filenames', pluginResolveFilenames],
|
|
81
|
+
['bundle-files', pluginBundleFiles],
|
|
82
|
+
],
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
return print(ast);
|
|
86
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import putout from 'putout';
|
|
2
|
+
import {dirname} from 'node:path';
|
|
3
|
+
// parse-require
|
|
4
|
+
import * as parseRequire from './parse-require/index.js';
|
|
5
|
+
import * as convertEsmToCommonjs from '@putout/plugin-nodejs/convert-esm-to-commonjs';
|
|
6
|
+
|
|
7
|
+
// parse-require
|
|
8
|
+
const {operator} = putout;
|
|
9
|
+
const {
|
|
10
|
+
readFileContent,
|
|
11
|
+
getFilename,
|
|
12
|
+
findFile,
|
|
13
|
+
} = operator;
|
|
14
|
+
|
|
15
|
+
const getMessage = ({message}) => message;
|
|
16
|
+
|
|
17
|
+
export const report = (root, {file}) => file;
|
|
18
|
+
export const fix = () => {};
|
|
19
|
+
export const scan = (root, {push, options}) => {
|
|
20
|
+
debugger;
|
|
21
|
+
const {entry = '/index.js'} = options;
|
|
22
|
+
const files = new Set();
|
|
23
|
+
const processingNames = new Set([entry]);
|
|
24
|
+
|
|
25
|
+
for (const currentName of processingNames) {
|
|
26
|
+
const [file] = findFile(root, currentName);
|
|
27
|
+
|
|
28
|
+
if (!file)
|
|
29
|
+
throw Error(`file '${currentName}' not found`);
|
|
30
|
+
|
|
31
|
+
const filename = getFilename(file);
|
|
32
|
+
const dir = dirname(filename);
|
|
33
|
+
|
|
34
|
+
files.add(filename);
|
|
35
|
+
|
|
36
|
+
const {places} = putout(readFileContent(file), {
|
|
37
|
+
rules: {
|
|
38
|
+
'parse-require': ['on', {
|
|
39
|
+
dir,
|
|
40
|
+
}],
|
|
41
|
+
},
|
|
42
|
+
plugins: [
|
|
43
|
+
['convert-esm-to-commonjs', convertEsmToCommonjs],
|
|
44
|
+
['parse-require', parseRequire],
|
|
45
|
+
],
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
for (const name of places.map(getMessage))
|
|
49
|
+
processingNames.add(name);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
for (const file of files) {
|
|
53
|
+
push(root, {
|
|
54
|
+
file,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
import {resolve} from 'node:path';
|
|
3
|
+
|
|
4
|
+
const {getTemplateValues} = operator;
|
|
5
|
+
|
|
6
|
+
export const report = ({filename}) => maybeAddJs(filename);
|
|
7
|
+
export const fix = () => {};
|
|
8
|
+
|
|
9
|
+
const REQUIRE = 'require(__a)';
|
|
10
|
+
const maybeAddJs = (a) => a.endsWith('js') ? a : `${a}.js`;
|
|
11
|
+
|
|
12
|
+
export const traverse = ({push, options}) => ({
|
|
13
|
+
[REQUIRE]: (path) => {
|
|
14
|
+
const {dir = '/'} = options;
|
|
15
|
+
const {__a} = getTemplateValues(path, REQUIRE);
|
|
16
|
+
const filename = resolve(dir, __a.value);
|
|
17
|
+
|
|
18
|
+
push({
|
|
19
|
+
path,
|
|
20
|
+
filename,
|
|
21
|
+
});
|
|
22
|
+
},
|
|
23
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import putout, {operator} from 'putout';
|
|
2
|
+
import {dirname} from 'node:path';
|
|
3
|
+
import * as resolveRequire from './resolve-require/index.js';
|
|
4
|
+
import * as convertEsmToCommonjs from '@putout/plugin-nodejs/convert-esm-to-commonjs';
|
|
5
|
+
|
|
6
|
+
const {
|
|
7
|
+
writeFileContent,
|
|
8
|
+
getFilename,
|
|
9
|
+
readFileContent,
|
|
10
|
+
} = operator;
|
|
11
|
+
|
|
12
|
+
export const report = (file) => getFilename(file);
|
|
13
|
+
export const fix = (file) => {
|
|
14
|
+
const {code} = putout(readFileContent(file), {
|
|
15
|
+
fixCount: 1,
|
|
16
|
+
rules: {
|
|
17
|
+
'resolve-require': ['on', {
|
|
18
|
+
dir: dirname(getFilename(file)),
|
|
19
|
+
}],
|
|
20
|
+
},
|
|
21
|
+
plugins: [
|
|
22
|
+
['convert-esm-to-commonjs', convertEsmToCommonjs],
|
|
23
|
+
['resolve-require', resolveRequire],
|
|
24
|
+
],
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
writeFileContent(file, code);
|
|
28
|
+
};
|
|
29
|
+
export const scan = (root, {push, trackFile, options}) => {
|
|
30
|
+
const {filenames} = options;
|
|
31
|
+
|
|
32
|
+
for (const file of trackFile(root, filenames)) {
|
|
33
|
+
push(file);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {operator} from 'putout';
|
|
2
|
+
import {resolve} from 'node:path';
|
|
3
|
+
|
|
4
|
+
const {
|
|
5
|
+
getTemplateValues,
|
|
6
|
+
setLiteralValue,
|
|
7
|
+
} = operator;
|
|
8
|
+
|
|
9
|
+
const maybeAddJs = (a) => {
|
|
10
|
+
if (a.endsWith('.js'))
|
|
11
|
+
return a;
|
|
12
|
+
|
|
13
|
+
return `${a}.js`;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const report = ({filename}) => filename;
|
|
17
|
+
export const fix = ({path, filename}) => {
|
|
18
|
+
const [arg] = path.node.arguments;
|
|
19
|
+
setLiteralValue(arg, maybeAddJs(filename));
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const REQUIRE = 'require(__a)';
|
|
23
|
+
|
|
24
|
+
export const traverse = ({push, options}) => ({
|
|
25
|
+
[REQUIRE]: (path) => {
|
|
26
|
+
const {dir = '/'} = options;
|
|
27
|
+
const {__a} = getTemplateValues(path, REQUIRE);
|
|
28
|
+
|
|
29
|
+
if (__a.value.startsWith('/'))
|
|
30
|
+
return;
|
|
31
|
+
|
|
32
|
+
const filename = resolve(dir, __a.value);
|
|
33
|
+
|
|
34
|
+
push({
|
|
35
|
+
path,
|
|
36
|
+
filename,
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@putout/bundler",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
|
+
"description": "Lint Filesystem with 🐊Putout",
|
|
7
|
+
"homepage": "https://github.com/putoutjs/bundler#readme",
|
|
8
|
+
"main": "./lib/bundler.js",
|
|
9
|
+
"bin": {
|
|
10
|
+
"bundler": "bin/bundler.js"
|
|
11
|
+
},
|
|
12
|
+
"exports": {
|
|
13
|
+
".": "./lib/bundler.js"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git://github.com/putoutjs/bundler.git"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"wisdom": "madrun wisdom",
|
|
21
|
+
"test": "madrun test",
|
|
22
|
+
"test:dts": "madrun test:dts",
|
|
23
|
+
"watch:test": "madrun watch:test",
|
|
24
|
+
"lint": "madrun lint",
|
|
25
|
+
"fresh:lint": "madrun fresh:lint",
|
|
26
|
+
"lint:fresh": "madrun lint:fresh",
|
|
27
|
+
"fix:lint": "madrun fix:lint",
|
|
28
|
+
"coverage": "madrun coverage",
|
|
29
|
+
"coverage:html": "madrun coverage:html",
|
|
30
|
+
"report": "madrun report"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@putout/cli-choose": "^2.0.0",
|
|
34
|
+
"@putout/cli-filesystem": "^2.0.1",
|
|
35
|
+
"@putout/engine-runner": "^21.0.0",
|
|
36
|
+
"@putout/formatter-codeframe": "^6.0.0",
|
|
37
|
+
"@putout/formatter-dump": "^4.0.1",
|
|
38
|
+
"@putout/operator-filesystem": "^4.0.1",
|
|
39
|
+
"@putout/operator-json": "^2.0.0",
|
|
40
|
+
"@putout/plugin-filesystem": "^4.0.0",
|
|
41
|
+
"@putout/plugin-nodejs": "^10.3.0",
|
|
42
|
+
"@putout/processor-filesystem": "^4.0.0",
|
|
43
|
+
"chalk": "^5.3.0",
|
|
44
|
+
"enquirer": "^2.4.1",
|
|
45
|
+
"fullstore": "^3.0.0",
|
|
46
|
+
"ignore": "^5.2.4",
|
|
47
|
+
"ora": "^8.0.1",
|
|
48
|
+
"putout": "^35.0.0",
|
|
49
|
+
"strip-ansi": "^7.1.0",
|
|
50
|
+
"try-to-catch": "^3.0.1"
|
|
51
|
+
},
|
|
52
|
+
"keywords": [
|
|
53
|
+
"putout",
|
|
54
|
+
"bundler",
|
|
55
|
+
"AST",
|
|
56
|
+
"babel",
|
|
57
|
+
"api",
|
|
58
|
+
"traverse",
|
|
59
|
+
"generate"
|
|
60
|
+
],
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@putout/test": "^9.0.0",
|
|
63
|
+
"c8": "^9.1.0",
|
|
64
|
+
"eslint": "^8.0.1",
|
|
65
|
+
"eslint-plugin-n": "^16.0.0",
|
|
66
|
+
"eslint-plugin-putout": "^22.0.0",
|
|
67
|
+
"estree-to-babel": "^9.0.0",
|
|
68
|
+
"just-kebab-case": "^4.2.0",
|
|
69
|
+
"madrun": "^10.0.0",
|
|
70
|
+
"montag": "^1.0.0",
|
|
71
|
+
"nodemon": "^3.0.1",
|
|
72
|
+
"supertape": "^10.0.0",
|
|
73
|
+
"try-catch": "^3.0.0"
|
|
74
|
+
},
|
|
75
|
+
"license": "MIT",
|
|
76
|
+
"engines": {
|
|
77
|
+
"node": ">=18"
|
|
78
|
+
},
|
|
79
|
+
"publishConfig": {
|
|
80
|
+
"access": "public"
|
|
81
|
+
}
|
|
82
|
+
}
|