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

@webpixels/css

Package Overview
Dependencies
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webpixels/css - npm Package Compare versions

Comparing version 2.0.0-beta.14 to 2.0.0-beta.15

scss/themes/_linear.scss

29

bin.js
#!/usr/bin/env node
var myArgs = process.argv.slice(2);
var cmd = myArgs[0];
var arg1 = myArgs[1];
var arg2 = myArgs[2];
const args = process.argv.slice(2);
const argv = require('minimist')(args);
if(cmd == '--version'){
var cmd = args[0];
var name = args[1];
var dist = argv.dist;
if(cmd == '--version' || cmd == '--v'){
console.log('Show current version');

@@ -18,14 +20,17 @@ }

if(cmd == 'make:theme'){
if(arg1 == undefined){
console.log('Please specify a theme name. Ex: npx webpixels make-theme --purple');
if(name == undefined){
console.log('Please specify a theme name. Ex: npx webpixels make:theme awesome');
return;
}
var make = require('./cli/make.js');
if(arg2 != undefined){
make.makeTheme(arg1, arg2);
if(dist == undefined){
console.log('Please specify the location of you Sass files. Ex: scss/');
return;
}
make.makeTheme(arg1);
var newCmd = require('./cli/make.js');
newCmd.makeTheme(name, dist);
return;
}

@@ -0,5 +1,35 @@

const path = require('path');
const fs = require('fs-extra');
const replace = require('replace-in-file');
module.exports = {
makeTheme(name = '--starter') {
console.log('Creating new theme ' + name);
},
makeTheme(name = 'starter', dist = 'scss') {
const sourceFolder = 'stubs/theme-starter/';
const destinationFolder = dist+'/themes/';
const replaceString = 'THEME_STARTER';
const themeName = name;
async function copyAndReplace() {
try {
// Copy the 'theme-starter' folder to 'dist'
await fs.copy(sourceFolder+'theme', destinationFolder+themeName);
await fs.copy(sourceFolder+'_theme.scss', destinationFolder+'_'+themeName+'.scss');
// Perform find and replace
const options = {
files: path.join(destinationFolder, '**', '*.*'), // Match all files
from: new RegExp(replaceString, 'g'),
to: themeName,
};
const changes = await replace(options);
console.log(`The ${name} theme has been created and stored in ${destinationFolder}`);
} catch (error) {
console.error('Error:', error);
}
}
copyAndReplace();
}
}
{
"name": "@webpixels/css",
"description": "Utility and component-centric design system based on Bootstrap for fast, responsive UI development.",
"version": "2.0.0-beta.14",
"version": "2.0.0-beta.15",
"version_short": "2.0",

@@ -36,3 +36,3 @@ "license": "MIT",

},
"bin": {
"bin": {
"webpixels": "./bin.js"

@@ -62,3 +62,5 @@ },

"find-unused-sass-variables": "^4.0.4",
"fs-extra": "^11.1.1",
"install": "^0.13.0",
"minimist": "^1.2.8",
"nodemon": "^2.0.7",

@@ -70,2 +72,3 @@ "npm": "^8.19.2",

"purgecss": "^4.0.3",
"replace-in-file": "^7.0.1",
"sass": "^1.62.1",

@@ -72,0 +75,0 @@ "serve": "^14.0.1",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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