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

@cocreate/random-color

Package Overview
Dependencies
Maintainers
1
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cocreate/random-color - npm Package Compare versions

Comparing version 1.4.26 to 1.5.0

14

CHANGELOG.md

@@ -0,1 +1,15 @@

# [1.5.0](https://github.com/CoCreate-app/CoCreate-random-color/compare/v1.4.26...v1.5.0) (2023-08-16)
### Bug Fixes
* crud attributes renamed ([bd66679](https://github.com/CoCreate-app/CoCreate-random-color/commit/bd6667984f87195dc4b9c215b4b5f5f0e5e26e31))
* replace -target -selector ([bcc788c](https://github.com/CoCreate-app/CoCreate-random-color/commit/bcc788c699b017126d0b6e00fb299adbdc226605))
* webpack.config and package.json make use of mode=production instead of process.env ([62db8fb](https://github.com/CoCreate-app/CoCreate-random-color/commit/62db8fb68156b15583d358b44bf771582e6953c2))
### Features
* name attribute and variable renamed to key ([002d2a5](https://github.com/CoCreate-app/CoCreate-random-color/commit/002d2a53f0d1e00e9cfac28af8c2a446153bc09b))
## [1.4.26](https://github.com/CoCreate-app/CoCreate-random-color/compare/v1.4.25...v1.4.26) (2023-06-14)

@@ -2,0 +16,0 @@

4

CoCreate.config.js

@@ -7,4 +7,4 @@ module.exports = {

{
"collection": "files",
"document": {
"array": "files",
"object": {
"_id": "6020a8983c260207bf49cad2",

@@ -11,0 +11,0 @@ "name": "index.html",

{
"name": "@cocreate/random-color",
"version": "1.4.26",
"version": "1.5.0",
"description": "A simple HTML5 and pure javascript component. Easy configuration using HTML5 attributes or Javscript api and/or JavaScript API. Highly customizable and styleable.",

@@ -26,3 +26,3 @@ "keywords": [

"start": "npx webpack --config webpack.config.js",
"build": "NODE_ENV=production npx webpack --config webpack.config.js",
"build": "npx webpack --mode=production --config webpack.config.js",
"dev": "npx webpack --config webpack.config.js --watch",

@@ -29,0 +29,0 @@ "postinstall": "node -e \"const { execSync } = require('child_process'); try { execSync('coc --version', { stdio: 'ignore' }); } catch (error) { try { execSync('npm install -g @cocreate/cli', { stdio: 'inherit' }); console.log('Installed \"@cocreate/cli\" globally.'); } catch (error) { console.error('Failed to install \"@cocreate/cli\" globally:', error); } }\""

const path = require("path")
const TerserPlugin = require("terser-webpack-plugin")
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
let isProduction = process.env.NODE_ENV === "production"
const { CleanWebpackPlugin } = require("clean-webpack-plugin")
module.exports = {
entry: {
"CoCreate-random-color": "./src/index.js",
},
output: {
path: path.resolve(__dirname, "dist"),
filename: isProduction ? "[name].min.js" : "[name].js",
libraryTarget: "umd",
libraryExport: "default",
library: ["CoCreate", "randomColor"],
globalObject: "this",
},
module.exports = (env, argv) => {
let isProduction = false
if (argv.mode === 'production')
isProduction = true
plugins: [
new CleanWebpackPlugin(),
new MiniCssExtractPlugin({
filename: "[name].css",
}),
],
// Default mode for Webpack is production.
// Depending on mode Webpack will apply different things
// on final bundle. For now we don't need production's JavaScript
// minifying and other thing so let's set mode to development
mode: isProduction ? "production" : "development",
module: {
rules: [
{
test: /.js$/,
exclude: /(node_modules)/,
use: {
loader: "babel-loader",
options: {
plugins: ["@babel/plugin-transform-modules-commonjs"],
},
const config = {
entry: {
"CoCreate-random-color": "./src/index.js",
},
},
{
test: /.css$/i,
use: [
{ loader: "style-loader", options: { injectType: "linkTag" } },
"file-loader",
output: {
path: path.resolve(__dirname, "dist"),
filename: isProduction ? "[name].min.js" : "[name].js",
libraryTarget: "umd",
libraryExport: "default",
library: ["CoCreate", "randomColor"],
globalObject: "this",
},
plugins: [
new CleanWebpackPlugin(),
new MiniCssExtractPlugin({
filename: "[name].css",
}),
],
},
],
},
// Default mode for Webpack is production.
// Depending on mode Webpack will apply different things
// on final bundle. For now we don't need production's JavaScript
// minifying and other thing so let's set mode to development
mode: isProduction ? "production" : "development",
module: {
rules: [
{
test: /.js$/,
exclude: /(node_modules)/,
use: {
loader: "babel-loader",
options: {
plugins: ["@babel/plugin-transform-modules-commonjs"],
},
},
},
{
test: /.css$/i,
use: [
{ loader: "style-loader", options: { injectType: "linkTag" } },
"file-loader",
],
},
],
},
// add source map
...(isProduction ? {} : { devtool: "eval-source-map" }),
// add source map
...(isProduction ? {} : { devtool: "eval-source-map" }),
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
extractComments: true,
// cache: true,
parallel: true,
// sourceMap: true, // Must be set to true if using source-maps in production
terserOptions: {
// https://github.com/webpack-contrib/terser-webpack-plugin#terseroptions
// extractComments: 'all',
compress: {
drop_console: true,
},
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
extractComments: true,
// cache: true,
parallel: true,
// sourceMap: true, // Must be set to true if using source-maps in production
terserOptions: {
// https://github.com/webpack-contrib/terser-webpack-plugin#terseroptions
// extractComments: 'all',
compress: {
drop_console: true,
},
},
}),
],
splitChunks: {
chunks: "all",
minSize: 200,
// maxSize: 99999,
//minChunks: 1,
cacheGroups: {
defaultVendors: false,
},
},
},
}),
],
splitChunks: {
chunks: "all",
minSize: 200,
// maxSize: 99999,
//minChunks: 1,
cacheGroups: {
defaultVendors: false,
},
},
},
}
}
return config
}

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