Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@daybrush/builder

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@daybrush/builder - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

48

index.js

@@ -0,7 +1,19 @@

const fs = require("fs");
const pkg = require(process.cwd() + "/package.json");
let copyright = `Copyright (c) ${pkg.author ? pkg.author.name || pkg.author : ""}`;
try {
const licenseFile = fs.readFileSync(process.cwd() + "/LICENSE", { encoding: "utf8" });
const result = licenseFile.match(/^copy.*$/img);
if (result && result[0]) {
copyright = result[0];
}
} catch (e) { }
const defaultBanner = `/*
Copyright (c) 2019 ${pkg.author}
${copyright}
name: ${pkg.name}
license: ${pkg.license}
author: ${pkg.author}
author: ${pkg.author ? pkg.author.name || pkg.author : ""}
repository: ${pkg.repository.url}

@@ -11,10 +23,3 @@ version: ${pkg.version}

const commonjsPlugin = require("rollup-plugin-commonjs")();
const typescriptPlugin = require("rollup-plugin-typescript")({
"module": "es2015",
"target": "es3",
"lib": ["es2015", "dom"],
"exclude": "node_modules/**",
"sourceMap": true,
});
const typescriptPlugin = require("rollup-plugin-typescript");
const replacePlugin = require("rollup-plugin-replace")({

@@ -44,5 +49,7 @@ "#__VERSION__#": pkg.version,

output, // string | string[]
tsconfig = "tsconfig.json",
format = "umd", // "umd", "cjs", "es"
exports = "default", // "default", "named"
sourcemap = true, // boolean,
plugins = [],
name, // string,

@@ -58,6 +65,13 @@ uglify, // boolean or except string

} = options;
const plugins = [typescriptPlugin, minifyPlugin, replacePlugin];
const nextPlugins = plugins.concat([
typescriptPlugin({
tsconfig,
"sourceMap": true,
}),
minifyPlugin,
replacePlugin
]);
commonjs && plugins.push(commonjsPlugin);
resolve && plugins.push(resolvePlugin);
commonjs && nextPlugins.push(commonjsPlugin);
resolve && nextPlugins.push(resolvePlugin);
if (uglify) {

@@ -75,3 +89,3 @@ const condition = typeof uglify === "string" ? uglify : `name:(\\s*)${pkg.name.replace(/\//g, "\\/")}`;

})();`);
plugins.push(uglifyPlugin({
nextPlugins.push(uglifyPlugin({
sourcemap: true,

@@ -83,7 +97,7 @@ output: {

}
visualizer && plugins.push(visualizerPlugin({
visualizer && nextPlugins.push(visualizerPlugin({
sourcemap: true,
filename: './statistics/index.html',
title: '',
...visualizer ,
...visualizer,
}));

@@ -93,3 +107,3 @@

input,
plugins,
plugins: nextPlugins,
external: Object.keys(external || {}),

@@ -96,0 +110,0 @@ ...inputOptions,

{
"name": "@daybrush/builder",
"version": "0.0.5",
"version": "0.0.6",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc