sass-itcss-generator
Advanced tools
Comparing version 1.0.0 to 1.2.0
{ | ||
"name": "sass-itcss-generator", | ||
"version": "1.0.0", | ||
"version": "1.2.0", | ||
"description": "Tool to generate Sass files following ITCSS principles and BEM", | ||
@@ -9,8 +9,4 @@ "main": "./src/index.js", | ||
}, | ||
"bin": { | ||
"sass-itcss-generator": "./src/index.js" | ||
}, | ||
"bin": "./bin/sass-itcss-generator.js", | ||
"scripts": { | ||
"preinstall": "node bin/check-node-version.js", | ||
"prestart": "node bin/check-node-version.js", | ||
"test": "jest --config ./jest.config.json", | ||
@@ -32,3 +28,2 @@ "test:watch": "npm run test -- --watch" | ||
}, | ||
"type": "module", | ||
"author": "Ben Brehaut", | ||
@@ -49,5 +44,8 @@ "license": "MIT", | ||
"jest": "^26.6.3", | ||
"semantic-release": "^17.4.1", | ||
"yargs": "latest" | ||
"semantic-release": "^17.4.1" | ||
}, | ||
"dependencies": { | ||
"esm": "^3.2.25", | ||
"yargs": "^17.0.1" | ||
} | ||
} |
@@ -1,27 +0,11 @@ | ||
#! /usr/bin/env node | ||
'use strict'; | ||
import { existsSync, mkdir, mkdirSync, writeFile, copyFile } from 'fs'; | ||
import yargs from 'yargs'; | ||
import { hideBin } from 'yargs/helpers'; | ||
import { FOLDERS } from './constants.js'; | ||
const argv = yargs(hideBin(process.argv)).argv; | ||
const name = argv._[0].toString(); | ||
// if name parameter is not passed, throw error. | ||
if (!name) { | ||
throw new Error('❌ Please include the directory name'); | ||
} | ||
// Create the folders and files | ||
init(name); | ||
// Console out completion | ||
console.log(`✅ Completed`); | ||
/** | ||
* Initialise the function | ||
* Create the folders and files | ||
* @param {string} folderName - The folder name to output to, comes from cli | ||
*/ | ||
function init(folderName) { | ||
export function sassItcssGenerator(folderName) { | ||
// If folder already exists, throw error. | ||
@@ -32,3 +16,3 @@ if (existsSync(folderName)) { | ||
console.log(`🔨 Creating ${name} folder`); | ||
console.log(`🔨 Creating ${folderName} folder`); | ||
@@ -47,2 +31,5 @@ // Create directory passed by user | ||
createIndexFile(folderName); | ||
// Console out completion | ||
console.log(`✅ Completed`); | ||
} | ||
@@ -49,0 +36,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
9
0
1
5334
2
59
No
+ Addedesm@^3.2.25
+ Addedyargs@^17.0.1
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedcliui@8.0.1(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedesm@3.2.25(transitive)
+ Addedget-caller-file@2.0.5(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedrequire-directory@2.1.1(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedwrap-ansi@7.0.0(transitive)
+ Addedy18n@5.0.8(transitive)
+ Addedyargs@17.7.2(transitive)
+ Addedyargs-parser@21.1.1(transitive)