1.1.1 • Published 1 year ago

@marchyang/pack v1.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year 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 year ago

1.0.2

2 years ago

1.1.0

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.8

1 year ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

0.3.0

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.8

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.2.5

2 years ago

0.3.3

2 years ago

0.2.4

2 years ago

0.0.10

2 years ago

0.0.11

2 years ago

0.1.0

2 years ago

0.2.1

2 years ago

0.1.2

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.8

2 years ago

0.0.9

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.2.3

2 years ago

0.1.4

2 years ago

0.2.2

2 years ago

0.1.3

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago