forked from Constructor-io/constructorio-client-javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbundle.js
More file actions
23 lines (22 loc) · 787 Bytes
/
bundle.js
File metadata and controls
23 lines (22 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
const packageJSON = require('./package.json');
const banner = `/*!
*
* Constructor.io JavaScript Client, version ${packageJSON.version}
* (c) 2015-${new Date().getFullYear()} Constructor.io
* ---
* Constructor Search uses artificial intelligence to provide AI-first search, browse, and recommendations results that increase conversions and revenue.
* - https://constructor.io
* - https://github.com/Constructor-io/constructorio-client-javascript
*
*/`;
require('esbuild').build({
entryPoints: ['./lib/constructorio.js'],
bundle: true,
minify: true,
define: {
global: 'window',
'process': '{"env":{"BUNDLED":"true"}}',
},
banner: { js: banner },
outfile: `./dist/constructorio-client-javascript-${packageJSON.version}.js`,
}).catch(() => process.exit(1));