1.1.1 • Published 1 month ago

@marchyang/pack v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

Introduction:

Supports local development and bundling features for both web and node environments, with typescript support.

Installation:

npm i @marchyang/pack

Usage:

  1. Configure commands in package.json, assign a value to "mode" to specify the startup model. append -d after debugger @marchyang/pack.

      "scripts": {
            "dev:web": "pack2 pack2 --mode=dev:web",
            "dev:web:debug": "pack2 pack2 --mode=dev:web -d" ,
      }
  2. npm run dev:web

Default Configuration for Each Mode

ModeEntry
dev:websrc/app.tsx
build:spasrc/app.tsx
dev:nodesrc/app.ts
build:nodesrc/app.ts
  1. 在项目根目录增加 pack.config.cjs 可以覆盖默认配置,同时可以设置 config 来指定配置文件路径,同时能覆盖默认配置

    module.exports = {
       dev_node: {
         entry: './src/app.ts',
       },
       build_node: {
         entry: './src/app.ts',
       },
    };

Support

  1. Support dotenv and differentiate between environments, using --DOT_ENV=test will load the . env. test file

Notes:

  1. The entry file names are case-sensitive, otherwise hot reloading will not work in development mode.(文件名字大小写影响 web-dev-server 热更新)
  2. 本地开发时(作为 link 包),dev:node 时要在项目内增加 tsconfig.json,使用的是项目内的 tsconfig.json
1.1.1

1 month ago

1.0.2

6 months ago

1.1.0

2 months ago

1.0.1

6 months ago

1.0.0

6 months ago

1.0.8

3 months ago

1.0.7

4 months ago

1.0.6

4 months ago

1.0.5

4 months ago

1.0.4

4 months ago

1.0.3

6 months ago

0.3.0

7 months ago

0.2.7

7 months ago

0.2.6

7 months ago

0.2.8

7 months ago

0.3.2

6 months ago

0.3.1

6 months ago

0.2.5

9 months ago

0.3.3

6 months ago

0.2.4

10 months ago

0.0.10

12 months ago

0.0.11

12 months ago

0.1.0

12 months ago

0.2.1

11 months ago

0.1.2

12 months ago

0.2.0

11 months ago

0.1.1

12 months ago

0.1.8

11 months ago

0.0.9

12 months ago

0.1.7

11 months ago

0.1.9

11 months ago

0.2.3

11 months ago

0.1.4

11 months ago

0.2.2

11 months ago

0.1.3

11 months ago

0.1.6

11 months ago

0.1.5

11 months ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago