1.1.11-rc.4 • Published 3 years ago

udk v1.1.11-rc.4

Weekly downloads
197
License
MIT
Repository
github
Last release
3 years ago

Universal Development Kit

Webpack extension which improves universal application development.

NPM Version NPM Dependencies Build Status Coverage Status License: MIT

Features

Install

npm install --save-dev udk webpack

The Gist

// webpack.config.js

const mode = process.env.NODE_ENV === 'production' ? 'production' : 'development';

const client = {
  name: 'client',
  entry: './src/client.js',
  output: {
    path: __dirname + '/dist',
    filename: 'client.js'
  }
};

const server = {
  name: 'server',
  dependencies: [ client.name ], // server depends on client
  entry: './src/server.js',
  output: {
    path: __dirname + '/dist',
    filename: 'server.js'
  }
};

module.exports = [ client, server ]; // webpack multi config
// src/client.js

import './shared';

console.log('Hello, client');
// src/server.js

import './shared';

console.log('Hello, server');
// src/shared.js

console.log('Hello, shared');
DEBUG=udk:* npx udk --config webpack.config.js --watch

Now, try to update each file and check the output:

  1. update client.js to check that server compiler will be invalidate when client compiler done ;
  2. update server.js to check that sever compiler will be the only one compiler invalided ;
  3. update shared.js to check that server compiler will wait client compiler done before compile too ;
  4. update shared.js with a syntax error to check that server won't compile because client compiler has error ;
  5. update shared.js to fix syntax error and check client and server compilers will run in serie.

Run webpack --config webpack.config.js --watch and try the same updates to check the difference between webpack and udk multi compiler behavior.

Under the hood, udk extends MultiCompiler only to ensure some behaviors:

  • Invalidate compiler dependants when a compiler done ;
  • Interupt compilation if a compiler dependency has stats errors ;
  • Wait compiler dependency done when a shared file are updated.

Command Line Interface

udk.js

Same as webpack CLI.

Usage with config file

udk [--config webpack.config.js]

Usage without config file

udk <entry> [<entry>] <output>

All webpack CLIs are supported:

Node.js API

See docs/api.md.

FAQ

See docs/faq.md.

DevContainer

See docs/dev-container.md.

Implementation

See docs/implementation.md.

License

MIT

1.1.11-rc.4

3 years ago

1.1.11-rc.3

3 years ago

1.1.11-rc.2

3 years ago

1.1.11-rc.1

3 years ago

1.1.11-rc.0

3 years ago

1.1.10

4 years ago

1.1.9

4 years ago

1.1.9-rc.1

4 years ago

1.1.9-rc.0

4 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.1.0-rc.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

1.0.0-alpha.4

5 years ago

1.0.0-alpha.3

5 years ago

1.0.0-alpha.2

6 years ago

1.0.0-alpha.1

6 years ago

1.0.0-alpha.0

6 years ago

0.3.17

6 years ago

0.3.16

6 years ago

0.3.15

6 years ago

0.3.14

6 years ago

0.3.13

6 years ago

0.3.12

6 years ago

0.3.11

6 years ago

0.3.10

6 years ago

0.3.9

6 years ago

0.3.8

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago

0.0.0

7 years ago