Socket
Socket
Sign inDemoInstall

@anephenix/rcg

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@anephenix/rcg - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

.github/workflows/node.js.yml

2

.eslintrc.js

@@ -5,3 +5,3 @@ module.exports = {

es6: true,
jest: true,
mocha: true,
node: true,

@@ -8,0 +8,0 @@ },

# CHANGELOG
### 0.0.10 - Wednesday 27th October, 2021
- The source folder(s) are generated in case they do not exist already.
- Generate components that support Next.js' built-in support for SCSS.
### 0.0.9 - Thursday 21st May, 2020

@@ -4,0 +9,0 @@

@@ -16,3 +16,4 @@ // NPM Dependencies

customJSExtension,
customCssExtension
customCssExtension,
nextjsSassSupport
) => {

@@ -29,2 +30,3 @@ const title = to.pascal(componentName);

customCssExtension,
nextjsSassSupport,
});

@@ -31,0 +33,0 @@ return filesCreated;

@@ -25,8 +25,16 @@ // NPM Dependencies

customDOM,
customCssExtension
customCssExtension,
nextjsSassSupport
) => {
let element = `<div id='${folderName}' />`;
if (nextjsSassSupport) element = `<div id={styles['${folderName}']} />`;
if (customDOM) element = `<div id='${folderName}'>${customDOM}</div>`;
if (customDOM && nextjsSassSupport)
element = `<div id={styles['${folderName}']}>${customDOM}</div>`;
const nextJsStylesVariable = nextjsSassSupport ? 'styles from ' : '';
const fileExtension = nextjsSassSupport
? 'module.scss'
: customCssExtension;
return `
import './${title}.${customCssExtension}';
import ${nextJsStylesVariable}'./${title}.${fileExtension}';

@@ -57,2 +65,3 @@ const ${title} = () => (${element});

describe('${title}', () => {
${title};
test.todo('should do something');

@@ -72,2 +81,3 @@ });`;

customCssExtension,
nextjsSassSupport,
}) => {

@@ -80,3 +90,4 @@ if (!customJSExtension) customJSExtension = 'js';

customDOM,
customCssExtension
customCssExtension,
nextjsSassSupport
);

@@ -105,4 +116,7 @@ return await createFile(folderPath, fileName, fileContent);

customCssExtension,
nextjsSassSupport,
}) => {
const fileName = `${title}.${customCssExtension || 'scss'}`;
const fileName = `${title}.${
nextjsSassSupport ? 'module.scss' : customCssExtension || 'scss'
}`;
const fileContent = getFileContentForStyleFile(folderName, customCSS);

@@ -109,0 +123,0 @@ return await createFile(folderPath, fileName, fileContent);

@@ -31,5 +31,6 @@ // NPM Dependencies

customCssExtension,
nextjsSassSupport,
}) => {
const folderPath = path.join(srcFolderPath, folderName);
await mkdir(folderPath);
await mkdir(folderPath, { recursive: true });
const filesCreated = [];

@@ -42,2 +43,3 @@ const styleFilePath = await generateStyleFile({

customCssExtension,
nextjsSassSupport,
});

@@ -51,2 +53,3 @@ const componentFilePath = await generateComponentFile({

customCssExtension,
nextjsSassSupport,
});

@@ -53,0 +56,0 @@ const testFilePath = await generateTestFile({

{
"name": "@anephenix/rcg",
"version": "0.0.9",
"version": "0.0.10",
"description": "React Component Generator",

@@ -8,4 +8,5 @@ "main": "index.js",

"lint": "npx eslint .",
"cover": "jest --coverage --coverageReporters=text-lcov | coveralls",
"test": "jest --coverage"
"cover": "npx nyc npm run test",
"coveralls": "npx nyc --reporter=text-lcov npm run test | coveralls",
"test": "npx mocha test/**/*"
},

@@ -25,15 +26,16 @@ "keywords": [

"devDependencies": {
"coveralls": "^3.1.0",
"eslint": "^7.0.0",
"eslint-plugin-jest": "^23.13.1",
"jest": "^26.0.1",
"jsdoc": "^3.6.4",
"npm-upgrade": "^2.0.3",
"coveralls": "^3.1.1",
"eslint": "^7.32.0",
"eslint-plugin-jest": "^24.5.2",
"jsdoc": "^3.6.7",
"mocha": "^9.1.3",
"npm-upgrade": "^3.0.0",
"pre-commit": "^1.2.2",
"prettier": "^2.0.5"
"prettier": "^2.4.1"
},
"dependencies": {
"commander": "^5.1.0",
"commander": "^7.0.0",
"nyc": "^15.1.0",
"to-case": "^2.0.0"
}
}

@@ -6,4 +6,3 @@ # RCG

[![npm version](https://badge.fury.io/js/%40anephenix%2Frcg.svg)](https://badge.fury.io/js/%40anephenix%2Frcg)
[![CircleCI](https://circleci.com/gh/anephenix/rcg.svg?style=shield)](https://circleci.com/gh/anephenix/rcg)
[![CI](https://github.com/anephenix/rcg/actions/workflows/node.js.yml/badge.svg)](https://github.com/anephenix/rcg/actions/workflows/node.js.yml)
[![Coverage Status](https://coveralls.io/repos/github/anephenix/rcg/badge.svg?branch=master)](https://coveralls.io/github/anephenix/rcg?branch=master)

@@ -10,0 +9,0 @@ [![Maintainability](https://api.codeclimate.com/v1/badges/67061d6077ef7ceaa0c9/maintainability)](https://codeclimate.com/github/anephenix/rcg/maintainability)

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