jiek 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/bin/jiek-dev.js +4 -0
- package/bin/jiek.js +2 -0
- package/dist/commands/build.esm.js +68 -0
- package/dist/commands/build.esm.js.map +1 -0
- package/dist/commands/build.esm.min.js +2 -0
- package/dist/commands/build.esm.min.js.map +1 -0
- package/dist/commands/publish.esm.js +60 -0
- package/dist/commands/publish.esm.js.map +1 -0
- package/dist/commands/publish.esm.min.js +2 -0
- package/dist/commands/publish.esm.min.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.d.ts +2 -0
- package/dist/index.esm.js +6 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.esm.min.js +2 -0
- package/dist/index.esm.min.js.map +1 -0
- package/dist/index.iife.js +155 -0
- package/dist/index.iife.js.map +1 -0
- package/dist/index.iife.min.js +2 -0
- package/dist/index.iife.min.js.map +1 -0
- package/dist/index.umd.js +158 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/index.umd.min.js +2 -0
- package/dist/index.umd.min.js.map +1 -0
- package/dist/inner.esm.js +10 -0
- package/dist/inner.esm.js.map +1 -0
- package/dist/inner.esm.min.js +2 -0
- package/dist/inner.esm.min.js.map +1 -0
- package/dist/merge-package-json.esm.js +16 -0
- package/dist/merge-package-json.esm.js.map +1 -0
- package/dist/merge-package-json.esm.min.js +2 -0
- package/dist/merge-package-json.esm.min.js.map +1 -0
- package/package.json +56 -0
- package/src/commands/build.ts +91 -0
- package/src/commands/publish.ts +79 -0
- package/src/index.ts +6 -0
- package/src/inner.ts +11 -0
- package/src/merge-package-json.ts +19 -0
- package/src/rollup/index.ts +162 -0
- package/src/rollup/plugins/globals.ts +34 -0
- package/src/rollup/plugins/skip.ts +23 -0
- package/src/rollup/utils/commonOptions.ts +9 -0
- package/src/rollup/utils/externalResolver.ts +11 -0
- package/src/rollup/utils/globalResolver.ts +24 -0
- package/src/rollup/utils/withMinify.ts +16 -0
- package/tests/build.spec.ts +28 -0
- package/tests/fixtures/node_modules/.bin/jiek +17 -0
- package/tests/fixtures/node_modules/.jiek/jiek+test-foo.rollup.config.js +31 -0
- package/tests/fixtures/node_modules/.modules.yaml +95 -0
- package/tests/fixtures/node_modules/.pnpm/@esbuild+darwin-arm64@0.20.2/node_modules/@esbuild/darwin-arm64/README.md +3 -0
- package/tests/fixtures/node_modules/.pnpm/@esbuild+darwin-arm64@0.20.2/node_modules/@esbuild/darwin-arm64/bin/esbuild +0 -0
- package/tests/fixtures/node_modules/.pnpm/@esbuild+darwin-arm64@0.20.2/node_modules/@esbuild/darwin-arm64/package.json +20 -0
- package/tests/fixtures/node_modules/.pnpm/@jiek+loader-esbuild@1.0.0_esbuild@0.20.2/node_modules/@jiek/loader-esbuild/LICENSE +21 -0
- package/tests/fixtures/node_modules/.pnpm/@jiek+loader-esbuild@1.0.0_esbuild@0.20.2/node_modules/@jiek/loader-esbuild/loader.js +3 -0
- package/tests/fixtures/node_modules/.pnpm/@jiek+loader-esbuild@1.0.0_esbuild@0.20.2/node_modules/@jiek/loader-esbuild/package.json +8 -0
- package/tests/fixtures/node_modules/.pnpm/debug@4.3.4/node_modules/debug/LICENSE +20 -0
- package/tests/fixtures/node_modules/.pnpm/debug@4.3.4/node_modules/debug/README.md +481 -0
- package/tests/fixtures/node_modules/.pnpm/debug@4.3.4/node_modules/debug/package.json +59 -0
- package/tests/fixtures/node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js +269 -0
- package/tests/fixtures/node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js +274 -0
- package/tests/fixtures/node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js +10 -0
- package/tests/fixtures/node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js +263 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/LICENSE +21 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/README.md +50 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/dist/loader.d.ts +3 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/dist/loader.js +15 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/dist/node.d.ts +23 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/dist/node.js +4926 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/loader.js +1 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/node_modules/.bin/esbuild +14 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/package.json +46 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild-register@3.5.0_esbuild@0.20.2/node_modules/esbuild-register/register.js +3 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/LICENSE.md +21 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/README.md +3 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/bin/esbuild +0 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/install.js +288 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/lib/main.d.ts +703 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/lib/main.js +2436 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/node_modules/.bin/esbuild +14 -0
- package/tests/fixtures/node_modules/.pnpm/esbuild@0.20.2/node_modules/esbuild/package.json +46 -0
- package/tests/fixtures/node_modules/.pnpm/lock.yaml +291 -0
- package/tests/fixtures/node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js +162 -0
- package/tests/fixtures/node_modules/.pnpm/ms@2.1.2/node_modules/ms/license.md +21 -0
- package/tests/fixtures/node_modules/.pnpm/ms@2.1.2/node_modules/ms/package.json +37 -0
- package/tests/fixtures/node_modules/.pnpm/ms@2.1.2/node_modules/ms/readme.md +60 -0
- package/tests/fixtures/node_modules/.pnpm/node_modules/.bin/esbuild +14 -0
- package/tests/fixtures/package.json +8 -0
- package/tests/fixtures/packages/bar/package.json +4 -0
- package/tests/fixtures/packages/foo/dist/index.d.ts +3 -0
- package/tests/fixtures/packages/foo/dist/index.esm.d.ts +3 -0
- package/tests/fixtures/packages/foo/dist/index.esm.js +6 -0
- package/tests/fixtures/packages/foo/dist/index.esm.js.map +1 -0
- package/tests/fixtures/packages/foo/dist/index.esm.min.js +2 -0
- package/tests/fixtures/packages/foo/dist/index.esm.min.js.map +1 -0
- package/tests/fixtures/packages/foo/dist/index.iife.js +15 -0
- package/tests/fixtures/packages/foo/dist/index.iife.js.map +1 -0
- package/tests/fixtures/packages/foo/dist/index.iife.min.js +2 -0
- package/tests/fixtures/packages/foo/dist/index.iife.min.js.map +1 -0
- package/tests/fixtures/packages/foo/dist/index.umd.js +16 -0
- package/tests/fixtures/packages/foo/dist/index.umd.js.map +1 -0
- package/tests/fixtures/packages/foo/dist/index.umd.min.js +2 -0
- package/tests/fixtures/packages/foo/dist/index.umd.min.js.map +1 -0
- package/tests/fixtures/packages/foo/package.json +7 -0
- package/tests/fixtures/packages/foo/src/index.ts +3 -0
- package/tests/fixtures/pnpm-workspace.yaml +2 -0
- package/tests/publish.spec.ts +31 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.esm.min.js","sources":["../src/index.ts"],"sourcesContent":["export default function (a: number, b: string) {\n return a + b\n}\n"],"names":["index","a","b"],"mappings":"AAAA,SAAAA,EAAyBC,EAAWC,GAClC,OAAOD,EAAIC,CACb"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
var JiekTestFoo = (function (exports) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
function index(a, b) {
|
5
|
+
return a + b;
|
6
|
+
}
|
7
|
+
|
8
|
+
exports.default = index;
|
9
|
+
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
11
|
+
|
12
|
+
return exports;
|
13
|
+
|
14
|
+
})({});
|
15
|
+
//# sourceMappingURL=index.iife.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.iife.js","sources":["../src/index.ts"],"sourcesContent":["export default function (a: number, b: string) {\n return a + b\n}\n"],"names":[],"mappings":";;;EAAA,cAAA,CAAyB,GAAW,CAAW,EAAA;EAC7C,EAAA,OAAO,CAAI,GAAA,CAAA,CAAA;EACb;;;;;;;;;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.iife.min.js","sources":["../src/index.ts"],"sourcesContent":["export default function (a: number, b: string) {\n return a + b\n}\n"],"names":["a","b"],"mappings":"0DAAA,SAAyBA,EAAWC,GAClC,OAAOD,EAAIC,CACb"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
(function (global, factory) {
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.JiekTestFoo = {}));
|
5
|
+
})(this, (function (exports) { 'use strict';
|
6
|
+
|
7
|
+
function index(a, b) {
|
8
|
+
return a + b;
|
9
|
+
}
|
10
|
+
|
11
|
+
exports.default = index;
|
12
|
+
|
13
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
14
|
+
|
15
|
+
}));
|
16
|
+
//# sourceMappingURL=index.umd.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.umd.js","sources":["../src/index.ts"],"sourcesContent":["export default function (a: number, b: string) {\n return a + b\n}\n"],"names":[],"mappings":";;;;;;EAAA,cAAA,CAAyB,GAAW,CAAW,EAAA;EAC7C,EAAA,OAAO,CAAI,GAAA,CAAA,CAAA;EACb;;;;;;;;;;"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).JiekTestFoo={})}(this,(function(e){"use strict";e.default=function(e,t){return e+t},Object.defineProperty(e,"__esModule",{value:!0})}));
|
2
|
+
//# sourceMappingURL=index.umd.min.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.umd.min.js","sources":["../src/index.ts"],"sourcesContent":["export default function (a: number, b: string) {\n return a + b\n}\n"],"names":["a","b"],"mappings":"6PAAA,SAAyBA,EAAWC,GAClC,OAAOD,EAAIC,CACb"}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import '../src/commands/publish'
|
2
|
+
|
3
|
+
import fs from 'node:fs'
|
4
|
+
import path from 'node:path'
|
5
|
+
|
6
|
+
import * as childProcess from 'child_process'
|
7
|
+
import { program } from 'commander'
|
8
|
+
import { afterAll, beforeAll, describe, test } from 'vitest'
|
9
|
+
|
10
|
+
import { actionFuture } from '../src/inner'
|
11
|
+
|
12
|
+
const ROOT = path.resolve(__dirname, 'fixtures')
|
13
|
+
|
14
|
+
beforeAll(() => {
|
15
|
+
childProcess.execSync('pnpm i', {
|
16
|
+
cwd: ROOT,
|
17
|
+
stdio: 'inherit'
|
18
|
+
})
|
19
|
+
})
|
20
|
+
afterAll(() => {
|
21
|
+
fs.unlinkSync(path.resolve(ROOT, 'node_modules'))
|
22
|
+
})
|
23
|
+
|
24
|
+
const prefixes = ['node', 'jiek', 'publish', '--root', ROOT]
|
25
|
+
describe('publish', () => {
|
26
|
+
test('base', () => {
|
27
|
+
process.argv = [...prefixes, '--filter', 'test-foo']
|
28
|
+
program.parse(process.argv)
|
29
|
+
return actionFuture
|
30
|
+
})
|
31
|
+
})
|