@shoplflow/base 0.0.0 → 0.0.1

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/package.json CHANGED
@@ -1,17 +1,20 @@
1
1
  {
2
2
  "name": "@shoplflow/base",
3
- "private": false,
4
- "version": "0.0.0",
3
+ "version": "0.0.1",
5
4
  "type": "module",
6
5
  "scripts": {
7
6
  "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
8
7
  "test": "jest",
9
8
  "build": "node build.cjs",
10
- "develop": "yarn build --watch"
9
+ "develop": "yarn build --watch",
10
+ "publish": "npm publish --access public"
11
11
  },
12
12
  "main": "dist/index.esm.js",
13
13
  "module": "dist/index.cjs.js",
14
14
  "types": "dist/index.d.ts",
15
+ "files": [
16
+ "dist"
17
+ ],
15
18
  "dependencies": {
16
19
  "react": "^18.2.0",
17
20
  "react-dom": "^18.2.0"
package/babel.config.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "presets": ["@babel/preset-env", "@babel/typescript"],
3
- }
package/build.cjs DELETED
@@ -1,62 +0,0 @@
1
- const { context } = require('esbuild');
2
- const { Generator } = require('npm-dts');
3
-
4
- const { dependencies, peerDependencies } = require('./package.json');
5
-
6
-
7
- const externals = peerDependencies ? Object.keys(dependencies).concat(Object.keys(peerDependencies)) : Object.keys(dependencies);
8
-
9
- const sharedConfig = {
10
- entryPoints: ['src/index.ts'],
11
- bundle: true,
12
- minify: true,
13
- external: externals,
14
- };
15
-
16
-
17
- context({
18
- ...sharedConfig,
19
- outfile: 'dist/index.esm.js',
20
- platform: 'neutral', // for ESM
21
- format: 'esm',
22
- outExtension: { '.js': '.mjs' },
23
- plugins: [],
24
- }).then(context => {
25
- if (process.argv.includes("--watch")) {
26
- // Enable watch mode
27
- context.watch()
28
- console.log(context)
29
- } else {
30
- // Build once and exit if not in watch mode
31
- context.rebuild().then(result => {
32
- context.dispose()
33
- })
34
- }
35
- }).catch(() => process.exit(1))
36
-
37
- context({
38
- ...sharedConfig,
39
- outfile: 'dist/index.cjs.js',
40
- platform: 'node', // for ESM
41
- format: 'cjs',
42
- outExtension: { '.js': '.cjs' },
43
- plugins: [],
44
- }).then(context => {
45
- if (process.argv.includes("--watch")) {
46
- // Enable watch mode
47
- context.watch()
48
- console.log(context)
49
- } else {
50
- // Build once and exit if not in watch mode
51
- context.rebuild().then(result => {
52
- context.dispose()
53
- })
54
- }
55
- }).catch(() => process.exit(1))
56
-
57
-
58
-
59
- new Generator({
60
- entry: 'src/index.ts',
61
- output: 'dist/index.d.ts',
62
- }).generate();
package/index.html DELETED
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>Vite + React + TS</title>
8
- </head>
9
- <body>
10
- <div id="root"></div>
11
- <script type="module" src="/src/main.tsx"></script>
12
- </body>
13
- </html>
package/jest.config.js DELETED
@@ -1,18 +0,0 @@
1
-
2
- module.exports = {
3
- preset: 'ts-jest',
4
- testEnvironment: 'node',
5
- testMatch: ['<rootDir>/**/__tests__/**/*.spec.ts', "<rootDir>/**/*.test.ts"],
6
- testPathIgnorePatterns: ['/node_modules/'],
7
- coverageDirectory: './coverage',
8
- coveragePathIgnorePatterns: ['node_modules', 'src/database', 'src/test', 'src/types'],
9
- reporters: ['default', 'jest-junit'],
10
- globals: { 'ts-jest': { diagnostics: false } },
11
- transform: {
12
- '^.+\\.tsx?$': ['ts-jest', {//the content you'd placed at "global"
13
- babel: true,
14
- }]
15
- },
16
- resolver: require.resolve(`jest-pnp-resolver`)
17
- };
18
-
package/junit.xml DELETED
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <testsuites name="jest tests" tests="1" failures="0" errors="0" time="0.782">
3
- <testsuite name="Button" errors="0" failures="0" skipped="0" timestamp="2023-07-05T06:36:49" time="0.742" tests="1">
4
- <testcase classname="Button should be defined" name="Button should be defined" time="0">
5
- </testcase>
6
- </testsuite>
7
- </testsuites>
@@ -1,7 +0,0 @@
1
- import {describe, expect, test} from '@jest/globals';
2
-
3
- describe('Button', () => {
4
- test('should be defined', () => {
5
- expect(true).toBeTruthy();
6
- });
7
- });
package/src/index.ts DELETED
@@ -1,5 +0,0 @@
1
- export type TestFunc = () => void;
2
-
3
- export const testFunc: TestFunc = () => {
4
- console.log('testFunc');
5
- }
package/tsconfig.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.esbuild.json"
3
- }