@pdfme/common 1.0.0-beta.2
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/.eslintrc.js +31 -0
- package/declaration.d.ts +1 -0
- package/dist/@pdfme/common.js +3 -0
- package/dist/@pdfme/common.js.LICENSE.txt +6 -0
- package/dist/@pdfme/common.js.map +1 -0
- package/dist/types/barcode.d.ts +2 -0
- package/dist/types/constants.d.ts +6 -0
- package/dist/types/helper.d.ts +15 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/schema.d.ts +3613 -0
- package/dist/types/type.d.ts +64 -0
- package/dist/types/utils.d.ts +12 -0
- package/package.json +51 -0
- package/src/assets/Helvetica.ttf +0 -0
- package/src/constants.ts +8 -0
- package/src/helper.ts +209 -0
- package/src/index.ts +95 -0
- package/src/schema.ts +120 -0
- package/src/type.ts +57 -0
- package/tsconfig.json +20 -0
- package/webpack.config.js +56 -0
@@ -0,0 +1,56 @@
|
|
1
|
+
const path = require('path');
|
2
|
+
const webpack = require('webpack');
|
3
|
+
// const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
4
|
+
const pkg = require('./package.json');
|
5
|
+
|
6
|
+
const isProduction = process.env.NODE_ENV === 'production';
|
7
|
+
|
8
|
+
const BANNER = [
|
9
|
+
'@name ' + pkg.name,
|
10
|
+
'@version ' + pkg.version + ' | ' + new Date().toDateString(),
|
11
|
+
'@author ' + pkg.author,
|
12
|
+
'@license ' + pkg.license,
|
13
|
+
].join('\n');
|
14
|
+
|
15
|
+
const config = {
|
16
|
+
optimization: { minimize: isProduction },
|
17
|
+
resolve: {
|
18
|
+
extensions: ['.ts', '.js'],
|
19
|
+
},
|
20
|
+
plugins: [
|
21
|
+
// new BundleAnalyzerPlugin(),
|
22
|
+
new webpack.BannerPlugin({
|
23
|
+
banner: BANNER,
|
24
|
+
entryOnly: true,
|
25
|
+
}),
|
26
|
+
],
|
27
|
+
devtool: 'source-map',
|
28
|
+
devServer: {
|
29
|
+
historyApiFallback: false,
|
30
|
+
host: '0.0.0.0',
|
31
|
+
},
|
32
|
+
entry: './src/index.ts',
|
33
|
+
output: {
|
34
|
+
path: path.resolve(__dirname, 'dist'),
|
35
|
+
filename: `${pkg.name}.js`,
|
36
|
+
libraryTarget: 'umd',
|
37
|
+
globalObject: 'this',
|
38
|
+
library: {
|
39
|
+
name: pkg.name,
|
40
|
+
type: 'umd',
|
41
|
+
},
|
42
|
+
},
|
43
|
+
module: {
|
44
|
+
rules: [
|
45
|
+
{
|
46
|
+
test: /\.ts$/,
|
47
|
+
use: 'ts-loader',
|
48
|
+
},
|
49
|
+
{
|
50
|
+
test: /\.(ttf)$/i,
|
51
|
+
use: ['url-loader'],
|
52
|
+
},
|
53
|
+
],
|
54
|
+
},
|
55
|
+
};
|
56
|
+
module.exports = config;
|