mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 07:42:10 +00:00
log js
This commit is contained in:
parent
9cb2c3dfab
commit
2768116bb2
@ -1,17 +0,0 @@
|
||||
// gulpfile.js
|
||||
var gulp = require( "gulp" );
|
||||
var webpack = require( "webpack-stream" );
|
||||
var sourcemaps = require( "gulp-sourcemaps" );
|
||||
var rename = require( "gulp-rename" );
|
||||
var uglify = require( "gulp-uglify" );
|
||||
|
||||
gulp.task( "build", function() {
|
||||
return gulp.src( "src/logger.js" )
|
||||
.pipe( webpack( require( "./webpack.config.js" ) ) )
|
||||
.pipe( gulp.dest( "./lib" ) )
|
||||
.pipe( sourcemaps.init( { loadMaps: true } ) )
|
||||
.pipe( uglify() )
|
||||
.pipe( rename( "logger.min.js" ) )
|
||||
.pipe( sourcemaps.write( "./" ) )
|
||||
.pipe( gulp.dest( "lib/" ) );
|
||||
} );
|
2113
log-js/package-lock.json
generated
2113
log-js/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -2,9 +2,10 @@
|
||||
"name": "log-js",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"main": "dist/logger.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"build": "webpack --mode production"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
@ -12,14 +13,8 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.10.2",
|
||||
"babel-loader": "^8.1.0",
|
||||
"gulp-rename": "^2.0.0",
|
||||
"gulp-sourcemaps": "^2.6.5",
|
||||
"gulp-uglify": "^3.0.2",
|
||||
"webpack": "^4.43.0",
|
||||
"webpack-cli": "^3.3.11",
|
||||
"webpack-stream": "^5.2.1"
|
||||
"webpack-cli": "^3.3.11"
|
||||
},
|
||||
"dependencies": {
|
||||
"gulp": "^4.0.2"
|
||||
}
|
||||
"dependencies": {}
|
||||
}
|
||||
|
@ -42,3 +42,4 @@ class Logger {
|
||||
}
|
||||
}
|
||||
}
|
||||
export default Logger;
|
||||
|
@ -1,14 +1,23 @@
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
entry: "./src/logger.js",
|
||||
devtool: "#inline-source-map",
|
||||
// output tells webpack where to put the bundle it creates
|
||||
output: {
|
||||
library: "logger",
|
||||
// We want webpack to build a UMD wrapper for our module
|
||||
libraryTarget: "umd",
|
||||
// the destination file name
|
||||
filename: "lib/logger.js"
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
mode: 'production',
|
||||
entry: './src/logger.js',
|
||||
output: {
|
||||
path: path.resolve('dist'),
|
||||
filename: 'logger.js',
|
||||
libraryTarget: 'commonjs2',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js?$/,
|
||||
exclude: /(node_modules)/,
|
||||
use: 'babel-loader',
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js'],
|
||||
},
|
||||
};
|
Loading…
Reference in New Issue
Block a user